Mercurial > evolve
changeset 5614:24a1ff0677a7 stable
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 | d9ee2706487f |
children | 947820d4b476 |
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 @@ -403,9 +403,9 @@ moves=moves, metadata=metadata) 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 @@ -257,8 +257,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() @@ -605,12 +605,12 @@ with state.saver(evolvestate): mergeancestor = repo.changelog.isancestor(divergent.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 @@ -1007,7 +1007,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)