Patchwork D12151: simplemerge: remove now-unused `ui` argument

login
register
mail settings
Submitter phabricator
Date Feb. 8, 2022, 9:28 p.m.
Message ID <differential-rev-PHID-DREV-bb7caoxiodimtcxpmpv6-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/50488/
State New
Headers show

Comments

phabricator - Feb. 8, 2022, 9:28 p.m.
martinvonz created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  The `ui` argument is no longer needed now that we don't handle
  `--print` in the library code.

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

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

CHANGE DETAILS




To: martinvonz, #hg-reviewers
Cc: mercurial-patches, mercurial-devel

Patch

diff --git a/mercurial/simplemerge.py b/mercurial/simplemerge.py
--- a/mercurial/simplemerge.py
+++ b/mercurial/simplemerge.py
@@ -495,7 +495,7 @@ 
                 raise error.Abort(msg)
 
 
-def simplemerge(ui, local, base, other, **opts):
+def simplemerge(local, base, other, **opts):
     """Performs the simplemerge algorithm.
 
     The merged result is written into `localctx`.
diff --git a/mercurial/filemerge.py b/mercurial/filemerge.py
--- a/mercurial/filemerge.py
+++ b/mercurial/filemerge.py
@@ -437,7 +437,7 @@ 
             return 1
         else:
             merged_text, conflicts = simplemerge.simplemerge(
-                ui, local, base, other, mode=mode
+                local, base, other, mode=mode
             )
             if merged_text is not None and (
                 not conflicts or premerge in validkeep
@@ -488,7 +488,7 @@ 
         conflicts = True
     else:
         merged_text, conflicts = simplemerge.simplemerge(
-            ui, local, base, other, mode=mode
+            local, base, other, mode=mode
         )
         # fcd.flags() already has the merged flags (done in
         # mergestate.resolve())
diff --git a/contrib/simplemerge b/contrib/simplemerge
--- a/contrib/simplemerge
+++ b/contrib/simplemerge
@@ -107,7 +107,7 @@ 
         sys.exit(1)
 
     merged_text, conflicts = simplemerge.simplemerge(
-        ui, local_input, base_input, other_input, **opts
+        local_input, base_input, other_input, **opts
     )
     if merged_text is not None:
         if opts['print']: