Mercurial > evolve
changeset 5567:d72ef23a4291
compat: rename update() to _update() to make room for a new update()
The next patch will add a `compat.update()` that delegates to the new
`merge.update()` from upstream (different from the old one, which was
renamed to `merge._update()`).
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Fri, 02 Oct 2020 09:51:45 -0700 |
parents | 3b7df91c2ba7 |
children | 7f8055eb07c7 |
files | hgext3rd/evolve/compat.py hgext3rd/evolve/evolvecmd.py |
diffstat | 2 files changed, 11 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext3rd/evolve/compat.py Fri Sep 25 09:13:57 2020 -0700 +++ b/hgext3rd/evolve/compat.py Fri Oct 02 09:51:45 2020 -0700 @@ -388,9 +388,9 @@ repo._quick_access_changeid_invalidate() if util.safehasattr(mergemod, '_update'): - def update(*args, **kwargs): + def _update(*args, **kwargs): return mergemod._update(*args, **kwargs) else: # hg <= 5.5 (2c86b9587740) - def update(*args, **kwargs): + def _update(*args, **kwargs): return mergemod.update(*args, **kwargs)
--- a/hgext3rd/evolve/evolvecmd.py Fri Sep 25 09:13:57 2020 -0700 +++ b/hgext3rd/evolve/evolvecmd.py Fri Oct 02 09:51:45 2020 -0700 @@ -258,8 +258,8 @@ # like reverting to the bumped node. wctx = context.overlayworkingctx(repo) wctx.setbase(prec) - compat.update(repo, bumped.node(), ancestor=prec, mergeancestor=True, - branchmerge=False, force=False, wc=wctx) + compat._update(repo, bumped.node(), ancestor=prec, mergeancestor=True, + branchmerge=False, force=False, wc=wctx) if not wctx.isempty(): text = b'%s update to %s:\n\n' % (TROUBLES['PHASEDIVERGENT'], prec) text += bumped.description() @@ -602,12 +602,12 @@ progresscb() with state.saver(evolvestate): mergeancestor = repo.changelog.isancestor(local.node(), other.node()) - stats = compat.update(repo, - other.node(), - branchmerge=True, - force=False, - ancestor=base.node(), - mergeancestor=mergeancestor) + stats = compat._update(repo, + other.node(), + branchmerge=True, + force=False, + ancestor=base.node(), + mergeancestor=mergeancestor) hg._showstats(repo, stats) # conflicts while merging content-divergent changesets @@ -1006,7 +1006,7 @@ """Used by the evolve function to merge dest on top of pctx. return the same tuple as merge.graft""" if repo[b'.'].rev() != dest.rev(): - compat.update(repo, dest, branchmerge=False, force=True) + compat._update(repo, dest, branchmerge=False, force=True) if repo._activebookmark: repo.ui.status(_(b"(leaving bookmark %s)\n") % repo._activebookmark) bookmarksmod.deactivate(repo)