Patchwork D8167: merge: drop redundant mergeforce argument from hg.merge()

login
register
mail settings
Submitter phabricator
Date Feb. 27, 2020, 6:31 p.m.
Message ID <98f1e62f995922a53bd29ab50af67f98@localhost.localdomain>
Download mbox | patch
Permalink /patch/45373/
State Not Applicable
Headers show

Comments

phabricator - Feb. 27, 2020, 6:31 p.m.
Closed by commit rHGddbc296a1f48: merge: drop redundant mergeforce argument from hg.merge() (authored by martinvonz).
This revision was automatically updated to reflect the committed changes.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D8167?vs=20357&id=20366

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D8167/new/

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

AFFECTED FILES
  mercurial/commands.py
  mercurial/hg.py
  relnotes/next

CHANGE DETAILS




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

Patch

diff --git a/relnotes/next b/relnotes/next
--- a/relnotes/next
+++ b/relnotes/next
@@ -65,5 +65,8 @@ 
  * `hg.merge()` has lost its `abort` argument. Please call
    `hg.abortmerge()` directly instead.
 
+ * `hg.merge()` has lost its `mergeforce` argument. It should have
+   only ever been called with the same value as the `force` argument.
+
  * The `*others` argument of `cmdutil.check_incompatible_arguments()`
    changed from being varargs argument to being a single collection.
diff --git a/mercurial/hg.py b/mercurial/hg.py
--- a/mercurial/hg.py
+++ b/mercurial/hg.py
@@ -1137,7 +1137,7 @@ 
 
 
 def merge(
-    repo, node, force=False, remind=True, mergeforce=False, labels=None,
+    repo, node, force=False, remind=True, labels=None,
 ):
     """Branch merge with node, resolving changes. Return true if any
     unresolved conflicts."""
@@ -1146,7 +1146,7 @@ 
         node,
         branchmerge=True,
         force=force,
-        mergeforce=mergeforce,
+        mergeforce=force,
         labels=labels,
     )
     _showstats(repo, stats)
diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -4909,9 +4909,7 @@ 
     with ui.configoverride(overrides, b'merge'):
         force = opts.get(b'force')
         labels = [b'working copy', b'merge rev']
-        return hg.merge(
-            repo, node, force=force, mergeforce=force, labels=labels
-        )
+        return hg.merge(repo, node, force=force, labels=labels)
 
 
 statemod.addunfinished(