Tuesday, April 14, 2009

Adding an SCM SVN Repository to XCode

I needed to set up some subversion. Having a subversion (SVN), or any other source control management is very important. Besides backing up the code remotely, I can quickly diff with previous releases, commit with comments, tag files and code branches, etc.

I googled a bit for free SVN hosting and found XP-Dev.com. After creating my repository I set up XCode to know about my XP-Dev repository. That was a breeze, but then a problem crop up when I wanted to import my existing prototype in the repository. It was complaining about some SCM Error 155007.

Googled a bit more, and luckily some other guys had the same problems. They suggested to do the initial commit from the terminal. This did the trick:

svn import /path/to/project http://username@svn.xp-dev.com/svn// -m “Initial import”

Remember the to do the name when importing, otherwise you won't be able to do a proper checkout. After the import is done, you need to go to XCode>SCM>Repositories and do a checkout to a different directory. It should prompt you to automatically open the XCode project when it finishes.

To check if it's working fine, you can simply type something in some existing file and save, and you should see an M to the left of the Groups & Files sidebar, meaning it is modified and can then be committed at your will :D

2 comments:

Anthony Main said...

Hi,

I have been using XP-Dev for years but dont seem to be able to hook it up to Xcode. I am getting a slightly different error to you 155005 - Working copy not locked

I tried what you suggested anyway, but it has had no effect, did you have to do anything else to get XP-Dev to play nice?

Thanks

Anthony

ADmin said...

Supporting proof ought to be generally reported in the fancied reference style. over here is significant to escape written falsification of any sort while composing an article and recognize the source whenever it is implied.