10

I have tried the instructions from this SO post:

cd ~
git clone git://repo.or.cz/fast-export.git
git init git_repo
cd git_repo
~/fast-export/hg-fast-export.sh -r /path/to/old/mercurial_repo
git checkout HEAD

However when doing git checkout HEAD it throws:

error: pathspec 'HEAD' did not match any file(s) known to git

What is the work-around for this?

Update:

I managed to install mercurial-python howen when I try to import still it would not work, the error is:

Error: No --marks option given

When doing:

C:\fast-export\hg-fast-export.py -r C:\path\to\repo
Community
  • 1
  • 1
quarks
  • 33,478
  • 73
  • 290
  • 513

1 Answers1

9

Try running hg-fast-export.sh instead of hg-fast-export.py. It looks like the shell wrapper includes an option for --marks for you.

ChrisGPT was on strike
  • 127,765
  • 105
  • 273
  • 257
  • In Windows it throws './hg-fast-export.py' No such file of directory – quarks Dec 21 '13 at 19:23
  • 1
    `hg-fast-export` doesn't appear to be designed for (or tested on) Windows, as it lacks a `.bat` wrapper. If you want to try it anyway, try this: ``hg-fast-export.py -r path\to\hg\repo --marks .git\hg2git-marks --mapping .git\hg2git-mapping --heads .git\hg2git-heads --status .git\hg2git-state``. This is roughly taken from the shell wrapper. There is some caching and stuff that we're not doing here, but it shouldn't break. You may have to create an empty `.git\hg2git-marks` file first. – ChrisGPT was on strike Dec 21 '13 at 19:37
  • 6
    I know this is 3 years later, but it took me a day and half trying to work all this out. Adding the `--marks ...` stuff above to the Python call doesn't work, but if you're doing this in Windows, **use the Git bash**. In there, you can use the shell script and it works just fine. – rodeo90 Aug 25 '16 at 18:02
  • it still does not work on windows for me even from under Git bash. – EgoPingvina Aug 21 '20 at 13:26