Mercurial > hg
comparison tests/test-bookmarks-pushpull.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 | 49535e56fab8 |
children | 95c4cca641f6 |
comparison
equal
deleted
inserted
replaced
45826:21733e8c924f | 45827:8d72e29ad1e0 |
---|---|
384 no changes found | 384 no changes found |
385 [2] | 385 [2] |
386 $ hg pull -B anotherbadname ../a | 386 $ hg pull -B anotherbadname ../a |
387 pulling from ../a | 387 pulling from ../a |
388 abort: remote bookmark anotherbadname not found! | 388 abort: remote bookmark anotherbadname not found! |
389 [255] | 389 [10] |
390 | 390 |
391 divergent bookmarks | 391 divergent bookmarks |
392 | 392 |
393 $ cd ../a | 393 $ cd ../a |
394 $ echo c1 > f1 | 394 $ echo c1 > f1 |
1380 searching for changes | 1380 searching for changes |
1381 no changes found | 1381 no changes found |
1382 [1] | 1382 [1] |
1383 $ hg push --all-bookmarks -r 1 ../ab2 | 1383 $ hg push --all-bookmarks -r 1 ../ab2 |
1384 abort: cannot specify both --all-bookmarks and --rev | 1384 abort: cannot specify both --all-bookmarks and --rev |
1385 [255] | 1385 [10] |
1386 $ hg push --all-bookmarks -B A ../ab2 | 1386 $ hg push --all-bookmarks -B A ../ab2 |
1387 abort: cannot specify both --all-bookmarks and --bookmark | 1387 abort: cannot specify both --all-bookmarks and --bookmark |
1388 [255] | 1388 [10] |
1389 $ hg push --all-bookmarks ../ab2 | 1389 $ hg push --all-bookmarks ../ab2 |
1390 pushing to ../ab2 | 1390 pushing to ../ab2 |
1391 searching for changes | 1391 searching for changes |
1392 no changes found | 1392 no changes found |
1393 exporting bookmark A | 1393 exporting bookmark A |