I am aware of this post. I tried doing it this way to insert a mercurial project (namely the eigen project) into a given git project.
When I try to clone it, I get something like
Initialized empty Git repository in /tmp/.../.git/
Fordere alle ?nderungen an
F?ge ?nderungss?tze hinzu
F?ge Manifeste hinzu
F?ge Datei?nderungen hinzu
F?gte 8820 ?nderungss?tze mit 28623 ?nderungen an 2757 Dateien hinzu (+4 K?pfe)
Initialized empty Git repository in /tmp/multikopter/foo/.git/hgremote/
Error: repository has at least one unnamed head: hg r8485
git-fast-import statistics:
---------------------------------------------------------------------
Alloc'd objects: 5000
Total objects: 0 ( 0 duplicates )
blobs : 0 ( 0 duplicates 0 deltas of 0 attempts)
trees : 0 ( 0 duplicates 0 deltas of 0 attempts)
commits: 0 ( 0 duplicates 0 deltas of 0 attempts)
tags : 0 ( 0 duplicates 0 deltas of 0 attempts)
Total branches: 0 ( 0 loads )
marks: 1024 ( 0 unique )
atoms: 0
Memory total: 2282 KiB
pools: 2048 KiB
objects: 234 KiB
---------------------------------------------------------------------
pack_report: getpagesize() = 4096
pack_report: core.packedGitWindowSize = 1073741824
pack_report: core.packedGitLimit = 8589934592
pack_report: pack_used_ctr = 0
pack_report: pack_mmap_calls = 0
pack_report: pack_open_windows = 0 / 0
pack_report: pack_mapped = 0 / 0
---------------------------------------------------------------------
fatal: Couldn't find remote ref HEAD
fatal: The remote end hung up unexpectedly
When using the flag --force
this leads to a huge output and at least some commits get created in git as desired. However the process terminates with the output
Traceback (most recent call last):
File "/usr/share/hg-fast-export/hg-fast-export.py", line 387, in <module>
options.statusfile,authors=a,sob=options.sob,force=options.force))
File "/usr/share/hg-fast-export/hg-fast-export.py", line 298, in hg2git
ui,repo=setup_repo(repourl)
File "/usr/share/hg-fast-export/hg2git.py", line 34, in setup_repo
return myui,hg.repository(myui,url)
File "/usr/lib/python2.7/dist-packages/mercurial/hg.py", line 112, in repository
peer = _peerorrepo(ui, path, create)
File "/usr/lib/python2.7/dist-packages/mercurial/hg.py", line 102, in _peerorrepo
obj = _peerlookup(path).instance(ui, path, create)
File "/usr/lib/python2.7/dist-packages/mercurial/localrepo.py", line 2478, in instance
return localrepository(ui, util.urllocalpath(path), create)
File "/usr/lib/python2.7/dist-packages/mercurial/localrepo.py", line 217, in __init__
raise error.RepoError(_("repository %s not found") % path)
mercurial.error.RepoError: Projektarchiv nicht gefunden
The last text means repository not found
in German.
If I try to git hg fetch
or git hg pull
I get the exact same traceback. Further it seems that not all commits from the eigen library are part of the git repository just created. When comparing the latest commits from master
in git with the latest commits in mercurial one sees a dicrepancy of more than a year work (at least for me).
Can anybody verify this?
How can I overcome the problem? (GIT for the main project is set. The question is how to integrate the library in a matching version.)
Can anybody tell me a good alternative to git-hg
if that might help?