[PATCH 1 of 1] patchbomb: use ui.promptchoice for diffstat to allow localization of choices
Christian Ebert
blacktrash at gmx.net
Thu Sep 2 05:54:17 CDT 2010
# HG changeset patch
# User Christian Ebert <blacktrash at gmx.net>
# Date 1283424674 -3600
# Node ID fc00c1b22b9d21070058f7b34c7b8432160747d5
# Parent be9c4131a8f4b9d90671ce13b151c3627ddb6904
patchbomb: use ui.promptchoice for diffstat to allow localization of choices
Format boolean prompt as in filemerge.py.
diff --git a/hgext/patchbomb.py b/hgext/patchbomb.py
--- a/hgext/patchbomb.py
+++ b/hgext/patchbomb.py
@@ -101,8 +101,9 @@
if summary:
ui.write(summary, '\n')
ui.write(s, '\n')
- ans = prompt(ui, _('does the diffstat above look okay?'), 'y')
- if not ans.lower().startswith('y'):
+ if (ui.interactive() and
+ ui.promptchoice(_('does the diffstat above look okay (yn)?'),
+ (_('&Yes'), ('&No')))):
raise util.Abort(_('diffstat rejected'))
return s
More information about the Mercurial-devel
mailing list