Patchwork D381: simplemerge: stop accepting, and passing, file parameters

login
register
mail settings
Submitter phabricator
Date Aug. 23, 2017, 7:37 p.m.
Message ID <f1ea6bc5a473ae0611fe76c229ef162b@localhost.localdomain>
Download mbox | patch
Permalink /patch/23271/
State Not Applicable
Headers show

Comments

phabricator - Aug. 23, 2017, 7:37 p.m.
phillco updated this revision to Diff 1220.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D381?vs=1041&id=1220

REVISION DETAIL
  https://phab.mercurial-scm.org/D381

AFFECTED FILES
  contrib/simplemerge
  mercurial/filemerge.py
  mercurial/simplemerge.py

CHANGE DETAILS




To: phillco, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/mercurial/simplemerge.py b/mercurial/simplemerge.py
--- a/mercurial/simplemerge.py
+++ b/mercurial/simplemerge.py
@@ -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
diff --git a/mercurial/filemerge.py b/mercurial/filemerge.py
--- a/mercurial/filemerge.py
+++ b/mercurial/filemerge.py
@@ -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
diff --git a/contrib/simplemerge b/contrib/simplemerge
--- a/contrib/simplemerge
+++ b/contrib/simplemerge
@@ -77,9 +77,6 @@ 
             raise ParseError(_('wrong number of arguments'))
     local, base, other = args
     sys.exit(simplemerge.simplemerge(ui.ui.load(),
-                                     local,
-                                     base,
-                                     other,
                                      filebackedctx(local),
                                      filebackedctx(base),
                                      filebackedctx(other),