comparison tests/test-evolve-abort.t @ 3776:2d450974bb1c stable

evolve: fix `hg abort` when hg next --evolve leads to conflicts (issue5897) Before this patch, if you do `hg next --evolve` and end up having conflicts and then you try `hg abort`, it will throw a KeyError. This patch fixes that.
author Pulkit Goyal <7895pulkit@gmail.com>
date Sun, 27 May 2018 02:32:58 +0530
parents fa7b94606024
children 5ca297e78f2c
comparison
equal deleted inserted replaced
3775:fa7b94606024 3776:2d450974bb1c
513 fix conflict and run 'hg evolve --continue' or use 'hg evolve --abort' to abort 513 fix conflict and run 'hg evolve --continue' or use 'hg evolve --abort' to abort
514 abort: unresolved merge conflicts (see hg help resolve) 514 abort: unresolved merge conflicts (see hg help resolve)
515 [255] 515 [255]
516 516
517 $ hg evolve --abort 517 $ hg evolve --abort
518 ** unknown exception encountered, please report by visiting 518 evolve aborted
519 ** https://mercurial-scm.org/wiki/BugTracker 519 working directory is now at c1f4718020e3
520 ** Python 2.7.12 (default, Dec 4 2017, 14:50:18) [GCC 5.4.0 20160609]
521 ** Mercurial Distributed SCM (version 4.6+314-8e5a61602459+20180530)
522 ** Extensions loaded: evolve
523 Traceback (most recent call last):
524 File "/tmp/hgtests.B9AQfb/install/bin/hg", line 41, in <module>
525 dispatch.run()
526 File "/tmp/hgtests.B9AQfb/install/lib/python/mercurial/dispatch.py", line 90, in run
527 status = dispatch(req)
528 File "/tmp/hgtests.B9AQfb/install/lib/python/mercurial/dispatch.py", line 213, in dispatch
529 ret = _runcatch(req) or 0
530 File "/tmp/hgtests.B9AQfb/install/lib/python/mercurial/dispatch.py", line 354, in _runcatch
531 return _callcatch(ui, _runcatchfunc)
532 File "/tmp/hgtests.B9AQfb/install/lib/python/mercurial/dispatch.py", line 362, in _callcatch
533 return scmutil.callcatch(ui, func)
534 File "/tmp/hgtests.B9AQfb/install/lib/python/mercurial/scmutil.py", line 161, in callcatch
535 return func()
536 File "/tmp/hgtests.B9AQfb/install/lib/python/mercurial/dispatch.py", line 344, in _runcatchfunc
537 return _dispatch(req)
538 File "/tmp/hgtests.B9AQfb/install/lib/python/mercurial/dispatch.py", line 974, in _dispatch
539 cmdpats, cmdoptions)
540 File "/tmp/hgtests.B9AQfb/install/lib/python/mercurial/dispatch.py", line 730, in runcommand
541 ret = _runcommand(ui, options, cmd, d)
542 File "/tmp/hgtests.B9AQfb/install/lib/python/mercurial/dispatch.py", line 982, in _runcommand
543 return cmdfunc()
544 File "/tmp/hgtests.B9AQfb/install/lib/python/mercurial/dispatch.py", line 971, in <lambda>
545 d = lambda: util.checksignature(func)(ui, *args, **strcmdopt)
546 File "/tmp/hgtests.B9AQfb/install/lib/python/mercurial/util.py", line 1550, in check
547 return func(*args, **kwargs)
548 File "/home/foobar/repo/mutable-history/hgext3rd/evolve/evolvecmd.py", line 1234, in evolve
549 return abortevolve(ui, repo, evolvestate)
550 File "/home/foobar/repo/mutable-history/hgext3rd/evolve/evolvecmd.py", line 1289, in abortevolve
551 startnode = evolvestate['startnode']
552 File "/home/foobar/repo/mutable-history/hgext3rd/evolve/state.py", line 49, in __getitem__
553 return self.opts[key]
554 KeyError: 'startnode'
555 [1]