comparison hgext/absorb.py @ 45877: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 0a330055340c
children f4a218331ff4
comparison
equal deleted inserted replaced
45876:568c05d8f3d2 45877:ac362d5a7893
1074 and state.ctxaffected 1074 and state.ctxaffected
1075 and ui.promptchoice( 1075 and ui.promptchoice(
1076 b"apply changes (y/N)? $$ &Yes $$ &No", default=1 1076 b"apply changes (y/N)? $$ &Yes $$ &No", default=1
1077 ) 1077 )
1078 ): 1078 ):
1079 raise error.Abort(_(b'absorb cancelled\n')) 1079 raise error.CanceledError(_(b'absorb cancelled\n'))
1080 1080
1081 state.apply() 1081 state.apply()
1082 if state.commit(): 1082 if state.commit():
1083 state.printchunkstats() 1083 state.printchunkstats()
1084 elif not ui.quiet: 1084 elif not ui.quiet: