[issue2664] qpush fails with infinite recursion in _findtags when status file is wrong

timeless bugs at mercurial.selenic.com
Sun Feb 27 05:57:24 CST 2011


New submission from timeless <timeless at gmail.com>:

steps:

hg init x;
cd x;
hg qnew y;
cp .hg/patches/status .hg/patches/evil;
hg qpop;
mv .hg/patches/evil .hg/patches/status;
hg qpush

results:

> /home/timeless/lib/python/mercurial/dispatch.py(57)_runcatch()
-> try:
(Pdb) Traceback (most recent call last):
  File "/home/timeless/lib/python/mercurial/dispatch.py", line 58, in _runcatch
    return _dispatch(ui, args)
  File "/home/timeless/lib/python/mercurial/dispatch.py", line 599, in _dispatch
    cmdpats, cmdoptions)
  File "/home/timeless/lib/python/mercurial/dispatch.py", line 406, in
runcommand
    ret = _runcommand(ui, options, cmd, d)
  File "/home/timeless/lib/python/mercurial/dispatch.py", line 653, in
_runcommand
    return checkargs()
  File "/home/timeless/lib/python/mercurial/dispatch.py", line 607, in checkargs
    return cmdfunc()
  File "/home/timeless/lib/python/mercurial/dispatch.py", line 596, in <lambda>
    d = lambda: util.checksignature(func)(ui, *args, **cmdoptions)
  File "/home/timeless/lib/python/mercurial/util.py", line 429, in check
    return func(*args, **kwargs)
  File "/home/timeless/lib/python/hgext/mq.py", line 2396, in push
    exact=opts.get('exact'))
  File "/home/timeless/lib/python/hgext/mq.py", line 1047, in push
    for b, ls in repo.branchmap().iteritems():
  File "/home/timeless/lib/python/mercurial/localrepo.py", line 439, in
branchmap
    self.updatebranchcache()
  File "/home/timeless/lib/python/mercurial/localrepo.py", line 433, in
updatebranchcache
    self._branchtags(partial, lrev)
  File "/home/timeless/lib/python/hgext/mq.py", line 2979, in _branchtags
    if qbasenode not in self:
  File "/home/timeless/lib/python/mercurial/localrepo.py", line 209, in
__contains__
    return bool(self.lookup(changeid))
  File "/home/timeless/lib/python/mercurial/localrepo.py", line 533, in lookup
    if key in self.tags():
  File "/home/timeless/lib/python/mercurial/localrepo.py", line 332, in tags
    (self._tags, self._tagtypes) = self._findtags()
  File "/home/timeless/lib/python/hgext/mq.py", line 2954, in _findtags
    if mqtags[-1][0] not in self:
  File "/home/timeless/lib/python/mercurial/localrepo.py", line 209, in
__contains__
    return bool(self.lookup(changeid))
  File "/home/timeless/lib/python/mercurial/localrepo.py", line 533, in lookup
    if key in self.tags():
  File "/home/timeless/lib/python/mercurial/localrepo.py", line 332, in tags
    (self._tags, self._tagtypes) = self._findtags()
  File "/home/timeless/lib/python/hgext/mq.py", line 2954, in _findtags

...
RuntimeError: maximum recursion depth exceeded in <random-function>

Yes this is user error. no this isn't how i triggered it (i copied a
.hg/patches directory from another repo). we should handle this better anyway.

----------
messages: 15418
nosy: timeless
priority: bug
status: chatting
title: qpush fails with infinite recursion in _findtags when status file is wrong
topic: mq

____________________________________________________
Mercurial issue tracker <bugs at mercurial.selenic.com>
<http://mercurial.selenic.com/bts/issue2664>
____________________________________________________


More information about the Mercurial-devel mailing list