hgext/record.py
changeset 9837 b13474cd1496
parent 9710 1765599f4899
child 10263 25e572394f5c
--- a/hgext/record.py	Wed Nov 11 21:52:02 2009 +0100
+++ b/hgext/record.py	Wed Nov 11 22:53:01 2009 +0100
@@ -275,7 +275,8 @@
         - ? (help)
         - q (quit)
 
-        else, input is returned to the caller.
+        Returns True/False and sets reps_all and resp_file as
+        appropriate.
         """
         if resp_all[0] is not None:
             return resp_all[0]
@@ -299,17 +300,17 @@
                     if l: ui.write(l.strip(), '\n')
                 continue
             elif r == 0: # yes
-                ret = 'y'
+                ret = True
             elif r == 1: # no
-                ret = 'n'
+                ret = False
             elif r == 2: # Skip
-                ret = resp_file[0] = 'n'
+                ret = resp_file[0] = False
             elif r == 3: # file (Record remaining)
-                ret = resp_file[0] = 'y'
+                ret = resp_file[0] = True
             elif r == 4: # done, skip remaining
-                ret = resp_all[0] = 'n'
+                ret = resp_all[0] = False
             elif r == 5: # all
-                ret = resp_all[0] = 'y'
+                ret = resp_all[0] = True
             elif r == 6: # quit
                 raise util.Abort(_('user quit'))
             return ret
@@ -330,7 +331,7 @@
                 chunk.pretty(ui)
             r = prompt(_('examine changes to %s?') %
                        _(' and ').join(map(repr, chunk.files())))
-            if r == _('y'):
+            if r:
                 applied[chunk.filename()] = [chunk]
                 if chunk.allhunks():
                     applied[chunk.filename()] += consumefile()
@@ -344,7 +345,7 @@
                                       chunk.filename()) \
                            or  prompt(_('record change %d/%d to %r?') %
                                       (pos, total, chunk.filename()))
-            if r == _('y'):
+            if r:
                 if fixoffset:
                     chunk = copy.copy(chunk)
                     chunk.toline += fixoffset