diff hgext/record.py @ 8259:98acfd1d2b08

ui: replace regexp pattern with sequence of choices Use ampersands (&) to delineate the response char in each choice. ui.prompt() responses are now explicitly case insensitive. GUIs that subclass ui can generate dialogs from the full choice names.
author Steve Borho <steve@borho.org>
date Thu, 30 Apr 2009 10:15:32 -0500
parents 46293a0c7e9f
children c9ab8f448a9e
line wrap: on
line diff
--- a/hgext/record.py	Fri Apr 24 14:40:56 2009 -0700
+++ b/hgext/record.py	Thu Apr 30 10:15:32 2009 -0500
@@ -282,8 +282,16 @@
         if resp_file[0] is not None:
             return resp_file[0]
         while True:
-            choices = _('[Ynsfdaq?]')
-            r = (ui.prompt("%s %s " % (query, choices), '(?i)%s?$' % choices)
+            resps = _('[Ynsfdaq?]')
+            choices = (_('&Yes, record this change'),
+                    _('&No, skip this change'),
+                    _('&Skip remaining changes to this file'),
+                    _('Record remaining changes to this &file'),
+                    _('&Done, skip remaining changes and files'),
+                    _('Record &all changes to all remaining files'),
+                    _('&Quit, recording no changes'),
+                    _('&?'))
+            r = (ui.prompt("%s %s " % (query, resps), choices)
                  or _('y')).lower()
             if r == _('?'):
                 doc = gettext(record.__doc__)