# HG changeset patch # User Martin von Zweigbergk # Date 1601657505 25200 # Node ID d72ef23a42914543bc0734fe4c2526b65fb64d7f # Parent 3b7df91c2ba7bb7f2296ca66403ef80d3bf2c76e 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()`). diff -r 3b7df91c2ba7 -r d72ef23a4291 hgext3rd/evolve/compat.py --- 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) diff -r 3b7df91c2ba7 -r d72ef23a4291 hgext3rd/evolve/evolvecmd.py --- 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)