Mercurial > evolve
diff hgext3rd/evolve/evolvecmd.py @ 3697:6aff4bb3970d
compat: drop compatibility layer for successorssets
We support down to Mercurial 4.3 now.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Thu, 19 Apr 2018 16:12:37 +0200 |
parents | c0d5e0929f8b |
children | 4819656d1134 |
line wrap: on
line diff
--- a/hgext3rd/evolve/evolvecmd.py Thu Apr 19 16:08:01 2018 +0200 +++ b/hgext3rd/evolve/evolvecmd.py Thu Apr 19 16:12:37 2018 +0200 @@ -23,6 +23,7 @@ merge, node, obsolete, + obsutil, phases, repair, scmutil, @@ -113,14 +114,14 @@ ui.warn(_("cannot solve instability of %s, skipping\n") % orig) return (False, '') obs = pctx - newer = compat.successorssets(repo, obs.node()) + newer = obsutil.successorssets(repo, obs.node()) # search of a parent which is not killed while not newer or newer == [()]: ui.debug("stabilize target %s is plain dead," " trying to stabilize on its parent\n" % obs) obs = obs.parents()[0] - newer = compat.successorssets(repo, obs.node()) + newer = obsutil.successorssets(repo, obs.node()) if len(newer) > 1: msg = _("skipping %s: divergent rewriting. can't choose " "destination\n") % obs @@ -518,7 +519,7 @@ if not ctx.obsolete(): continue - successors = compat.successorssets(repo, ctx.node(), cache) + successors = obsutil.successorssets(repo, ctx.node(), cache) # We can't make any assumptions about how to update the hash if the # cset in question was split or diverged. @@ -684,7 +685,7 @@ """ repo = ctx._repo.unfiltered() for base in repo.set('reverse(allprecursors(%d))', ctx.rev()): - newer = compat.successorssets(ctx._repo, base.node()) + newer = obsutil.successorssets(ctx._repo, base.node()) # drop filter and solution including the original ctx newer = [n for n in newer if n and ctx.node() not in n] if newer: @@ -732,7 +733,7 @@ tovisit = list(parents(rev)) while tovisit: r = tovisit.pop() - succsets = compat.successorssets(repo, tonode(r)) + succsets = obsutil.successorssets(repo, tonode(r)) if not succsets: tovisit.extend(parents(r)) else: @@ -1022,7 +1023,7 @@ if n == ctx.node(): # a node can't be a base for divergence with itself continue - nsuccsets = compat.successorssets(repo, n, cache) + nsuccsets = obsutil.successorssets(repo, n, cache) for nsuccset in nsuccsets: if ctx.node() in nsuccset: # we are only interested in *other* successor sets