# HG changeset patch # User Christian Ebert # Date 1193559935 -3600 # Node ID f7c99e89178f8cc45ef79b9301aaeba46b984e0f # Parent 5223c360503e81639704a0bc661ccc2232becb0b patchbomb: no traceback if (diffstat) confirmation is refused diff -r 5223c360503e -r f7c99e89178f hgext/patchbomb.py --- a/hgext/patchbomb.py Fri Oct 26 12:01:14 2007 +0200 +++ b/hgext/patchbomb.py Sun Oct 28 09:25:35 2007 +0100 @@ -130,9 +130,9 @@ if empty_ok: return r ui.warn(_('Please enter a valid value.\n')) - def confirm(s): + def confirm(s, denial): if not prompt(s, default = 'y', rest = '? ').lower().startswith('y'): - raise ValueError + raise util.Abort(denial) def cdiffstat(summary, patchlines): s = patch.diffstat(patchlines) @@ -140,7 +140,8 @@ if summary: ui.write(summary, '\n') ui.write(s, '\n') - confirm(_('Does the diffstat above look okay')) + confirm(_('Does the diffstat above look okay'), + _('diffstat rejected')) elif s is None: ui.warn(_('No diffstat information available.\n')) s = ''