We’ve finally moved to Mercurial at work (well, we didn’t exactly move from anywhere, but that’s another story…). Our production server is running CentOS 4, which comes installed with Python 2.3.4. Mercurial requires 2.4. No Python updates available in the yum repository. What to do?
Convert git repository to mercurial
Ensure that the mercurial convert extension is enabled:
nano ~/.hgrc
Inside that file add:
[extensions]
hgext.convert=
Save. Now do:
hg convert my-git-repo
This will create a new directory called my-git-repo-hg. This will appear empty at first, so do this:
cd my-git-repo-hg
hg checkout
All of your files will appear and you’re ready to go.