Issues when used with dulwich 0.19
Created originally on Bitbucket by Anonymous
Hi there!
As far as I understand, hg-git currently cannot work with dulwich >= 0.19. This is what I get when trying to pull/push from/to a git repository through ssh:
aign@caelum:~/nice-repo$ hg pull -u pulling from git@server.ul.pt:nice-repo ** unknown exception encountered, please report by visiting ** https://mercurial-scm.org/wiki/BugTracker ** Python 2.7.14 (default, Mar 9 2018, 23:57:12) [GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.39.2)] ** Mercurial Distributed SCM (version 4.5.2) ** Extensions loaded: churn, graphlog, hggit, strip, mq, pager, purge, record Traceback (most recent call last): File "/usr/local/bin/hg", line 41, in dispatch.run() File "/usr/local/Cellar/mercurial/4.5.2/lib/python2.7/site-packages/mercurial/dispatch.py", line 88, in run status = (dispatch(req) or 0) & 255 File "/usr/local/Cellar/mercurial/4.5.2/lib/python2.7/site-packages/mercurial/dispatch.py", line 183, in dispatch ret = _runcatch(req) File "/usr/local/Cellar/mercurial/4.5.2/lib/python2.7/site-packages/mercurial/dispatch.py", line 324, in _runcatch return _callcatch(ui, _runcatchfunc) File "/usr/local/Cellar/mercurial/4.5.2/lib/python2.7/site-packages/mercurial/dispatch.py", line 332, in _callcatch return scmutil.callcatch(ui, func) File "/usr/local/Cellar/mercurial/4.5.2/lib/python2.7/site-packages/mercurial/scmutil.py", line 154, in callcatch return func() File "/usr/local/Cellar/mercurial/4.5.2/lib/python2.7/site-packages/mercurial/dispatch.py", line 314, in _runcatchfunc return _dispatch(req) File "/usr/local/Cellar/mercurial/4.5.2/lib/python2.7/site-packages/mercurial/dispatch.py", line 918, in _dispatch cmdpats, cmdoptions) File "/usr/local/Cellar/mercurial/4.5.2/lib/python2.7/site-packages/mercurial/dispatch.py", line 673, in runcommand ret = _runcommand(ui, options, cmd, d) File "/usr/local/Cellar/mercurial/4.5.2/lib/python2.7/site-packages/hgext/pager.py", line 77, in pagecmd return orig(ui, options, cmd, cmdfunc) File "/usr/local/Cellar/mercurial/4.5.2/lib/python2.7/site-packages/mercurial/dispatch.py", line 926, in _runcommand return cmdfunc() File "/usr/local/Cellar/mercurial/4.5.2/lib/python2.7/site-packages/mercurial/dispatch.py", line 915, in d = lambda: util.checksignature(func)(ui, *args, **strcmdopt) File "/usr/local/Cellar/mercurial/4.5.2/lib/python2.7/site-packages/mercurial/util.py", line 1195, in check return func(*args, **kwargs) File "/usr/local/Cellar/mercurial/4.5.2/lib/python2.7/site-packages/mercurial/util.py", line 1195, in check return func(*args, **kwargs) File "/usr/local/Cellar/mercurial/4.5.2/lib/python2.7/site-packages/hgext/mq.py", line 3583, in mqcommand return orig(ui, repo, *args, **kwargs) File "/usr/local/Cellar/mercurial/4.5.2/lib/python2.7/site-packages/mercurial/util.py", line 1195, in check return func(*args, **kwargs) File "/usr/local/Cellar/mercurial/4.5.2/lib/python2.7/site-packages/mercurial/commands.py", line 4038, in pull opargs=pullopargs).cgresult File "/Users/aign/Projects/extern/hg-git/hggit/util.py", line 60, in inner return f(*args, **kwargs) File "/Users/aign/Projects/extern/hg-git/hggit/init.py", line 388, in exchangepull pullop.cgresult = repo.githandler.fetch(remote.path, heads) File "/Users/aign/Projects/extern/hg-git/hggit/git_handler.py", line 272, in fetch result = self.fetch_pack(remote, heads) File "/Users/aign/Projects/extern/hg-git/hggit/git_handler.py", line 1235, in fetch_pack f.write, progress.progress) File "/Users/aign/Library/Python/2.7/lib/python/site-packages/dulwich/client.py", line 737, in fetch_pack proto, can_read = self._connect(b'upload-pack', path) File "/Users/aign/Library/Python/2.7/lib/python/site-packages/dulwich/client.py", line 1241, in _connect password=self.password, key_filename=self.key_filename) TypeError: run_command() got an unexpected keyword argument 'password'
Adding "password" and "key_filename" arguments to the "run_command()" method fixes the problem.
Best, Alexey