comparison tests/test-push.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 5617b748aad8
children 95c4cca641f6
comparison
equal deleted inserted replaced
45826:21733e8c924f 45827:8d72e29ad1e0
363 > EOF 363 > EOF
364 $ hg push 364 $ hg push
365 pushing to $TESTTMP/test-require-revs-dest 365 pushing to $TESTTMP/test-require-revs-dest
366 abort: no revisions specified to push 366 abort: no revisions specified to push
367 (did you mean "hg push -r ."?) 367 (did you mean "hg push -r ."?)
368 [255] 368 [10]
369 $ hg push -r 0 369 $ hg push -r 0
370 pushing to $TESTTMP/test-require-revs-dest 370 pushing to $TESTTMP/test-require-revs-dest
371 searching for changes 371 searching for changes
372 adding changesets 372 adding changesets
373 adding manifests 373 adding manifests
392 showing the error) 392 showing the error)
393 $ hg push 393 $ hg push
394 pushing to $TESTTMP/test-require-revs-dest 394 pushing to $TESTTMP/test-require-revs-dest
395 abort: no revisions specified to push 395 abort: no revisions specified to push
396 (did you mean "hg push -r ."?) 396 (did you mean "hg push -r ."?)
397 [255] 397 [10]
398 $ hg push --config paths.default:pushrev=0 398 $ hg push --config paths.default:pushrev=0
399 pushing to $TESTTMP/test-require-revs-dest 399 pushing to $TESTTMP/test-require-revs-dest
400 searching for changes 400 searching for changes
401 no changes found 401 no changes found
402 [1] 402 [1]