diff hgext/record.py @ 5751:bc475d1f74ca

prompt: kill matchflags Python already lets one to embed RE flags directly in a regex, which is a much nicer way to do things: (?iLmsux) (One or more letters from the set "i", "L", "m", "s", "u", "x".) ... matchflags was introduced in 67afecb8d6cc, and the record extension is the only user. I've killed matchflag, and adjusted record code appropriately.
author Kirill Smelkov <kirr@mns.spb.ru>
date Fri, 28 Dec 2007 00:03:55 -0600
parents 3ef190234b55
children cc43d9f36ff2
line wrap: on
line diff
--- a/hgext/record.py	Thu Dec 27 19:23:22 2007 +0100
+++ b/hgext/record.py	Fri Dec 28 00:03:55 2007 -0600
@@ -247,8 +247,8 @@
         if resp_file[0] is not None:
             return resp_file[0]
         while True:
-            r = (ui.prompt(query + _(' [Ynsfdaq?] '), '[Ynsfdaq?]?$',
-                           matchflags=re.I) or 'y').lower()
+            r = (ui.prompt(query + _(' [Ynsfdaq?] '), '(?i)[Ynsfdaq?]?$')
+                 or 'y').lower()
             if r == '?':
                 c = record.__doc__.find('y - record this change')
                 for l in record.__doc__[c:].splitlines():