comparison tests/test-transplant.t @ 45840:527ce85c2e60

errors: introduce StateError and use it from commands and cmdutil This very similar to an earlier patch (which was for `InputError`). In this patch, I also updated the transplant extension only because `test-transplant.t` would otherwise have needed a `#if continueflag`. Differential Revision: https://phab.mercurial-scm.org/D9310
author Martin von Zweigbergk <martinvonz@google.com>
date Mon, 12 Oct 2020 12:44:18 -0700
parents 8d72e29ad1e0
children 768056549737
comparison
equal deleted inserted replaced
45839:ebee234d952a 45840:527ce85c2e60
51 1 files updated, 0 files merged, 0 files removed, 0 files unresolved 51 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
52 (branch merge, don't forget to commit) 52 (branch merge, don't forget to commit)
53 $ hg transplant 1 53 $ hg transplant 1
54 abort: outstanding uncommitted merge 54 abort: outstanding uncommitted merge
55 (use 'hg commit' or 'hg merge --abort') 55 (use 'hg commit' or 'hg merge --abort')
56 [255] 56 [20]
57 $ hg up -qC tip 57 $ hg up -qC tip
58 $ echo b0 > b1 58 $ echo b0 > b1
59 $ hg transplant 1 59 $ hg transplant 1
60 abort: uncommitted changes 60 abort: uncommitted changes
61 [255] 61 [20]
62 $ hg up -qC tip 62 $ hg up -qC tip
63 $ echo b2 > b2 63 $ echo b2 > b2
64 $ hg ci -Amb2 -d '1 0' 64 $ hg ci -Amb2 -d '1 0'
65 adding b2 65 adding b2
66 $ echo b3 > b3 66 $ echo b3 > b3
511 1 other heads for branch "default" 511 1 other heads for branch "default"
512 $ rm added 512 $ rm added
513 $ hg continue 513 $ hg continue
514 abort: no transplant to continue (continueflag !) 514 abort: no transplant to continue (continueflag !)
515 abort: no operation in progress (no-continueflag !) 515 abort: no operation in progress (no-continueflag !)
516 [255] 516 [20]
517 $ hg transplant --stop 517 $ hg transplant --stop
518 abort: no interrupted transplant found 518 abort: no interrupted transplant found
519 [255] 519 [20]
520 $ hg transplant 1 520 $ hg transplant 1
521 applying 46ae92138f3c 521 applying 46ae92138f3c
522 patching file foo 522 patching file foo
523 Hunk #1 FAILED at 0 523 Hunk #1 FAILED at 0
524 1 out of 1 hunks FAILED -- saving rejects to file foo.rej 524 1 out of 1 hunks FAILED -- saving rejects to file foo.rej
569 abort: fix up the working directory and run hg transplant --continue 569 abort: fix up the working directory and run hg transplant --continue
570 [255] 570 [255]
571 $ hg transplant 1:3 571 $ hg transplant 1:3
572 abort: transplant in progress 572 abort: transplant in progress
573 (use 'hg transplant --continue' or 'hg transplant --stop') 573 (use 'hg transplant --continue' or 'hg transplant --stop')
574 [255] 574 [20]
575 $ hg status -v 575 $ hg status -v
576 A bar 576 A bar
577 ? added.rej 577 ? added.rej
578 ? baz.rej 578 ? baz.rej
579 ? foo.rej 579 ? foo.rej