Mercurial > hg
comparison tests/test-graft.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 | fa87536d3d70 |
comparison
equal
deleted
inserted
replaced
45839:ebee234d952a | 45840:527ce85c2e60 |
---|---|
83 | 83 |
84 $ hg -q up -cr tip | 84 $ hg -q up -cr tip |
85 $ hg rm -q e | 85 $ hg rm -q e |
86 $ hg graft --continue | 86 $ hg graft --continue |
87 abort: no graft in progress | 87 abort: no graft in progress |
88 [255] | 88 [20] |
89 $ hg revert -r . -q e | 89 $ hg revert -r . -q e |
90 | 90 |
91 Need to specify a rev: | 91 Need to specify a rev: |
92 | 92 |
93 $ hg graft | 93 $ hg graft |
128 | 128 |
129 $ hg up -q 0 | 129 $ hg up -q 0 |
130 $ echo foo > a | 130 $ echo foo > a |
131 $ hg graft 1 | 131 $ hg graft 1 |
132 abort: uncommitted changes | 132 abort: uncommitted changes |
133 [255] | 133 [20] |
134 $ hg revert a | 134 $ hg revert a |
135 | 135 |
136 Graft a rename: | 136 Graft a rename: |
137 (this also tests that editor is invoked if '--edit' is specified) | 137 (this also tests that editor is invoked if '--edit' is specified) |
138 | 138 |
290 Commit while interrupted should fail: | 290 Commit while interrupted should fail: |
291 | 291 |
292 $ hg ci -m 'commit interrupted graft' | 292 $ hg ci -m 'commit interrupted graft' |
293 abort: graft in progress | 293 abort: graft in progress |
294 (use 'hg graft --continue' or 'hg graft --stop' to stop) | 294 (use 'hg graft --continue' or 'hg graft --stop' to stop) |
295 [255] | 295 [20] |
296 | 296 |
297 Abort the graft and try committing: | 297 Abort the graft and try committing: |
298 | 298 |
299 $ hg up -C . | 299 $ hg up -C . |
300 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | 300 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |