comparison tests/test-evolve-topic.t @ 3532:68e99d2c6267 stable

prev: fix the breakage of `hg previous` from obsolete cset This patch fix the breakage of `hg prev` from obsolete changeset when topic is involved. We get the topicidx of it's succesor and proceed.
author Pulkit Goyal <7895pulkit@gmail.com>
date Fri, 16 Mar 2018 15:01:44 +0530
parents b3d2e0576d4c
children f06c502ce4b7
comparison
equal deleted inserted replaced
3531:b3d2e0576d4c 3532:68e99d2c6267
322 * 14 - {bar} 16d6f664b17c add ggg (draft) 322 * 14 - {bar} 16d6f664b17c add ggg (draft)
323 | 323 |
324 ~ 324 ~
325 325
326 $ hg prev 326 $ hg prev
327 ** Unknown exception encountered with possibly-broken third-party extension evolve 327 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
328 ** which supports versions 4.4 of Mercurial. 328 [14] add ggg
329 ** Please disable evolve and try your action again.
330 ** If that fixes the bug please report it to https://bz.mercurial-scm.org/
331 ** Python 2.7.12 (default, Dec 4 2017, 14:50:18) [GCC 5.4.0 20160609]
332 ** Mercurial Distributed SCM (version 4.5.2+1098-cdc73e5c75af)
333 ** Extensions loaded: rebase, evolve, topic
334 Traceback (most recent call last):
335 File "/tmp/hgtests.GW4RZg/install/bin/hg", line 41, in <module>
336 dispatch.run()
337 File "/tmp/hgtests.GW4RZg/install/lib/python/mercurial/dispatch.py", line 88, in run
338 status = (dispatch(req) or 0)
339 File "/tmp/hgtests.GW4RZg/install/lib/python/mercurial/dispatch.py", line 208, in dispatch
340 ret = _runcatch(req)
341 File "/tmp/hgtests.GW4RZg/install/lib/python/mercurial/dispatch.py", line 349, in _runcatch
342 return _callcatch(ui, _runcatchfunc)
343 File "/tmp/hgtests.GW4RZg/install/lib/python/mercurial/dispatch.py", line 357, in _callcatch
344 return scmutil.callcatch(ui, func)
345 File "/tmp/hgtests.GW4RZg/install/lib/python/mercurial/scmutil.py", line 154, in callcatch
346 return func()
347 File "/tmp/hgtests.GW4RZg/install/lib/python/mercurial/dispatch.py", line 339, in _runcatchfunc
348 return _dispatch(req)
349 File "/tmp/hgtests.GW4RZg/install/lib/python/mercurial/dispatch.py", line 943, in _dispatch
350 cmdpats, cmdoptions)
351 File "/tmp/hgtests.GW4RZg/install/lib/python/mercurial/dispatch.py", line 700, in runcommand
352 ret = _runcommand(ui, options, cmd, d)
353 File "/tmp/hgtests.GW4RZg/install/lib/python/mercurial/dispatch.py", line 951, in _runcommand
354 return cmdfunc()
355 File "/tmp/hgtests.GW4RZg/install/lib/python/mercurial/dispatch.py", line 940, in <lambda>
356 d = lambda: util.checksignature(func)(ui, *args, **strcmdopt)
357 File "/tmp/hgtests.GW4RZg/install/lib/python/mercurial/util.py", line 1497, in check
358 return func(*args, **kwargs)
359 File "/home/foobar/repo/mutable-history/hgext3rd/evolve/__init__.py", line 1052, in cmdprevious
360 opts.get('move_bookmark'), topic)
361 File "/home/foobar/repo/mutable-history/hgext3rd/evolve/__init__.py", line 995, in _findprevtarget
362 if currenttopic and topic and _gettopicidx(p1) != 1:
363 File "/home/foobar/repo/mutable-history/hgext3rd/evolve/__init__.py", line 957, in _gettopicidx
364 return getattr(ctx, 'topicidx', lambda: None)()
365 File "/home/foobar/repo/mutable-history/hgext3rd/topic/__init__.py", line 242, in _contexttopicidx
366 return revlist.index(self.rev())
367 File "/home/foobar/repo/mutable-history/hgext3rd/topic/stack.py", line 95, in index
368 return self.revs.index(item)
369 ValueError: 15 is not in list
370 [1]