Mercurial > public > mercurial-scm > hg-stable
diff mercurial/commands.py @ 45892:ac362d5a7893
errors: introduce CanceledError and use it in a few places
This very similar to earlier patches (e.g. for `InputError`) and part
of https://www.mercurial-scm.org/wiki/ErrorCategoriesPlan.
Differential Revision: https://phab.mercurial-scm.org/D9339
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Thu, 22 Oct 2020 14:14:59 -0700 |
parents | 1bf1dcbc9950 |
children | 0aa118f18d4b |
line wrap: on
line diff
--- a/mercurial/commands.py Tue Nov 17 15:51:09 2020 -0800 +++ b/mercurial/commands.py Thu Oct 22 14:14:59 2020 -0700 @@ -5830,7 +5830,7 @@ if ui.promptchoice( _(b're-merge all unresolved files (yn)?$$ &Yes $$ &No') ): - raise error.Abort(_(b'user quit')) + raise error.CanceledError(_(b'user quit')) if mark and not pats: if ui.promptchoice( _( @@ -5838,7 +5838,7 @@ b'$$ &Yes $$ &No' ) ): - raise error.Abort(_(b'user quit')) + raise error.CanceledError(_(b'user quit')) if unmark and not pats: if ui.promptchoice( _( @@ -5846,7 +5846,7 @@ b'$$ &Yes $$ &No' ) ): - raise error.Abort(_(b'user quit')) + raise error.CanceledError(_(b'user quit')) uipathfn = scmutil.getuipathfn(repo)