Clone wiki

Xcode4 with Mercurial / Home

Xcode4 with Mercurial

Xcode4 only support Git and does not provide plugin api. This script is a radical solution to bring Mercurial support into Xcode4

1/ get

wget --no-check-certificate

2/ you will need to find current Git binary used by Xcode 4 into your system

( be careful more than one Git could be installed on your system )-:
Depending of Xcode4 version, it could be :



/Developer/usr/bin/git <- this is the one for default Xcode 4 installation

/Applications/ ( Xcode >= 4.3) ...

3/ move git binary

example :

sudo cp /Applications/ \

New: use the name git.orig in the same directory, so that the script can revert to git when it's an actual git repository.

4/ customize

You should modify first line of with your python interpreter path (the one returned by "head `which hg`" is probably a good bet)

> head `which hg`
# mercurial - scalable distributed SCM
# Copyright 2005-2007 Matt Mackall <>
# This software may be used and distributed according to the terms of the
# GNU General Public License version 2 or any later version.

5/ copy hacked

sudo cp /Applications/
sudo chmod +x /Applications/

That's all ! you should be able to clone your preferred reposit from with Xcode4 Organizer ;-)

Xcode4 will use our git binary as usual ... except that mercurial will be used as backend

Note : if you got previous Mercurial reposit just create an empty .git folder at reposit root before Xcode4 import.

If you find a bug, uncomment this lignes in

#f = open('/Users/user/git.txt', 'a')
#f.write(' '.join(sys.argv))

and fill a ticket with /git.txt ( )