Question

Since version 1.8.1 git is including Felipes git-remote-hg . Unfortunately fetching/cloning from a Hg repo with TortoiseGit 1.8.1 and Git for Windows 1.8.1.2 ends in the following error:

fatal: git was built without support for git-core\git-remote-hg (NO_PYTHON=YesPlease).

How do I get python support into my Git?

Was it helpful?

Solution

As mentioned in previous answers none of the msys based git solutions for Windows have python support. Eventually they may have time to add it but who knows when that will happen.

In the meantime, git-remote-hg does work with Cygwin's git. Here's what I did to try it out:

  1. Download the latest Cygwin setup.exe

  2. Run setup.exe and install latest git, mercurial, and openssl packages (in addition to whatever packages it wants to install). I installed mine in c:\cygwin.

  3. Download git-remote-hg and put it in c:\cygwin\bin. (There may be a more appropriate place to put this file, but I didn't bother to figure out where that might be.)

  4. I added c:\cygwin\bin to my PATH so I could use git commands from the Windows command prompt.

    It is worth noting that if you're using TortoiseHg or some other mercurial or python, putting c:\cygwin\bin in your path could cause those programs to misbehave. A more robust solution would be to make a .cmd file that modifies the PATH to include Cygwin's bin directory or just use Cygwin's bash shell.

  5. Find some hg repo to clone. (I created one at c:\hg\test and used hg serve).

  6. Clone with git:

    git clone hg::http://localhost:8000/

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top