Hello everyone,
I am trying to convert a Mercurial repository to Git using hg-git and I am getting the following error from hg-git: AttributeError: 'DiskObjectStore' object has no attribute 'find_missing_objects'.
Here is what I am doing:
mkdir GitRepo
cd GitRepo
git init --bare
cd ../HgRepo
hg bookmarks hg
hg push ../GitRepo
After a while, hg-git fails with the following error stack:
Traceback (most recent call last):
File "/usr/bin/hg", line 43, in <module>
dispatch.run()
File "/usr/lib/python3/dist-packages/mercurial/dispatch.py", line 113, in run
status = dispatch(req)
File "/usr/lib/python3/dist-packages/mercurial/dispatch.py", line 303, in dispatch
ret = _runcatch(req) or 0
File "/usr/lib/python3/dist-packages/mercurial/dispatch.py", line 479, in _runcatch
return _callcatch(ui, _runcatchfunc)
File "/usr/lib/python3/dist-packages/mercurial/dispatch.py", line 488, in _callcatch
return scmutil.callcatch(ui, func)
File "/usr/lib/python3/dist-packages/mercurial/scmutil.py", line 153, in callcatch
return func()
File "/usr/lib/python3/dist-packages/mercurial/dispatch.py", line 469, in _runcatchfunc
return _dispatch(req)
File "/usr/lib/python3/dist-packages/mercurial/dispatch.py", line 1232, in _dispatch
return runcommand(
File "/usr/lib/python3/dist-packages/mercurial/dispatch.py", line 917, in runcommand
ret = _runcommand(ui, options, cmd, d)
File "/usr/lib/python3/dist-packages/mercurial/dispatch.py", line 1244, in _runcommand
return cmdfunc()
File "/usr/lib/python3/dist-packages/mercurial/dispatch.py", line 1230, in <lambda>
d = lambda: util.checksignature(func)(ui, *args, **strcmdopt)
File "/usr/lib/python3/dist-packages/mercurial/util.py", line 1867, in check
return func(*args, **kwargs)
File "/usr/lib/python3/dist-packages/mercurial/util.py", line 1867, in check
return func(*args, **kwargs)
File "/usr/lib/python3/dist-packages/hgext/largefiles/overrides.py", line 1016, in overridepush
return orig(ui, repo, *args, **kwargs)
File "/usr/lib/python3/dist-packages/mercurial/util.py", line 1867, in check
return func(*args, **kwargs)
File "/usr/lib/python3/dist-packages/mercurial/commands.py", line 5532, in push
pushop = exchange.push(
File "/home/bpe/.hgext/hg-git/hggit/util.py", line 96, in inner
return f(*args, **kwargs)
File "/home/bpe/.hgext/hg-git/hggit/gitrepo.py", line 229, in exchangepush
pushop.cgresult = repo.githandler.push(
File "/home/bpe/.hgext/hg-git/hggit/git_handler.py", line 500, in push
old_refs, new_refs = self.upload_pack(remote, revs, bookmarks, force)
File "/home/bpe/.hgext/hg-git/hggit/git_handler.py", line 1448, in upload_pack
new_refs = self._call_client(
File "/home/bpe/.hgext/hg-git/hggit/git_handler.py", line 1637, in _call_client
ret = func(path, *args, **kwargs)
File "/usr/local/lib/python3.9/dist-packages/dulwich/client.py", line 1108, in send_pack
pack_data_count, pack_data = generate_pack_data(
File "/home/bpe/.hgext/hg-git/hggit/git_handler.py", line 1419, in genpack
missing = self.git.object_store.find_missing_objects(
AttributeError: 'DiskObjectStore' object has no attribute 'find_missing_objects'
Could you help me?
Here are the versions I am using:
Debian 11.6
HG 5.6.1
Git 2.30.2
Python 3.9.2
dulwich python module 0.21.2
Thanks in advance
Ben