comparison tests/test-histedit-arguments.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 21733e8c924f
children c7abdbc8fd47
comparison
equal deleted inserted replaced
45839:ebee234d952a 45840:527ce85c2e60
53 histedit --continue/--abort with no existing state 53 histedit --continue/--abort with no existing state
54 -------------------------------------------------- 54 --------------------------------------------------
55 55
56 $ hg histedit --continue 56 $ hg histedit --continue
57 abort: no histedit in progress 57 abort: no histedit in progress
58 [255] 58 [20]
59 $ hg abort 59 $ hg abort
60 abort: no histedit in progress (abortflag !) 60 abort: no histedit in progress (abortflag !)
61 abort: no operation in progress (abortcommand !) 61 abort: no operation in progress (abortcommand !)
62 [255] 62 [20]
63 63
64 Run a dummy edit to make sure we get tip^^ correctly via revsingle. 64 Run a dummy edit to make sure we get tip^^ correctly via revsingle.
65 -------------------------------------------------------------------- 65 --------------------------------------------------------------------
66 66
67 $ HGEDITOR=cat hg histedit "tip^^" 67 $ HGEDITOR=cat hg histedit "tip^^"
154 [240] 154 [240]
155 155
156 $ hg graft --continue 156 $ hg graft --continue
157 abort: no graft in progress 157 abort: no graft in progress
158 (continue: hg histedit --continue) 158 (continue: hg histedit --continue)
159 [255] 159 [20]
160 160
161 $ mv .hg/histedit-state .hg/histedit-state.back 161 $ mv .hg/histedit-state .hg/histedit-state.back
162 $ hg update --quiet --clean 2 162 $ hg update --quiet --clean 2
163 $ echo alpha >> alpha 163 $ echo alpha >> alpha
164 $ mv .hg/histedit-state.back .hg/histedit-state 164 $ mv .hg/histedit-state.back .hg/histedit-state
503 (no more unresolved files) 503 (no more unresolved files)
504 continue: hg histedit --continue 504 continue: hg histedit --continue
505 $ hg commit --amend -m 'reject this fold' 505 $ hg commit --amend -m 'reject this fold'
506 abort: histedit in progress 506 abort: histedit in progress
507 (use 'hg histedit --continue' or 'hg histedit --abort') 507 (use 'hg histedit --continue' or 'hg histedit --abort')
508 [255] 508 [20]
509 509
510 With markers enabled, histedit does not get confused, and 510 With markers enabled, histedit does not get confused, and
511 amend should not be blocked by the ongoing histedit. 511 amend should not be blocked by the ongoing histedit.
512 512
513 $ cat >>$HGRCPATH <<EOF 513 $ cat >>$HGRCPATH <<EOF