Mercurial > public > mercurial-scm > hg-stable
diff mercurial/merge.py @ 45563:2c86b9587740
merge: make low-level update() private (API)
We have very few callers left that call the low-level `merge.update()`
function. I think it's time to make it private. I'll remove the
remaining callers in coming patches, except for one call from the
`rebase` module. I hope to eventually fix that too, but it's more
complex because it requires teaching `merge.graft()` to work with a
dirty working copy.
Differential Revision: https://phab.mercurial-scm.org/D9065
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Mon, 21 Sep 2020 11:12:58 -0700 |
parents | 2b339c6c6e99 |
children | c1b603cdc95a |
line wrap: on
line diff
--- a/mercurial/merge.py Mon Sep 21 10:09:39 2020 -0700 +++ b/mercurial/merge.py Mon Sep 21 11:12:58 2020 -0700 @@ -1694,7 +1694,7 @@ UPDATECHECK_NO_CONFLICT = b'noconflict' -def update( +def _update( repo, node, branchmerge, @@ -2045,7 +2045,7 @@ force = whether the merge was run with 'merge --force' (deprecated) """ - return update( + return _update( ctx.repo(), ctx.rev(), labels=labels, @@ -2062,7 +2062,7 @@ This involves updating to the commit and discarding any changes in the working copy. """ - return update(ctx.repo(), ctx.rev(), branchmerge=False, force=True, wc=wc) + return _update(ctx.repo(), ctx.rev(), branchmerge=False, force=True, wc=wc) def revert_to(ctx, matcher=None, wc=None): @@ -2072,7 +2072,7 @@ be the same as in the given commit. """ - return update( + return _update( ctx.repo(), ctx.rev(), branchmerge=False, @@ -2123,7 +2123,7 @@ or pctx.rev() == base.rev() ) - stats = update( + stats = _update( repo, ctx.node(), True, @@ -2166,7 +2166,7 @@ b"must specify parent of merge commit to back out" ) parent = ctx.p1() - return update( + return _update( ctx.repo(), parent, branchmerge=True,