Closed Jayllyz closed 5 months ago
[This is a canned reply to issues that contain too little information for effective troubleshooting]
Please have a look at this blog post about writing effective bug reports. For fast-export you should at least:
Check that your issue is not already covered by an existing issue. If your issue is similar, but not identical to an existing issue, provide a reference.
Report the version of the fast-export you are running, tag and/or hash.
Check if your problem is solved by using the latest released hg-fast-export.
Check that your installed versions of Python and Mercurial meet the minimum requirements as specified in the README.
Explain what you are trying to do, how you are doing it and in what environment. This includes relevant parts of the used mapping files.
If your source repository is publicly available, give the URL.
If hg-fast-export gives an error message and a backtrace, include that in the issue. Also include the relevant parts of the crash report created by git fast-import
.
Hello, thanks for helping me.
I've a lot of repos to convert to git from mercurial, so I made a little script that do like suggested in your repository for all my repos (30~):
git init <repo>
cd <repo>
hg-fast-export.sh -r <repo> -a authors-git
git checkout #also tried HEAD
For all repos it works, expect one, the main repo so he is very huge, maybe it's the reason?
I've provided the error in my initial ticket, using latest python & mercurial (pip install mercurial). Sadly I can't share anything since it's private.
ps: issue template could be useful for bug reports.
git init <repo> cd <repo> hg-fast-export.sh -r <repo> -a authors-git git checkout #also tried HEAD
Thanks for the clarification.
git init
creates a repo and, by default, places you are on the master branch. If fast-export doesn't create a branch named master, Git will probably be unhappy, for illustration see the following:
$ git init foo
$ cd foo
$ git checkout HEAD
error: pathspec 'HEAD' did not match any file(s) known to git
$ git checkout master
error: pathspec 'master' did not match any file(s) known to git
$ git checkout
fatal: You are on a branch yet to be born
From the README's section about tag and branch naming: "By default, the default
mercurial branch is renamed to the master
branch on git. If your Mercurial repo contains both default
and master
branches, you'll need to override this behavior." My guess is that the Mercurial repo for which git checkout
fails when converted, did not have branch named master
nor a branch named default
. Try git branch --all
and check out one of the branches that do exist.
I've provided the error in my initial ticket, using latest python & mercurial (pip install mercurial).
You posted a single error message, followed by a screen shot of the statistics produced by git fast-import
, with no indication to the sequence of commands which produced that output. Instead of guessing, I prefer to ask for clarification.
Thanks!
tested with latest commit & latest release Looks like the script is working but then git checkout gives me :
error: pathspec 'HEAD' did not match any file(s) known to git