On Thu, Sep 26, 2013 at 12:42:59PM +0200, Jelmer Vernooij wrote: > On Wed, Sep 25, 2013 at 11:43:23PM -0400, James McCoy wrote: > > Package: mercurial-git > > Version: 0.4.0-1 > > Severity: important > > Tags: upstream > > Forwarded: https://github.com/schacon/hg-git/pull/267 > > > > dulwich made some API changes in 0.9.1 which break mercurial-git. > > There's a patch in the forwarded URL. > > FWIW This should just cause a deprecation warning to be printed; it > shouldn't break mercurial-git. If it does, can you please add a backtrace?
mercurial-git implements its own SSHVendor[0], which doesn't happen to derive from dulwich's. It just implements the interface. I'll amend my suggested fix to have it also derive from dulwich's SSHVendor, since that may make failures clearer in the future. [0]: https://github.com/schacon/hg-git/blob/master/hggit/_ssh.py Even if it had derived properly, the deprecation warning would only have been emitted if it had already implemented a run_command method. There was no reason for it to do so though since the code was written against an earlier version of dulwich. Instead, NotImplementedError is raised. The add_pack API change leads to this backtrace: $ hg pull ../gitrepo1 pulling from ../gitrepo1 importing git objects into hg (run 'hg heads' to see heads) ** Unknown exception encountered with possibly-broken third-party extension hggit ** which supports versions 2.3.1 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, Sep 17 2013, 15:31:50) [GCC 4.8.1] ** Mercurial Distributed SCM (version 2.7.1) ** Extensions loaded: hggit, graphlog Traceback (most recent call last): File "/usr/bin/hg", line 38, in <module> mercurial.dispatch.run() File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 28, in run sys.exit((dispatch(request(sys.argv[1:])) or 0) & 255) File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 69, in dispatch ret = _runcatch(req) File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 97, in _runcatch return _dispatch(req) File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 778, in _dispatch cmdpats, cmdoptions) File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 549, in runcommand ret = _runcommand(ui, options, cmd, d) File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 869, in _runcommand return checkargs() File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 840, in checkargs return cmdfunc() File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 775, in <lambda> d = lambda: util.checksignature(func)(ui, *args, **cmdoptions) File "/usr/lib/python2.7/dist-packages/mercurial/util.py", line 506, in check return func(*args, **kwargs) File "/usr/lib/python2.7/dist-packages/mercurial/commands.py", line 4580, in pull remotebookmarks = other.listkeys('bookmarks') File "/home/jamessan/src/hg-git/hggit/gitrepo.py", line 59, in listkeys refs = handler.fetch_pack(self.path) File "/home/jamessan/src/hg-git/hggit/git_handler.py", line 1011, in fetch_pack f, commit = self.git.object_store.add_pack() ValueError: too many values to unpack The rename of connect_ssh to run_command leads to this backtrace: $ hg push github pushing to git+ssh://g...@github.com/jamessan/vim.git ** Unknown exception encountered with possibly-broken third-party extension git ** which supports versions 2.3.1 of Mercurial. ** Please disable git 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, Sep 17 2013, 15:31:50) [GCC 4.8.1] ** Mercurial Distributed SCM (version 2.7.1) ** Extensions loaded: color, git, graphlog, hgk, mq, pager, purge, record, rebase Traceback (most recent call last): File "/usr/bin/hg", line 38, in <module> mercurial.dispatch.run() File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 28, in run sys.exit((dispatch(request(sys.argv[1:])) or 0) & 255) File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 69, in dispatch ret = _runcatch(req) File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 97, in _runcatch return _dispatch(req) File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 778, in _dispatch cmdpats, cmdoptions) File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 549, in runcommand ret = _runcommand(ui, options, cmd, d) File "/usr/lib/python2.7/dist-packages/mercurial/extensions.py", line 188, in wrap return wrapper(origfn, *args, **kwargs) File "/usr/lib/python2.7/dist-packages/hgext/pager.py", line 132, in pagecmd return orig(ui, options, cmd, cmdfunc) File "/usr/lib/python2.7/dist-packages/mercurial/extensions.py", line 188, in wrap return wrapper(origfn, *args, **kwargs) File "/usr/lib/python2.7/dist-packages/hgext/color.py", line 412, in colorcmd return orig(ui_, opts, cmd, cmdfunc) File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 869, in _runcommand return checkargs() File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 840, in checkargs return cmdfunc() File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 775, in <lambda> d = lambda: util.checksignature(func)(ui, *args, **cmdoptions) File "/usr/lib/python2.7/dist-packages/mercurial/util.py", line 506, in check return func(*args, **kwargs) File "/usr/lib/python2.7/dist-packages/mercurial/extensions.py", line 143, in wrap util.checksignature(origfn), *args, **kwargs) File "/usr/lib/python2.7/dist-packages/mercurial/util.py", line 506, in check return func(*args, **kwargs) File "/usr/lib/python2.7/dist-packages/hgext/mq.py", line 3531, in mqcommand return orig(ui, repo, *args, **kwargs) File "/usr/lib/python2.7/dist-packages/mercurial/util.py", line 506, in check return func(*args, **kwargs) File "/usr/lib/python2.7/dist-packages/mercurial/commands.py", line 4694, in push newbranch=opts.get('new_branch')) File "/usr/lib/python2.7/dist-packages/hgext/git/hgrepo.py", line 22, in push return git.push(remote.path, revs, force) File "/usr/lib/python2.7/dist-packages/hgext/git/git_handler.py", line 276, in push old_refs, new_refs = self.upload_pack(remote, revs, force) File "/usr/lib/python2.7/dist-packages/hgext/git/git_handler.py", line 917, in upload_pack new_refs = client.send_pack(path, changed, genpack) File "/usr/lib/python2.7/dist-packages/dulwich/client.py", line 454, in send_pack proto, unused_can_read = self._connect('receive-pack', path) File "/usr/lib/python2.7/dist-packages/dulwich/client.py", line 817, in _connect con = get_ssh_vendor().run_command( AttributeError: '_Vendor' object has no attribute 'run_command' -- James GPG Key: 4096R/331BA3DB 2011-12-05 James McCoy <james...@debian.org>
signature.asc
Description: Digital signature