Simple single-user Subversion with XCode 3.2.

Before I forget again, I'm logging how I setup SCM (Source Control Management) with Subversion (svn) in Xcode 3.2 on Mac OS X 10.6 (Snow Leopard).

I'm just a single coder without need of a fancy setup. I want the barest bones version control possible. I'd use RCS if I could. For my situation, installing Apache web server in order to check in files is absurd.

First, how did I setup a repository? This is from very spotty memory, command line history, and extrapolating from my current configuration. From Terminal:

svnadmin create ~/Code/SVN

Then in Xcode, I choose SCM | Repositories | Configure.  Click "+" and fill in these values.

I really hope that was all there was to it, but I can't be sure anymore.

Next, how do I add a project into the Subversion repository?

  1. In Xcode, SCM | Repositories.
  2. Make sure "Subversion Local" repository in the far left column is selected.
  3. Press Import.
  4. Choose /Users/jbm/Code/MyApp.
  5. In Finder, drag /Users/jbm/Code/MyApp into the trash.
  6. Back in Xcode, SCM | Respositories, select "MyApp" and press Checkout.
  7. Checkout the working copy into /Users/jbm/Code/MyApp.
  8. Open the working copy of MyApp project.
  9. SCM | Configure SCM For This Project.
  10. General tab | Configure Roots & SCM... button.
  11. Choose "Subversion" in the pop-up menu.
  12. In the "Repository" column of the table, choose "Subversion Local".

Finally, as you can see from the Project Info dialog screen shot, I do not keep my build directory in the project directory. This prevents my build files from mixing with the working copy of the project.

Also, to let Subversion know these files are not text, in Terminal do this:

cd ~/Code/MyApp/MyApp.xcodeproj
svn propset svn:mime-type application/octet-stream jbm.mode1v3
svn propset svn:mime-type application/octet-stream jbm.pbxuser

Links to much better info than this:


No comments:

Post a Comment