Mercurial > hg-stable
diff hgext/rebase.py @ 44317:f546d2170b0f
merge: introduce a clean_update() for that use-case
I find it hard to understand what value to pass for all the arguments
to `merge.update()`. I would like to introduce functions that are more
specific to each use-case. We already have `graft()`. This patch
introduces a `clean_update()` and uses it in some places to show that
it works.
Differential Revision: https://phab.mercurial-scm.org/D7902
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Wed, 15 Jan 2020 15:30:25 -0800 |
parents | 830eae18b2f3 |
children | 77bb38be00ea |
line wrap: on
line diff
--- a/hgext/rebase.py Wed Feb 05 16:16:15 2020 -0500 +++ b/hgext/rebase.py Wed Jan 15 15:30:25 2020 -0800 @@ -800,9 +800,7 @@ # Update away from the rebase if necessary if shouldupdate: - mergemod.update( - repo, self.originalwd, branchmerge=False, force=True - ) + mergemod.clean_update(repo[self.originalwd]) # Strip from the first rebased revision if rebased: @@ -1477,7 +1475,7 @@ else: if repo[b'.'].rev() != p1: repo.ui.debug(b" update to %d:%s\n" % (p1, p1ctx)) - mergemod.update(repo, p1, branchmerge=False, force=True) + mergemod.clean_update(p1ctx) else: repo.ui.debug(b" already in destination\n") # This is, alas, necessary to invalidate workingctx's manifest cache,