Mercurial > hg-stable
diff hgext/patchbomb.py @ 5479:f7c99e89178f
patchbomb: no traceback if (diffstat) confirmation is refused
author | Christian Ebert <blacktrash@gmx.net> |
---|---|
date | Sun, 28 Oct 2007 09:25:35 +0100 |
parents | 5223c360503e |
children | 4d6b630d3939 eae4553b2763 |
line wrap: on
line diff
--- 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 = ''