Search code examples
windowseclipsegitmercurialsubrepos

How can I make MercurialEclipse clone repo with a git subrepo under Windows?


I converted my svn subdirectory with svn:externals leading to github via its svn gateway into bitbucket and uploaded on bitbucket (I wanted to shift to DVCS, bitbucket allows personal repos so I can free my server from serving svn and having it on the net). I did via sshing to my server.

I also installed MercurialEclipse on my nb and wanted to clone my project (using Windows 7). It ended up with the error message

cloning subrepo vendor/jqmkt from git://github.com/herby/jquery-mochikit-tags.git abort: Systém nemôže nájsť zadaný súbor. Command line: D:\Herby\fbcanvas\vendor:hg -y update -r 14 -C --config ui.merge=internal:fail, error code: -1

(it uses localized hg.exe obviously, the message means "Cannot find the given file")

How can I make it clone the git subrepository? Or recommend different eclipse plugin that can.

If everything fails, I can probably use the old "svn gateway tactics", but I'd like to prevent it if possible.


Solution

  • Ok, the solution is:

    1. You need to install Git for Windows.
    2. During installation, you MUST select the third, most dangerous "Run Git and included Unix tools from Windows Command Prompt" option.
    3. Restart Eclipse.

    The culprit is git.exe which is not found (Git for Windows only puts git.cmd into the path when you select the second option in 2., which does not help for tools that are searching for git.exe explicitly (as hg.exe, the Mercurial executable, does).