Merge with crew-stable
authorPatrick Mezard <pmezard@gmail.com>
Sun, 28 Oct 2007 09:47:54 +0100
changeset 5496 5bff70ff0431
parent 5495 363ba35f55bd (current diff)
parent 5479 f7c99e89178f (diff)
child 5497 f0a3918abd42
child 5499 e42cbd686c42
Merge with crew-stable
--- 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 = ''