hg 5.0 - TypeError: __init__() got an unexpected keyword argument 'copied'
Created originally on Bitbucket by muxator
hg-git seems to be unhappy about latest mercurial 5.0 (released today).
This is important, because TortoiseHg 5.0 is going to bundle in its Windows package the current hg-git version (5d688b5cc153), which has this incompatibility.
Example for hg clone with git+ssh protocol (the same happens when pulling or using git+https):
$ hg clone git+ssh://git@github.com/rtyley/small-test-repo.git
destination directory: small-test-repo
importing git objects into hg
** Unknown exception encountered with possibly-broken third-party extension hggit
** which supports versions 4.9 of Mercurial.
** Please disable hggit and try your action again.
** If that fixes the bug please report it to https://bitbucket.org/durin42/hg-git/issues
** Python 2.7.5 (default, Apr 9 2019, 14:30:50) [GCC 4.8.5 20150623 (Red Hat 4.8.5-36)]
** Mercurial Distributed SCM (version 5.0+2-724dae82c4bd)
** Extensions loaded: extdiff, hggit, histedit, shelve, show, strip, mq, rebase
Traceback (most recent call last):
File "/usr/bin/hg", line 43, in <module>
dispatch.run()
File "/usr/lib64/python2.7/site-packages/mercurial/dispatch.py", line 99, in run
status = dispatch(req)
File "/usr/lib64/python2.7/site-packages/mercurial/dispatch.py", line 225, in dispatch
ret = _runcatch(req) or 0
File "/usr/lib64/python2.7/site-packages/mercurial/dispatch.py", line 376, in _runcatch
return _callcatch(ui, _runcatchfunc)
File "/usr/lib64/python2.7/site-packages/mercurial/dispatch.py", line 384, in _callcatch
return scmutil.callcatch(ui, func)
File "/usr/lib64/python2.7/site-packages/mercurial/scmutil.py", line 167, in callcatch
return func()
File "/usr/lib64/python2.7/site-packages/mercurial/dispatch.py", line 367, in _runcatchfunc
return _dispatch(req)
File "/usr/lib64/python2.7/site-packages/mercurial/dispatch.py", line 1021, in _dispatch
cmdpats, cmdoptions)
File "/usr/lib64/python2.7/site-packages/mercurial/dispatch.py", line 756, in runcommand
ret = _runcommand(ui, options, cmd, d)
File "/usr/lib64/python2.7/site-packages/mercurial/dispatch.py", line 1030, in _runcommand
return cmdfunc()
File "/usr/lib64/python2.7/site-packages/mercurial/dispatch.py", line 1018, in <lambda>
d = lambda: util.checksignature(func)(ui, *args, **strcmdopt)
File "/usr/lib64/python2.7/site-packages/mercurial/util.py", line 1680, in check
return func(*args, **kwargs)
File "/usr/lib64/python2.7/site-packages/mercurial/commands.py", line 1573, in clone
depth=opts.get('depth') or None)
File "/usr/lib64/python2.7/site-packages/mercurial/hg.py", line 761, in clone
depth=depth)
File "/opt/mercurial/hg-git/hggit/util.py", line 60, in inner
return f(*args, **kwargs)
File "/opt/mercurial/hg-git/hggit/__init__.py", line 381, in exchangepull
pullop.cgresult = repo.githandler.fetch(remote.path, heads)
File "/opt/mercurial/hg-git/hggit/git_handler.py", line 292, in fetch
imported = self.import_git_objects(remote_name, filteredrefs)
File "/opt/mercurial/hg-git/hggit/git_handler.py", line 820, in import_git_objects
self.import_git_commit(commit)
File "/opt/mercurial/hg-git/hggit/git_handler.py", line 1052, in import_git_commit
node = self.repo.commitctx(ctx)
File "/usr/lib64/python2.7/site-packages/mercurial/localrepo.py", line 158, in wrapper
return orig(repo.unfiltered(), *args, **kwargs)
File "/usr/lib64/python2.7/site-packages/mercurial/localrepo.py", line 2590, in commitctx
fctx = ctx[f]
File "/usr/lib64/python2.7/site-packages/mercurial/context.py", line 83, in __getitem__
return self.filectx(key)
File "/usr/lib64/python2.7/site-packages/mercurial/context.py", line 2337, in filectx
return self._filectxfn(self._repo, self, path)
File "/usr/lib64/python2.7/site-packages/mercurial/context.py", line 2238, in getfilectx
cache[path] = func(repo, memctx, path)
File "/opt/mercurial/hg-git/hggit/git_handler.py", line 995, in getfilectx
copied=copied_path)
File "/opt/mercurial/hg-git/hggit/compat.py", line 156, in memfilectx
raise last_ex
TypeError: __init__() got an unexpected keyword argument 'copied'
==================
* Platform: linux
* hg version: 5.0+2-724dae82c4bd
* hg-git version: https://bitbucket.org/durin42/hg-git/commits/5d688b5cc153 (latest as of 2019-05-02)