martinvonz created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  The only caller that passed a value for either `force` or `mergeforce`
  passed the same value for both, so let's simplify the interface by
  accepting only `force`.

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

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

CHANGE DETAILS

diff --git a/relnotes/next b/relnotes/next
--- a/relnotes/next
+++ b/relnotes/next
@@ -57,5 +57,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
@@ -4910,7 +4910,7 @@
         force = opts.get(b'force')
         labels = [b'working copy', b'merge rev']
         return hg.merge(
-            repo, node, force=force, mergeforce=force, labels=labels
+            repo, node, force=force, labels=labels
         )
 
 



To: martinvonz, #hg-reviewers
Cc: mercurial-devel
_______________________________________________
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Reply via email to