qdel <patchidx> broken

Greg Ward greg at gerg.ca
Wed Jun 16 20:51:00 CDT 2010

I just discovered that

  hg qdel <patchidx>

is broken.  E.g.:

$ hg qdel -k 0
** unknown exception encountered, details follow
** report bug details to http://mercurial.selenic.com/bts/
** or mercurial at selenic.com
** Python 2.6.5 (r265:79063, Apr 16 2010, 13:09:56) [GCC 4.4.3]
** Mercurial Distributed SCM (version 1.5.4+92-7914628b4751)
** Extensions loaded: graphlog, mq, patchbomb, purge, share, extdiff, progress
Traceback (most recent call last):
  File "/home/greg/bin/hg", line 27, in <module>
  File "/home/greg/src/hg-crew/mercurial/dispatch.py", line 16, in run
  File "/home/greg/src/hg-crew/mercurial/dispatch.py", line 30, in dispatch
    return _runcatch(u, args)
  File "/home/greg/src/hg-crew/mercurial/dispatch.py", line 50, in _runcatch
    return _dispatch(ui, args)
  File "/home/greg/src/hg-crew/mercurial/dispatch.py", line 471, in _dispatch
    return runcommand(lui, repo, cmd, fullargs, ui, options, d)
  File "/home/greg/src/hg-crew/mercurial/dispatch.py", line 341, in runcommand
    ret = _runcommand(ui, options, cmd, d)
  File "/home/greg/src/hg-crew/mercurial/dispatch.py", line 522, in _runcommand
    return checkargs()
  File "/home/greg/src/hg-crew/mercurial/dispatch.py", line 476, in checkargs
    return cmdfunc()
  File "/home/greg/src/hg-crew/mercurial/dispatch.py", line 470, in <lambda>
    d = lambda: util.checksignature(func)(ui, *args, **cmdoptions)
  File "/home/greg/src/hg-crew/mercurial/util.py", line 408, in check
    return func(*args, **kwargs)
  File "/home/greg/src/hg-crew/hgext/mq.py", line 1716, in delete
    q.delete(repo, patches, opts)
  File "/home/greg/src/hg-crew/hgext/mq.py", line 764, in delete
    self._cleanup(patches, numrevs, opts.get('keep'))
  File "/home/greg/src/hg-crew/hgext/mq.py", line 707, in _cleanup
    del self.full_series[i]
TypeError: list indices must be integers, not NoneType

I bisected it back to this change:

The first bad revision is:
changeset:   11216:1abd9442727c
user:        Martin Geisler <mg at lazybytes.net>
date:        Mon May 24 00:55:42 2010 +0200
summary:     mq: remove unneeded local variable in delete

Martin, it looks like this was a minor code cleanup -- just back it out?

(But obviously there's a gap in the tests here...)


Greg Ward                                http://www.gerg.ca/
Predestination was doomed from the start.

More information about the Mercurial-devel mailing list