comparison tests/test-rebase-obsolete.t @ 45827:8d72e29ad1e0

errors: introduce InputError and use it from commands and cmdutil This patch introduces a `InputError` class and replaces many uses of `error.Abort` by it in `commands` and `cmdutil`. This is a part of https://www.mercurial-scm.org/wiki/ErrorCategoriesPlan. There will later be a different class for state errors (to raise e.g. when there's an unfinished operation). It's not always clear when one should report an input error and when it should be a state error. We can always adjust later if I got something wrong in this patch (but feel free to point out any you notice now). Differential Revision: https://phab.mercurial-scm.org/D9167
author Martin von Zweigbergk <martinvonz@google.com>
date Tue, 06 Oct 2020 22:36:15 -0700
parents 21733e8c924f
children 527ce85c2e60
comparison
equal deleted inserted replaced
45826:21733e8c924f 45827:8d72e29ad1e0
486 $ cd .. 486 $ cd ..
487 $ cp -R hidden stabilize 487 $ cp -R hidden stabilize
488 $ cd stabilize 488 $ cd stabilize
489 $ hg rebase --auto-orphans '0::' -d 10 489 $ hg rebase --auto-orphans '0::' -d 10
490 abort: cannot specify both --auto-orphans and --dest 490 abort: cannot specify both --auto-orphans and --dest
491 [255] 491 [10]
492 $ hg rebase --auto-orphans '0::' 492 $ hg rebase --auto-orphans '0::'
493 rebasing 9:cf44d2f5a9f4 "D" 493 rebasing 9:cf44d2f5a9f4 "D"
494 $ hg log -G 494 $ hg log -G
495 o 12:7e3935feaa68 D 495 o 12:7e3935feaa68 D
496 | 496 |
2051 warning: conflicts while merging d! (edit, then use 'hg resolve --mark') 2051 warning: conflicts while merging d! (edit, then use 'hg resolve --mark')
2052 unresolved conflicts (see 'hg resolve', then 'hg rebase --continue') 2052 unresolved conflicts (see 'hg resolve', then 'hg rebase --continue')
2053 [240] 2053 [240]
2054 $ hg rebase --stop --dry-run 2054 $ hg rebase --stop --dry-run
2055 abort: cannot specify both --stop and --dry-run 2055 abort: cannot specify both --stop and --dry-run
2056 [255] 2056 [10]
2057 2057
2058 $ hg rebase -s 3 -d 5 2058 $ hg rebase -s 3 -d 5
2059 abort: rebase in progress 2059 abort: rebase in progress
2060 (use 'hg rebase --continue', 'hg rebase --abort', or 'hg rebase --stop') 2060 (use 'hg rebase --continue', 'hg rebase --abort', or 'hg rebase --stop')
2061 [255] 2061 [255]
2062 $ hg rebase --stop --continue 2062 $ hg rebase --stop --continue
2063 abort: cannot specify both --stop and --continue 2063 abort: cannot specify both --stop and --continue
2064 [255] 2064 [10]
2065 2065
2066 Test --stop moves bookmarks of original revisions to new rebased nodes: 2066 Test --stop moves bookmarks of original revisions to new rebased nodes:
2067 ====================================================================== 2067 ======================================================================
2068 $ cd .. 2068 $ cd ..
2069 $ hg init repo 2069 $ hg init repo