Hello, trying for the first time hg-git this morning on a Bionic Beaver everything ran smoothly, but installing it now on a Xenial Xerus laptop and using it, that exception was raised. Reporting it just in case it is useful. Thanks.
balqui@balqui-Latitude-7490:~/Escritorio/RemoteBackups/hgbb$ hg clone [email protected]:balqui/pydamelo.git pydamelo
importing git objects into hg
updating to branch default
14 files updated, 0 files merged, 0 files removed, 0 files unresolved
balqui@balqui-Latitude-7490:~/Escritorio/RemoteBackups/hgbb$ cd pydamelo/
balqui@balqui-Latitude-7490:~/Escritorio/RemoteBackups/hgbb/pydamelo$ hg commit -m'test on laptop'
balqui@balqui-Latitude-7490:~/Escritorio/RemoteBackups/hgbb/pydamelo$ hg push
pushing to [email protected]:balqui/pydamelo.git
searching for changes
adding objects
** unknown exception encountered, please report by visiting
** https://mercurial-scm.org/wiki/BugTracker
** Python 2.7.12 (default, Nov 12 2018, 14:36:49) [GCC 5.4.0 20160609]
** Mercurial Distributed SCM (version 3.7.3)
** Extensions loaded: hggit
Traceback (most recent call last):
File "/usr/bin/hg", line 43, in
mercurial.dispatch.run()
File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 55, in run
sys.exit((dispatch(request(sys.argv[1:])) or 0) & 255)
File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 121, in dispatch
ret = _runcatch(req)
File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 223, in _runcatch
return _dispatch(req)
File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 956, in _dispatch
cmdpats, cmdoptions)
File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 713, in runcommand
ret = _runcommand(ui, options, cmd, d)
File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 1087, in _runcommand
return checkargs()
File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 1047, in checkargs
return cmdfunc()
File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 953, in
d = lambda: util.checksignature(func)(ui, *args, **cmdoptions)
File "/usr/lib/python2.7/dist-packages/mercurial/util.py", line 993, in check
return func(args, **kwargs)
File "/usr/lib/python2.7/dist-packages/mercurial/commands.py", line 5739, in push
opargs=opts.get('opargs'))
File "/usr/lib/python2.7/dist-packages/mercurial/extensions.py", line 195, in closure
return func((args + a), **kw)
File "/usr/local/lib/python3.5/dist-packages/hggit/util.py", line 60, in inner
return f(*args, **kwargs)
File "/usr/local/lib/python3.5/dist-packages/hggit/init.py", line 412, in exchangepush
pushop.cgresult = repo.githandler.push(remote.path, revs, force)
File "/usr/local/lib/python3.5/dist-packages/hggit/git_handler.py", line 403, in push
old_refs, new_refs = self.upload_pack(remote, revs, force)
File "/usr/local/lib/python3.5/dist-packages/hggit/git_handler.py", line 1119, in upload_pack
progress=callback)
File "/usr/lib/python2.7/dist-packages/dulwich/client.py", line 532, in send_pack
objects = generate_pack_contents(have, want)
File "/usr/local/lib/python3.5/dist-packages/hggit/git_handler.py", line 1098, in genpack
return self.git.object_store.generate_pack_data(
AttributeError: 'DiskObjectStore' object has no attribute 'generate_pack_data'
Try updating dulwich
pip install dulwich --upgrade
Thanks for the idea, but I have the same problem after updating to very recent versions Mercurial 4.9.1, hggit 0.8.12, and dulwich 0.18.5 - on dulwich 0.19.11 there is another, different issue (module dulwich.errors not found) that I have reported on the dulwich page.
The same issue is being reported on the bitbucket project so I will watch it and see how this develops:
https://bitbucket.org/durin42/hg-git/issues/262/attributeerror-diskobjectstore-object-has
EDIT: The issue was solved by using dulwich 0.19.11 BUT installed via pip2 instead of via pip (!?). Leave this info here just in case anyone finds it useful.
I am trying to migrate my code from Mercurial to Git. I have Mercurial 3.9.2 installed in my system with hg-git from github (and i have pointed the hg-git repository in mercurial.ini file) with Python 2.7.15 and dulwich 0.19.11 . But i am getting the below error while doing so.
** unknown exception encountered, please report by visiting
** https://mercurial-scm.org/wiki/BugTracker
** Python 2.7.12 (v2.7.12:d33e0cf91556, Jun 27 2016, 15:24:40) [MSC v.1500 64 bit (AMD64)]
** Mercurial Distributed SCM (version 3.9.2)
** Extensions loaded: hggit
Traceback (most recent call last):
File "hg", line 45, in
File "mercurial\dispatch.pyc", line 59, in run
File "mercurial\dispatch.pyc", line 125, in dispatch
File "mercurial\dispatch.pyc", line 204, in _runcatch
File "mercurial\dispatch.pyc", line 880, in _dispatch
File "mercurial\dispatch.pyc", line 637, in runcommand
File "mercurial\dispatch.pyc", line 1010, in runcommand
File "mercurial\dispatch.pyc", line 971, in checkargs
File "mercurial\dispatch.pyc", line 877, in
File "mercurial\util.pyc", line 1036, in check
File "mercurial\commands.pyc", line 5975, in push
File "mercurial\extensions.pyc", line 210, in closure
File "C:/hg-git\hggit\util.py", line 60, in inner
return f(*args, **kwargs)
File "C:/hg-git\hggit_init.py", line 414, in exchangepush
pushop.cgresult = repo.githandler.push(remote.path, revs, force)
File "C:/hg-git\hggit\git_handler.py", line 405, in push
old_refs, new_refs = self.upload_pack(remote, revs, force)
File "C:/hg-git\hggit\git_handler.py", line 1120, in upload_pack
progress=callback)
File "dulwich\client.pyc", line 548, in send_pack
File "C:/hg-git\hggit\git_handler.py", line 1099, in genpack
return self.git.object_store.generate_pack_data(
AttributeError: 'DiskObjectStore' object has no attribute 'generate_pack_data'
It would be of great help if we could get a feasible solution for the same.
Thanks in advance !!