On Nov 28, 2007, at 6:41 PM, Jeffrey Wilson wrote: Software: OS X 10.5, XCode 3.0
I am trying to get my XCode project to recognize a CVS repository for an open source program over at berlios.de. I was able to connect using "pserver" in the "Method" field. While I can connect using my name and password (repository uses ssh2), and checkout the repository, I cannot configure my project to use the SCM Repository (only options are "None" and "Configure SCM Repositories..."). Thoughts?
Is there another "Method" I should try? Is the problem because no *.xcodeproj exists in the repository to start with? Do I need to do that "export CVSROOT" stuff? It appears the Xcode project file does need to be within the checked-out directory, yes.
On Dec 3, 2007, at 6:38 AM, Jeffrey Wilson wrote:
Well, I have made some progress. It seems as though the CVS repo needs to have a XCode project in it for this to work.
I checked out the repo. I created a local "macosx" directory in the repo. Then, I created a new XCode project within that macosx directory. To my project, I added the OSS code from the parent directory. Then, I Exported my macosx directory back to the OSS repo. Note, this requires write access to the server that has the repo!
Next, I re-checked out the full repo (to a new directory) and opened the XCode project in it. Now, I am able to select the CVS repo from the SCM Repository list. Woohoo!
But wait! My modifications to the OSS code are not being tracked by SCM! Only my XCode project files seem to be tracked. (When I edit any code, SCM does not tag the files as being modified. Updates from other people are also not being seen). For example, if I right-click on the OSS code, I see "Add to Repository" as an option, while my *_Prefix.pch (obviously checked-in by me) does not have this option (and I can track its changes).
Do I have to add all the files to the repository, although they are already there? This makes me nervous that I might screwup the repo.
The second thing you need to do is set the "Project Root".
Project roots are something new to Xcode 3.0. Go to your project's top-level node in your Groups & Files tree, bring up the inspector (double-click the node or press Cmd-I). In the resulting inspector window be sure the General tab is active.
In that tab, near the top, is an entry called "Root". By default, it is set to the directory that contains your project file. This is indicated by a grayed-out "<Project File Directory>" entry. Click the Choose button to choose a different directory.
You want to choose a directory above your project directory that represents the entirety of your checkout. Note you can only choose project roots that are the direct parent, or the direct grandparent, etc., of the project file's location. SCM in Xcode 3.0 uses that project root as the basis for its work, so it will only check the status files in that root for SCM activity.
-- Andrew |