Patchwork [2,of,6] record: change arguments of curses recording function

login
register
mail settings
Submitter Laurent Charignon
Date March 13, 2015, 9:21 p.m.
Message ID <e7f74755e91ddaa44e7a.1426281713@dev919.prn2.facebook.com>
Download mbox | patch
Permalink /patch/8068/
State Accepted
Headers show

Comments

Laurent Charignon - March 13, 2015, 9:21 p.m.
# HG changeset patch
# User Laurent Charignon <lcharignon@fb.com>
# Date 1426269085 25200
#      Fri Mar 13 10:51:25 2015 -0700
# Node ID e7f74755e91ddaa44e7a8aa2ff61204ebcb12418
# Parent  5fbca5c98a71c0e1491d10a9944518a4704ba71e
record: change arguments of curses recording function

This way the arguments are the same for both curses and non curses version

Patch

diff --git a/mercurial/crecord.py b/mercurial/crecord.py
--- a/mercurial/crecord.py
+++ b/mercurial/crecord.py
@@ -452,7 +452,7 @@ 
     uiheaders = [uiheader(h) for h in headers]
     # let user choose headers/hunks/lines, and mark their applied flags
     # accordingly
-    chunk_selector(uiheaders, ui)
+    chunk_selector(ui, uiheaders)
     appliedhunklist = []
     for hdr in uiheaders:
         if (hdr.applied and
@@ -488,7 +488,7 @@ 
     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.
@@ -502,7 +502,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.