comparison 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
comparison
equal deleted inserted replaced
45891:568c05d8f3d2 45892:ac362d5a7893
5828 if confirm: 5828 if confirm:
5829 if all: 5829 if all:
5830 if ui.promptchoice( 5830 if ui.promptchoice(
5831 _(b're-merge all unresolved files (yn)?$$ &Yes $$ &No') 5831 _(b're-merge all unresolved files (yn)?$$ &Yes $$ &No')
5832 ): 5832 ):
5833 raise error.Abort(_(b'user quit')) 5833 raise error.CanceledError(_(b'user quit'))
5834 if mark and not pats: 5834 if mark and not pats:
5835 if ui.promptchoice( 5835 if ui.promptchoice(
5836 _( 5836 _(
5837 b'mark all unresolved files as resolved (yn)?' 5837 b'mark all unresolved files as resolved (yn)?'
5838 b'$$ &Yes $$ &No' 5838 b'$$ &Yes $$ &No'
5839 ) 5839 )
5840 ): 5840 ):
5841 raise error.Abort(_(b'user quit')) 5841 raise error.CanceledError(_(b'user quit'))
5842 if unmark and not pats: 5842 if unmark and not pats:
5843 if ui.promptchoice( 5843 if ui.promptchoice(
5844 _( 5844 _(
5845 b'mark all resolved files as unresolved (yn)?' 5845 b'mark all resolved files as unresolved (yn)?'
5846 b'$$ &Yes $$ &No' 5846 b'$$ &Yes $$ &No'
5847 ) 5847 )
5848 ): 5848 ):
5849 raise error.Abort(_(b'user quit')) 5849 raise error.CanceledError(_(b'user quit'))
5850 5850
5851 uipathfn = scmutil.getuipathfn(repo) 5851 uipathfn = scmutil.getuipathfn(repo)
5852 5852
5853 if show: 5853 if show:
5854 ui.pager(b'resolve') 5854 ui.pager(b'resolve')