# HG changeset patch # User Pierre-Yves David # Date 1524146881 -7200 # Node ID 39231f02902bf3992aed7fda7aa8686ee185a6f4 # Parent 3680f715c14f0bdbc9bfa99254eda79392b6409a compat: drop compatibility wrapper for "relevantmarkers" We no longer support version without the logic we have been adding. diff -r 3680f715c14f -r 39231f02902b hgext3rd/evolve/compat.py --- 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)