The Pre-requisites are Python, TortoiseHG and Mercurial, which you will probably already have. Fortunately these are available in a single package TortoiseHg 2.0.5 with Mercurial 1.8.4 for Windows.
Once you’ve installed and restarted Windows, these are the next steps:
- Open a Command Prompt and run
(this is a Python command in case you were wondering – it will run a python script and install Dulwich and hg-git)
- Edit your .hgrc file
(if you don’t have a .hgrc file, you will be asked if you want to create one)
- Enter the following lines into the file (If you already have a .hgrc file with an [extensions] line in, then obviously don’t repeat that line, put the other two lines below it)
[extensions] hgext.bookmarks = hggit = C:\Python26\Lib\site-packages\hg_git-0.2.6-py2.6.egg\hggit
(This is assuming that the Python installed is v2.6 and the hg-git extension is v0.2.6 – check the path to make sure you’ve specified it correctly)
- To check it’s all working correctly, go to a Command Prompt and change to a directory where you wish to download source code to, and then try to download the source for hg-git:
cd /d d:\Projects hg clone git://github.com/schacon/hg-git.git
Hopefully you won’t see any errors and when you list the hg-git folder, you’ll find a bunch of files and folders with the source code in.