hg-export-tool
hg-export-tool copied to clipboard
Program complains of uncommited changes when migrating a repository
Hello I was able to export a bunch of repos with this tool after resolving this issue #8, but I'm getting another error when trying to migrate a bigger repo. This time I have to use a branch map file because I don't want to turn mercurial's default into master since we're not using that branch.
I'm running:
python3.5 exporter.py repomap -B branch.map
And the output is:
Initialized empty Git repository in /tmp/repo-e8c7fddeb3204428e55979c4df3fef64/.git/
abort: uncommitted changes
(commit or update --clean to discard changes)
Traceback (most recent call last):
File "exporter.py", line 255, in <module>
main()
File "exporter.py", line 251, in main
BASH
File "exporter.py", line 175, in process_repo
amended_commits = fix_branches(hg_repo_copy)
File "exporter.py", line 120, in fix_branches
subprocess.check_call(['hg', 'up', head['hash']], cwd=hg_repo)
File "/usr/lib/python3.5/subprocess.py", line 581, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['hg', 'up', 'ab97f3427924cf7bd11b53e4a09332bb261fdefe']' returned non-zero exit status 255
After seeing this error message, I double-checked the status of the repo by running hg up --clean
but the repository was clean: 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
I've also tried migrating with a fresh checkout of the repository and withouth passing the branch mapping file and the error is the same.
I'm running python 3.5.2 and mercurial 5.4.1 and Linux Mint 18.1.
Thanks!