Mercurial > evolve
changeset 3696:39231f02902b
compat: drop compatibility wrapper for "relevantmarkers"
We no longer support version without the logic we have been adding.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Thu, 19 Apr 2018 16:08:01 +0200 |
parents | 3680f715c14f |
children | 6aff4bb3970d |
files | hgext3rd/evolve/compat.py |
diffstat | 1 files changed, 0 insertions(+), 40 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext3rd/evolve/compat.py Thu Apr 19 16:51:53 2018 +0200 +++ b/hgext3rd/evolve/compat.py Thu Apr 19 16:08:01 2018 +0200 @@ -11,7 +11,6 @@ from mercurial import ( copies, context, - hg, mdiff, obsolete, obsutil, @@ -39,45 +38,6 @@ eh = exthelper.exthelper() -if not util.safehasattr(hg, '_copycache'): - # exact copy of relevantmarkers as in Mercurial-176d1a0ce385 - # this fixes relevant markers computation for version < hg-4.3 - @eh.wrapfunction(obsolete.obsstore, 'relevantmarkers') - def relevantmarkers(orig, self, nodes): - """return a set of all obsolescence markers relevant to a set of nodes. - - "relevant" to a set of nodes mean: - - - marker that use this changeset as successor - - prune marker of direct children on this changeset - - recursive application of the two rules on precursors of these markers - - It is a set so you cannot rely on order. - - Backport of mercurial changeset 176d1a0ce385 for version < 4.3 - """ - - pendingnodes = set(nodes) - seenmarkers = set() - seennodes = set(pendingnodes) - precursorsmarkers = self.predecessors - succsmarkers = self.successors - children = self.children - while pendingnodes: - direct = set() - for current in pendingnodes: - direct.update(precursorsmarkers.get(current, ())) - pruned = [m for m in children.get(current, ()) if not m[1]] - direct.update(pruned) - pruned = [m for m in succsmarkers.get(current, ()) if not m[1]] - direct.update(pruned) - direct -= seenmarkers - pendingnodes = set([m[0] for m in direct]) - seenmarkers |= direct - pendingnodes -= seennodes - seennodes |= pendingnodes - return seenmarkers - # successors set move from mercurial.obsolete to mercurial.obsutil in 4.3 def successorssets(*args, **kwargs): func = getattr(obsutil, 'successorssets', None)