Mercurial > public > mercurial-scm > hg
comparison mercurial/exchange.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 | 74271829ddc0 |
children | f0626acf007d |
comparison
equal
deleted
inserted
replaced
45876:568c05d8f3d2 | 45877:ac362d5a7893 |
---|---|
191 elif behavior == b'confirm': | 191 elif behavior == b'confirm': |
192 if ui.promptchoice( | 192 if ui.promptchoice( |
193 _(b'push and publish %i changesets (yn)?$$ &Yes $$ &No') | 193 _(b'push and publish %i changesets (yn)?$$ &Yes $$ &No') |
194 % len(published) | 194 % len(published) |
195 ): | 195 ): |
196 raise error.Abort(_(b'user quit')) | 196 raise error.CanceledError(_(b'user quit')) |
197 elif behavior == b'abort': | 197 elif behavior == b'abort': |
198 msg = _(b'push would publish %i changesets') % len(published) | 198 msg = _(b'push would publish %i changesets') % len(published) |
199 hint = _( | 199 hint = _( |
200 b"use --publish or adjust 'experimental.auto-publish'" | 200 b"use --publish or adjust 'experimental.auto-publish'" |
201 b" config" | 201 b" config" |