Mercurial > evolve
comparison tests/test-evolve-abort.t @ 3775:fa7b94606024 stable
tests: add a test demonstrating issue5897
When conflicts are caused due to `hg next --evolve`, `hg evolve --abort` breaks!
This patch adds test to demonstrate that. This will be fixed in next patch.
author | Pulkit Goyal <7895pulkit@gmail.com> |
---|---|
date | Wed, 30 May 2018 00:34:35 +0530 |
parents | f6979d64b9fb |
children | 2d450974bb1c |
comparison
equal
deleted
inserted
replaced
3767:115caa4e5278 | 3775:fa7b94606024 |
---|---|
494 | | (bm1) draft | 494 | | (bm1) draft |
495 | x 1:2f913b0c9220 added a | 495 | x 1:2f913b0c9220 added a |
496 |/ () draft | 496 |/ () draft |
497 o 0:8fa14d15e168 added hgignore | 497 o 0:8fa14d15e168 added hgignore |
498 () draft | 498 () draft |
499 | |
500 Testing `--abort` when conflicts are caused due to `hg next --evolve` | |
501 ===================================================================== | |
502 | |
503 $ hg next --evolve | |
504 move:[2] added b | |
505 atop:[4] added a | |
506 working directory now at c1f4718020e3 | |
507 $ hg next --evolve | |
508 move:[3] added c | |
509 atop:[5] added b | |
510 merging c | |
511 warning: conflicts while merging c! (edit, then use 'hg resolve --mark') | |
512 evolve failed! | |
513 fix conflict and run 'hg evolve --continue' or use 'hg evolve --abort' to abort | |
514 abort: unresolved merge conflicts (see hg help resolve) | |
515 [255] | |
516 | |
517 $ hg evolve --abort | |
518 ** unknown exception encountered, please report by visiting | |
519 ** https://mercurial-scm.org/wiki/BugTracker | |
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] |