Crash when updating to an older version when the working directory already contains files of that version. To reproduce: - clone of current crew repository, checkout of any recent revision should work, 74f54b7775f2 (current tip) definitely does $ hg revert -r 288dda59233c templates $ hg co 288dda59233c ** unknown exception encountered, details follow ** report bug details to http://mercurial.selenic.com/bts/ ** or mercurial@selenic.com ** Python 2.5.2 (r252:60911, Jan 24 2010, 14:53:14) [GCC 4.3.2] ** Mercurial Distributed SCM (version 1.6.3+19-581066a319e5) ** Extensions loaded: Traceback (most recent call last): File "/home/thomas/bin/hg-tah", line 19, in <module> mercurial.dispatch.run() File "/home/thomas/hg/repos/tah/mercurial/dispatch.py", line 16, in run sys.exit(dispatch(sys.argv[1:])) File "/home/thomas/hg/repos/tah/mercurial/dispatch.py", line 34, in dispatch return _runcatch(u, args) File "/home/thomas/hg/repos/tah/mercurial/dispatch.py", line 54, in _runcatch return _dispatch(ui, args) File "/home/thomas/hg/repos/tah/mercurial/dispatch.py", line 494, in _dispatch cmdpats, cmdoptions) File "/home/thomas/hg/repos/tah/mercurial/dispatch.py", line 355, in runcommand ret = _runcommand(ui, options, cmd, d) File "/home/thomas/hg/repos/tah/mercurial/dispatch.py", line 545, in _runcommand return checkargs() File "/home/thomas/hg/repos/tah/mercurial/dispatch.py", line 499, in checkargs return cmdfunc() File "/home/thomas/hg/repos/tah/mercurial/dispatch.py", line 492, in <lambda> d = lambda: util.checksignature(func)(ui, *args, **cmdoptions) File "/home/thomas/hg/repos/tah/mercurial/util.py", line 420, in check return func(*args, **kwargs) File "/home/thomas/hg/repos/tah/mercurial/commands.py", line 3851, in update return hg.update(repo, rev) File "/home/thomas/hg/repos/tah/mercurial/hg.py", line 381, in update stats = mergemod.update(repo, node, False, False, None) File "/home/thomas/hg/repos/tah/mercurial/merge.py", line 521, in update stats = applyupdates(repo, action, wc, p2, pa) File "/home/thomas/hg/repos/tah/mercurial/merge.py", line 274, in applyupdates fca = fcl.parents()[0] IndexError: list index out of range
not reproducible with 1.5 and 1.5.4
Result of bisect is, that the problem was introduced between 1.6.2 and 1.6.3. The first bad revision is: changeset: 12008:fad5ed0ff997 branch: stable parent: 12005:c6b1be675d3c user: Matt Mackall <mpm@selenic.com> date: Sat Aug 21 10:41:29 2010 -0500 summary: merge: move reverse-merge logic out of filemerge (issue2342)
Upgrading to urgent, because this is a regression in stable. (not critical, because no data loss happens)
hynekcer reported the same in issue2422 (exception IndexError in update after revert)
Fixed by http://hg.intevation.org/mercurial/crew/rev/545ec1775021 Matt Mackall <mpm@selenic.com> merge: handle no file parent in backwards merge (issue2364)
works for me, tested with 53cfde2b3cf9 (nearly 1.7)
--- Bug imported by bugzilla@serpentine.com 2012-05-12 09:12 EDT --- This bug was previously known as _bug_ 2364 at http://mercurial.selenic.com/bts/issue2364