Mercurial > hg
changeset 44398:ddbc296a1f48
merge: drop redundant mergeforce argument from hg.merge()
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`.
Differential Revision: https://phab.mercurial-scm.org/D8167
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Wed, 26 Feb 2020 11:00:50 -0800 |
parents | 0f60687b2324 |
children | a45ffad9ae98 |
files | mercurial/commands.py mercurial/hg.py relnotes/next |
diffstat | 3 files changed, 6 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/commands.py Wed Feb 26 10:54:17 2020 -0800 +++ b/mercurial/commands.py Wed Feb 26 11:00:50 2020 -0800 @@ -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(
--- a/mercurial/hg.py Wed Feb 26 10:54:17 2020 -0800 +++ b/mercurial/hg.py Wed Feb 26 11:00:50 2020 -0800 @@ -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)
--- a/relnotes/next Wed Feb 26 10:54:17 2020 -0800 +++ b/relnotes/next Wed Feb 26 11:00:50 2020 -0800 @@ -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.