Re: Xcode project root and Subversion
Re: Xcode project root and Subversion
- Subject: Re: Xcode project root and Subversion
- From: Jim Prouty <email@hidden>
- Date: Mon, 6 Apr 2009 13:10:07 -0700
At 1:35 AM -0700 4/5/09, Andrew Pontious <email@hidden> wrote:
>Do you mean by that that /Source/IgorDev/IgorSrc6.1/ is a directory
>you made yourself, not something you checked out? If not, you're going
>to have problems in Xcode 3.0 and up.
>
>What Xcode requires in 3.0 and up is that whatever directory is
>pointed to by the project root is a single checkout from an SCM
>repository. This was done to reduce the amount of work Xcode needs to
>do (and CPU it needs to take up) to do SCM operations.
>...
>This isn't even mentioning whether Igor6.1Xcode/Igor61.xcodeproj is
>under source control. In general, you should really check your Xcode
>project into source control if you're using it for development. And on
>top of that, Xcode requires that the project root directory be one of
>the directly directories above the project directory (i.e. ../,
>or ../../, or ../../../, etc.), so you can't, as you might have wanted
>to do above, set the project root directory to an entirely unrelated
>directory.
Andrew (thanks!) correctly observed that my Xcode project was not checked
into Subversion.
So I added an "Xcode" subfolder under in my working copy's trunk and made
that my project folder.
(I had to change my project source Path Types to something that would allow
me to move my project relative to the working copy; I used a Relative to
Source Tree path type).
working copy paths: /Source/IgorDev/IgorSrc6.1/trunk (corresponds
to repository root)
/Source/IgorDev/IgorSrc6.1/trunk/Igor1
/Source/IgorDev/IgorSrc6.1/trunk/Igor2
full path to project folder: /Source/IgorDev/IgorSrc6.1/trunk/Xcode
full path to project file:
/Source/IgorDev/IgorSrc6.1/trunk/Xcode/Igor61.xcodeproj
My project root is (still) set to <Project File Directory>/.., which now
works out to:
/Source/IgorDev/IgorSrc6.1/trunk
The Xcode folder has these versioned files:
English.lproj
Igor_Prefix.pch
Igor61.xcodeproj (really a bundle/folder)
IgorProj.xcconfig
libF2C.a
and these subfolders:
build
IgorFortranLibrary
These last two folders always show up in the SCM Info window, and I'd like
them to be ignored (they're both full of build products, the first is of
course Xcode's build folder and the other is our own built universal
library).
Wouldn't it be nice if I could somehow tell Xcode to ignore these?
(Yes, I could move them out of the folder, but the folder's name is Xcode,
where I put, you know, Xcode stuff.)
Googling for "svn ignore" lead me here
http://blog.bogojoker.com/2008/07/command-line-svnignore-a-file/
and revealed:
"You don't svn:ignore a file.
You put an svn:ignore property on the directory to ignore that
filename pattern!"
So with Terminal I navigated to my new Xcode folder and issued these commands:
svn propedit svn:ignore .
which opens (in my case unfortunately) Emacs to edit svn-prop.tmp and I
added these patterns (I used literals instead of *-based patterns) to the
directory's ignore property (how byzantine this all is!):
build
IgorFortranLibrary
Another bit of Googling and I found that the way to save the file from Emac is:
Control-x Control-c exit the emacs (but save files first)
svn status now doesn't list the build folders - yay - but I see Emacs left
behind some droppings:
Jims-Shiny-New-Mac-Pro:Xcode jim$ svn status
M .
? svn-prop.tmp~
M Igor61.xcodeproj/jim.pbxuser
Removing this offender:
rm svn-prop.tmp~
makes my new Xcode folder appear clean of non-versioned files and working
with Xcode's subversion.
>On Apr 3, 2009, at 3:25 PM, Quincey Morris wrote:
>
>> Also, Xcode SCM is a little confusing to set up, because you
>> typically need to set up your project files (xcodeproj, source, etc)
>> "locally", then import that into your repository, then discard the
>> original files and check out all the project files from the
>> repository. If you omitted that last step, then the SCM part won't
>> work.
I found that once I checked the project into Subversion using my SVN client
that Xcode picked up that the files in the Igor61.xcodeproj bundle were
under SCM control, probably because I had previously done the
checkin-delete-checkout dance with the other folders parallel to my Xcode
subfolder.
My hope in documenting all of this is that someone else may profit from all
of this tedium :-)
--
Jim "How does it work?" Prouty
Voice: (503) 620-3001, FAX: (503) 620-6754
Makers of IGOR Pro, scientific data analysis and graphing for Mac and PC
http://www.wavemetrics.com
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden