Which SCM system for Xcode?

2020-02-03 04:45发布

I am developing an application for the Mac as a small team (me + another person) effort. We are located in different cities, and have started to see the need for solid source control management.

None of us have any experience with this, and both of us are relatively new to Cocoa/Obj-C/Xcode (but do have C knowledge).

Does anyone have any recommendations as to which SCM system to choose? I understand that a lot of people are using Subversion, which is also supported in Xcode 3.1. Does anyone have experience with using Subversion through Xcode? Or is it a better option to chose a stand alone GUI alternative, such as Versions?

Grateful for any input on this.

Gregor Tomasevic, Sweden

Update/personal experiences: Since this post, we have tried Versions and Cornerstone (both of which are SVN GUI-clients), as well as Xcodes built-in support for SVN. We were not particularly pleased with Versions, which seemed to have some problems with committing unversioned files/build files. The built-in SVN support in Xcode works quite well, although it probably has limitations that we have still not run into. Cornerstone is both simple to use and powerful, and does not seem to suffer from the problems we encountered with Versions.

So far, we have just tried committing, updating repo, checking out latest/previous versions of our files and worked some with file comparison. It might be a whole different ball game once you start working extensively with branching, an area which we have been told both these GUI clients might have some weaknesses in.

For what it's worth (and with only days of evaluation) Cornerstone seems to be a somewhat better alternative, although for simpler SCM, Xcode works well too.

Thanks for all the comments.

10条回答
萌系小妹纸
2楼-- · 2020-02-03 04:51

If you're interested in using Mercurial on OS X, try SourceTree, it's not free but it's competitively priced and has a very polished Mac OS feel. I've been using it for personal projects for the last few months on and off and find it intuitive and reasonably robust.

It's available through the Mac App Store and supports Git and Mercurial. They have a website at http://www.sourcetreeapp.com/ with more information.

查看更多
贼婆χ
3楼-- · 2020-02-03 04:52

There is a nice GUI frontend for Mercurial on Mac called MacHG: http://jasonfharris.com/machg/

It is free and very nice IMHO.

查看更多
Deceive 欺骗
4楼-- · 2020-02-03 04:52

Xcode's Subversion support is pretty good. 90% of the SVN activities I perform are easily doable from Xcode. For the other few things I just fire up Terminal.

There are a couple things in their SVN client implementation that are annoying:

  • The code that checks to see which local files have been modified seems to run on a background timer, and its pretty latent. Sometime it takes 5 minutes for Xcode to show a file as modified. The same thing is even more exaggerated w/r/t remote modifications.
  • Sometimes when you rename or delete a file that isn't under source control, a dialog will appear, asking "Do you wish to [rename/delete] this file in SVN as well?" And the options are "Yes" or "Cancel." You choose Yes out of desperation only to be presented with a well-deserved SVN error.

Overall, I'd recommend it.

查看更多
唯我独甜
5楼-- · 2020-02-03 04:57

Mercurial (like git) is "distributed" and perhaps regarded as more modern and up-and-coming than svn (but less established). If you want to auto-checkin using mercurial, you can add the line:

hg commit -m "Xcode auto commit"

as part of a "Run Script" stage of the XCode build, as found in: Project > New Build Phase > New Run Script BUild Phase

查看更多
不美不萌又怎样
6楼-- · 2020-02-03 05:02

Xcode only supports Subversion, Perforce, and CVS. However, there are also distributed version control systems out there, such as Mercurial, Bazaar, and Git. These have no Mac-native GUIs, but you should still consider them. Personally, I love managing my projects in Mercurial repositories.

[Added 2011-03-10] Xcode 4 adds support for Git. Several of us have filed requests for Mercurial support; you should, too, if you want it.

查看更多
姐就是有狂的资本
7楼-- · 2020-02-03 05:10

Caveat: If you simply tell XCode to add a project to a repository by giving it the top-level dir, it WILL add the build directory to the repository, which of course is a terrible thing to do.

In order to get around this you have to move the build dir to another location so that XCode won't try to import it, or manually add the discrete folders of a project one by one.

查看更多
登录 后发表回答