"TypeError: genpack() got an unexpected keyword argument 'ofs_delta'" error when pushing to github
Created originally on Bitbucket by Andrei Dziahel
Repro:
hg push
Expected: changes are pushed successfuly, as before.
Instead: pushing fails reporting following error
develop7@t-rex ~/p/develop7.github.com|(default|master)✓> hg push
pushing to git+ssh://git@github.com:develop7/develop7.github.com.git
searching for changes
** unknown exception encountered, please report by visiting
** https://mercurial-scm.org/wiki/BugTracker
** Python 2.7.14 (default, Oct 12 2017, 15:50:02) [GCC]
** Mercurial Distributed SCM (version 4.5.3)
** Extensions loaded: rebase, strip, schemes, graphlog, gpg, convert, eol, purge, record, shelve, patchbomb, histedit, churn, censor, evolve, transplant, hggit, extdiff, show
Traceback (most recent call last):
File "/usr/bin/hg", line 41, in <module>
dispatch.run()
File "/usr/lib64/python2.7/site-packages/mercurial/dispatch.py", line 88, in run
status = (dispatch(req) or 0) & 255
File "/usr/lib64/python2.7/site-packages/mercurial/dispatch.py", line 183, in dispatch
ret = _runcatch(req)
File "/usr/lib64/python2.7/site-packages/mercurial/dispatch.py", line 324, in _runcatch
return _callcatch(ui, _runcatchfunc)
File "/usr/lib64/python2.7/site-packages/mercurial/dispatch.py", line 332, in _callcatch
return scmutil.callcatch(ui, func)
File "/usr/lib64/python2.7/site-packages/mercurial/scmutil.py", line 154, in callcatch
return func()
File "/usr/lib64/python2.7/site-packages/mercurial/dispatch.py", line 314, in _runcatchfunc
return _dispatch(req)
File "/usr/lib64/python2.7/site-packages/mercurial/dispatch.py", line 918, in _dispatch
cmdpats, cmdoptions)
File "/usr/lib64/python2.7/site-packages/mercurial/dispatch.py", line 673, in runcommand
ret = _runcommand(ui, options, cmd, d)
File "/usr/lib64/python2.7/site-packages/mercurial/dispatch.py", line 926, in _runcommand
return cmdfunc()
File "/usr/lib64/python2.7/site-packages/mercurial/dispatch.py", line 915, in <lambda>
d = lambda: util.checksignature(func)(ui, *args, **strcmdopt)
File "/usr/lib64/python2.7/site-packages/mercurial/util.py", line 1195, in check
return func(*args, **kwargs)
File "/usr/lib64/python2.7/site-packages/mercurial/util.py", line 1195, in check
return func(*args, **kwargs)
File "/home/develop7/.local/lib/python2.7/site-packages/hgext3rd/evolve/__init__.py", line 796, in warnobserrors
return orig(ui, repo, *args, **kwargs)
File "/usr/lib64/python2.7/site-packages/mercurial/util.py", line 1195, in check
return func(*args, **kwargs)
File "/usr/lib64/python2.7/site-packages/mercurial/commands.py", line 4194, in push
opargs=opargs)
File "/usr/lib64/python2.7/site-packages/mercurial/extensions.py", line 344, in closure
return func(*(args + a), **kw)
File "/home/develop7/.local/lib/python2.7/site-packages/hgext3rd/evolve/__init__.py", line 827, in push
return orig(repo, *args, **opts)
File "/home/develop7/.local/lib/python2.7/site-packages/hggit/util.py", line 56, in inner
return f(*args, **kwargs)
File "/home/develop7/.local/lib/python2.7/site-packages/hggit/__init__.py", line 384, in exchangepush
pushop.cgresult = repo.githandler.push(remote.path, revs, force)
File "/home/develop7/.local/lib/python2.7/site-packages/hggit/git_handler.py", line 404, in push
old_refs, new_refs = self.upload_pack(remote, revs, force)
File "/home/develop7/.local/lib/python2.7/site-packages/hggit/git_handler.py", line 1113, in upload_pack
progress=callback)
File "/home/develop7/.local/lib/python2.7/site-packages/dulwich/client.py", line 704, in send_pack
ofs_delta=(CAPABILITY_OFS_DELTA in negotiated_capabilities))
TypeError: genpack() got an unexpected keyword argument 'ofs_delta'
In the meantime, git --git-dir=.hg/git push git@github.com:develop7/develop7.github.com.git master
works flawlessly.