Setting up SVN and Xcode

Discussion in 'Mac Programming' started by Eraserhead, May 17, 2007.

  1. Eraserhead macrumors G4

    Eraserhead

    Joined:
    Nov 3, 2005
    Location:
    UK
    #1
    I have decided to make my program open-source and to allow other people to contribute want to setup SVN. I know absolutely nothing about it, and I am wondering how you can get it to work with Xcode (which appears to have built in support)?

    Also how do you set permissions so that you can check what changes have been made and to stop anonymous contributions?


    Also is there anything someone who knows nothing about SVN/Subversion should know?


    Thanks
     
  2. ChrisA macrumors G4

    Joined:
    Jan 5, 2006
    Location:
    Redondo Beach, California
    #2
    First you need a server that is on the public internet. SVN is not so usfull if others can't get to it. You best option is to get an account on Source Forge. They offer free acounts to open source projects and provide CVS (I don't think they use SVN?) email lists, web space and a bug tracking system. Everything you will need. Much better to use their service then set up you own. Also when peole are searching for a project they might think to search Source Forge but would never in a million years think to look on your server
    http://sourceforge.net/
     
  3. kainjow Moderator emeritus

    kainjow

    Joined:
    Jun 15, 2000
    #3
  4. Eraserhead thread starter macrumors G4

    Eraserhead

    Joined:
    Nov 3, 2005
    Location:
    UK
    #4
    OK it's hosted with Google Code, but I don't understand how you get Xcode to connect to the Google Code source repository without just using the command line.
     
  5. kainjow Moderator emeritus

    kainjow

    Joined:
    Jun 15, 2000
    #5
    I do not believe Xcode can do checkouts. So I think you have to do that with Terminal:

    Code:
    svn co http://code.google.com/...
    You will probably have to add your .xcodeproj to the repository:

    Code:
    svn add *.xcodeproj
    svn commit
    Then you should be able to open your Xcode project, Get Info on your project in the Groups & Files column, and then enable it:

    View attachment 74469

    Then right-click the Groups & Files column, and check SCM. That will show the Subversion status of each file in your Xcode project.

    View attachment 74470
     
  6. GeeYouEye macrumors 68000

    GeeYouEye

    Joined:
    Dec 9, 2001
    Location:
    State of Denial
    #6
    I've had nothing but trouble with any SCM system and Xcode. But it's fixed in Leopard w/Xcode 3. Very simple, very usable.
     
  7. lazydog macrumors 6502a

    Joined:
    Sep 3, 2005
    Location:
    Cramlington, UK
    #7
    I look forward to Xcode 3.

    I have had problems with Xcode and SCM (Subversion) too. I think I've nearly narrowed down the cause for the problem I'm having though. It seems if I add a directory by reference (blue folder icons rather than yellow) which is not source code managed, ie not in a repository, then Xcode will loose track of which source files have been updated or are out of date. For example if I modify a file then it shows up as modifed in the SCM list as you would expect. If I then quite Xcode then go back in, that same file is no longer flagged as modified. No matter how many times I hit 'refresh project' Xcode will not see that file as modified. If I delete the referenced folder (which has is not attached to any repository) then Xcode will see the modified file and everything works as you would expect.

    b e n
     
  8. ExoticFish macrumors 6502a

    ExoticFish

    Joined:
    Dec 3, 2002
    Location:
    The inner depths of madness, aka Kent, OH
    #8
    I only ever use SVN in Xcode to look at revision comments and using FileMerge. Everything else I just feel more comfortable using the command line.

    But I'm pretty sure kainjow is right and you can't actually checkout using Xcode.
     
  9. Eraserhead thread starter macrumors G4

    Eraserhead

    Joined:
    Nov 3, 2005
    Location:
    UK
    #9
    Well terminal works. Thanks for the info guys :). I'm looking forward to Leopard more now!
     
  10. sujithkrishnan macrumors 6502

    Joined:
    May 9, 2008
    Location:
    Bangalore
    #10

    Terminal is quite good....

    1. svn co <url>
    2. svn add <filename>
    3. svn delete <filename>
    4. svn commit -m <message>

    I think this much pretty enough to do basic SVN stuff.

    If you want to to compare use "svn diff" . .
     
  11. Eraserhead thread starter macrumors G4

    Eraserhead

    Joined:
    Nov 3, 2005
    Location:
    UK
    #11
    ^^ Thanks, I've been using SVN on the command line for a while and can use it effectively, but a GUI is nicer if its available.
     
  12. Krevnik macrumors 68030

    Krevnik

    Joined:
    Sep 8, 2003
    #12
    XCode can make checkouts in 3.x.

    I wouldn't use it for imports due to a bug which prevents you from importing, making directories/etc into the root of a SVN repo. I filed a bug way, way back... still haven't seen it fixed yet.
     
  13. Eraserhead thread starter macrumors G4

    Eraserhead

    Joined:
    Nov 3, 2005
    Location:
    UK
    #13
    Not with SSH+SVN which Sourceforge uses.

    Apple have really ****ed up their SCM support in Xcode (though to be fair Microsoft Sourcesafe is worse).
     
  14. Krevnik macrumors 68030

    Krevnik

    Joined:
    Sep 8, 2003
    #14
    Last time I checked, it works, but I also use public key auth on my own servers, which may help. I don't think I have done much with SSH+SVN using actual passwords, but I don't see why it won't work if you specify the username/password correctly.
     
  15. Gruffalo macrumors newbie

    Gruffalo

    Joined:
    Jan 27, 2006
    #15
    I'm coming into this a bit late but....what about not going with SVN at all and trying out one of the DVCS systems instead, Mercurial, Git, Bazzar etc? Personally, I'd go with Mercurial, using Bitbucket as a backup/public repository. The huge benefit is the the local copy contains the entire history and you can work as well disconnected from the central repository as you can connected.

    Disclaimer: I confess I've never even attempted to use the built in SVN support in Xcode, so I don't know what benefits it offers or what you would lose if you didn't use it.
     

Share This Page