Skip to content

Instantly share code, notes, and snippets.

Created July 1, 2011 19:57
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save mmlin/1059280 to your computer and use it in GitHub Desktop.
Save mmlin/1059280 to your computer and use it in GitHub Desktop.
Installing hg-git on Windows using MinGW
Here's how I installed hg-git on Windows using the MinGW compiler.
- Install Python (
- Install the Python package manager, setuptools (
- Install the MinGW installer (
- Install the C compiler, MinGW gcc, and a utility, pexports, to help create the import library
> mingw-get install gcc
> mingw-get install mingw-utils
Create an import library for MinGW gcc (
> cd c:\python26\libs
> pexports c:\windows\system32\python26.dll > python26.def
> dlltool -C -d python26.def -l libpython26.a
> nm libpython26.a # shows you the exported symbols with "I" (as import symbol)
- Configure the package manager to use the new C compiler
In C:\Python26\Lib\distutils\, create distutils.cfg with this content:
> easy_install hg-git
> notepad .hgrc
hgext.bookmarks =
hggit = C:\Python26\Lib\site-packages\hg_git-0.2.6-py2.6.egg\hggit
$ cd hg-git # (a Mercurial repository)
$ hg bookmark -r default master # make a bookmark of master for default, so a ref gets created
$ hg push git+ssh://
$ hg push
Copy link

vkotovv commented Jun 16, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment