changeset 5496:5bff70ff0431

Merge with crew-stable
author Patrick Mezard <pmezard@gmail.com>
date Sun, 28 Oct 2007 09:47:54 +0100
parents 363ba35f55bd (current diff) f7c99e89178f (diff)
children f0a3918abd42 e42cbd686c42
files
diffstat 1 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/patchbomb.py	Sat Oct 27 20:23:46 2007 +0200
+++ b/hgext/patchbomb.py	Sun Oct 28 09:47:54 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 = ''