simplemerge: stop accepting, and passing, file parameters
authorPhil Cohen <phillco@fb.com>
Thu, 24 Aug 2017 21:30:51 -0700
changeset 33906 fa6309c5761d
parent 33905 61b267a99fea
child 33907 1ad3085239ad
simplemerge: stop accepting, and passing, file parameters Differential Revision: https://phab.mercurial-scm.org/D381
contrib/simplemerge
mercurial/filemerge.py
mercurial/simplemerge.py
--- a/contrib/simplemerge	Thu Aug 24 21:30:37 2017 -0700
+++ b/contrib/simplemerge	Thu Aug 24 21:30:51 2017 -0700
@@ -85,9 +85,6 @@
             raise ParseError(_('wrong number of arguments'))
     local, base, other = args
     sys.exit(simplemerge.simplemerge(uimod.ui.load(),
-                                     local,
-                                     base,
-                                     other,
                                      filebackedctx(local),
                                      filebackedctx(base),
                                      filebackedctx(other),
--- a/mercurial/filemerge.py	Thu Aug 24 21:30:37 2017 -0700
+++ b/mercurial/filemerge.py	Thu Aug 24 21:30:51 2017 -0700
@@ -341,7 +341,7 @@
                 labels = _defaultconflictlabels
             if len(labels) < 3:
                 labels.append('base')
-        r = simplemerge.simplemerge(ui, a, b, c, fcd, fca, fco,
+        r = simplemerge.simplemerge(ui, fcd, fca, fco,
                                     quiet=True, label=labels, repo=repo)
         if not r:
             ui.debug(" premerge successful\n")
@@ -372,7 +372,7 @@
 
     ui = repo.ui
 
-    r = simplemerge.simplemerge(ui, a, b, c, fcd, fca, fco,
+    r = simplemerge.simplemerge(ui, fcd, fca, fco,
                                 label=labels, mode=mode, repo=repo)
     return True, r, False
 
@@ -425,7 +425,7 @@
     assert localorother is not None
     tool, toolpath, binary, symlink = toolconf
     a, b, c, back = files
-    r = simplemerge.simplemerge(repo.ui, a, b, c, fcd, fca, fco,
+    r = simplemerge.simplemerge(repo.ui, fcd, fca, fco,
                                 label=labels, localorother=localorother,
                                 repo=repo)
     return True, r
--- a/mercurial/simplemerge.py	Thu Aug 24 21:30:37 2017 -0700
+++ b/mercurial/simplemerge.py	Thu Aug 24 21:30:51 2017 -0700
@@ -419,8 +419,8 @@
 
     return [name_a, name_b, name_base]
 
-def simplemerge(ui, localfile, basefile, otherfile,
-                localctx=None, basectx=None, otherctx=None, repo=None, **opts):
+def simplemerge(ui, localctx=None, basectx=None, otherctx=None, repo=None,
+                **opts):
     """Performs the simplemerge algorithm.
 
     {local|base|other}ctx are optional. If passed, they (local/base/other) will