Issue #24 open

Commit 62eece7dd02f "Update for compatibility with Mercurial 2.7+" breaks on hg 2.2.2

Kjell Andreassen
created an issue
hg shelve

crashes with

** unknown exception encountered, please report by visiting
**  http://mercurial.selenic.com/wiki/BugTracker
** Python 2.7.3rc2 (default, Apr 22 2012, 22:30:17) [GCC 4.6.3]
** Mercurial Distributed SCM (version 2.2.2)
** Extensions loaded: color, pager, graphlog, record, hgshelve, rebase, extdiff, mq
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 27, in run
    sys.exit((dispatch(request(sys.argv[1:])) or 0) & 255)
  File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 64, in dispatch
    return _runcatch(req)
  File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 87, in _runcatch
    return _dispatch(req)
  File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 696, in _dispatch
    cmdpats, cmdoptions)
  File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 472, in runcommand
    ret = _runcommand(ui, options, cmd, d)
  File "/usr/lib/python2.7/dist-packages/mercurial/extensions.py", line 184, in wrap
    return wrapper(origfn, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/hgext/pager.py", line 91, in pagecmd
    return orig(ui, options, cmd, cmdfunc)
  File "/usr/lib/python2.7/dist-packages/mercurial/extensions.py", line 184, in wrap
    return wrapper(origfn, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/hgext/color.py", line 362, in colorcmd
    return orig(ui_, opts, cmd, cmdfunc)
  File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 786, in _runcommand
    return checkargs()
  File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 757, in checkargs
    return cmdfunc()
  File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 693, in <lambda>
    d = lambda: util.checksignature(func)(ui, *args, **cmdoptions)
  File "/usr/lib/python2.7/dist-packages/mercurial/util.py", line 463, in check
    return func(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/mercurial/extensions.py", line 139, in wrap
    util.checksignature(origfn), *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/mercurial/util.py", line 463, in check
    return func(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/hgext/mq.py", line 3392, in mqcommand
    return orig(ui, repo, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/mercurial/util.py", line 463, in check
    return func(*args, **kwargs)
  File "/home/kjell/src/hgshelve/hgshelve.py", line 562, in shelve
    return cmdutil.commit(ui, repo, shelvefunc, pats, opts)
  File "/usr/lib/python2.7/dist-packages/mercurial/cmdutil.py", line 1294, in commit
    scmutil.match(repo[None], pats, opts), opts)
  File "/home/kjell/src/hgshelve/hgshelve.py", line 452, in shelvefunc
    chunks = filterpatch(ui, ac, not opts['all'])
  File "/home/kjell/src/hgshelve/hgshelve.py", line 322, in filterpatch
    _(' and ').join(map(repr, chunk.files())))
  File "/home/kjell/src/hgshelve/hgshelve.py", line 286, in prompt
    r = ui.promptchoice("%s %s" % (query, resps))
TypeError: promptchoice() takes at least 3 arguments (2 given)

Reverting the specific commit 62eece7dd02f makes it work again. This will break hgshelve for a lot of Debian 7 and LMDE users I think.

Comments (3)

  1. Oleg Oshmyan repo owner

    Yes, hence the hg-2.6 tag on f482f58b8054. 62eece7dd02f is an update to account for a backwards-incompatible change in Mercurial 2.7. Perhaps I’ll add cross-version compatibility someday, so I’ll leave this issue open, but the immediate answer is that tag hg-2.6 is the last version that supports Mercurial 2.2–2.6.

    I’m going to port applicable changes from the record extension soon. I think I’ll look at cross-version compatibility with Mercurial right after that.

  2. Log in to comment