record: change arguments of curses recording function
authorLaurent Charignon <lcharignon@fb.com>
Fri, 13 Mar 2015 10:51:25 -0700
changeset 24342 be3ab98f11e0
parent 24341 616c01b69898
child 24343 69538481ea9f
record: change arguments of curses recording function This way the arguments are the same for both curses and non-curses versions.
mercurial/crecord.py
--- a/mercurial/crecord.py	Thu Mar 12 17:51:37 2015 -0700
+++ b/mercurial/crecord.py	Fri Mar 13 10:51:25 2015 -0700
@@ -433,7 +433,7 @@
     uiheaders = [uiheader(h) for h in headers]
     # let user choose headers/hunks/lines, and mark their applied flags
     # accordingly
-    chunkselector(uiheaders, ui)
+    chunkselector(ui, uiheaders)
     appliedhunklist = []
     for hdr in uiheaders:
         if (hdr.applied and
@@ -466,7 +466,7 @@
         "hhhh", fcntl.ioctl(_origstdout, termios.TIOCGWINSZ, "\000"*8))[0:2]
     return h, w
 
-def chunkselector(headerlist, ui):
+def chunkselector(ui, headerlist):
     """
     curses interface to get selection of chunks, and mark the applied flags
     of the chosen chunks.
@@ -480,7 +480,7 @@
         return f(testfn, *args, **kwargs)
     return u
 
-def testchunkselector(testfn, headerlist, ui):
+def testchunkselector(testfn, ui, headerlist):
     """
     test interface to get selection of chunks, and mark the applied flags
     of the chosen chunks.