Mercurial > evolve
changeset 2840:dfad30be866c
context: precursors was deprecated
Use predecessors instead.
Match d5acd967f95a mercurial changeset.
author | Boris Feld <boris.feld@octobus.net> |
---|---|
date | Fri, 11 Aug 2017 10:41:11 +0200 |
parents | f9c8c754a528 |
children | 7f2943b0c8ea |
files | hgext3rd/evolve/__init__.py hgext3rd/evolve/compat.py hgext3rd/evolve/hack/drophack.py hgext3rd/evolve/obshistory.py hgext3rd/evolve/templatekw.py |
diffstat | 5 files changed, 15 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext3rd/evolve/__init__.py Fri Aug 11 09:32:23 2017 +0200 +++ b/hgext3rd/evolve/__init__.py Fri Aug 11 10:41:11 2017 +0200 @@ -504,7 +504,7 @@ """Precursor of a changeset""" cs = set() nm = repo.changelog.nodemap - markerbysubj = repo.obsstore.precursors + markerbysubj = repo.obsstore.predecessors node = repo.changelog.node for r in s: for p in markerbysubj.get(node(r), ()): @@ -519,7 +519,7 @@ node = repo.changelog.node toproceed = [node(r) for r in s] seen = set() - allsubjects = repo.obsstore.precursors + allsubjects = repo.obsstore.predecessors while toproceed: nc = toproceed.pop() for mark in allsubjects.get(nc, ()):
--- a/hgext3rd/evolve/compat.py Fri Aug 11 09:32:23 2017 +0200 +++ b/hgext3rd/evolve/compat.py Fri Aug 11 10:41:11 2017 +0200 @@ -47,7 +47,7 @@ pendingnodes = set(nodes) seenmarkers = set() seennodes = set(pendingnodes) - precursorsmarkers = self.precursors + precursorsmarkers = self.predecessors succsmarkers = self.successors children = self.children while pendingnodes: @@ -141,3 +141,11 @@ return instabilities context.basectx.instabilities = instabilities + +# XXX: Better detection of property cache +if 'predecessors' not in dir(obsolete.obsstore): + @property + def predecessors(self): + return self.precursors + + obsolete.obsstore.predecessors = predecessors
--- a/hgext3rd/evolve/hack/drophack.py Fri Aug 11 09:32:23 2017 +0200 +++ b/hgext3rd/evolve/hack/drophack.py Fri Aug 11 10:41:11 2017 +0200 @@ -50,7 +50,7 @@ seennodes = set(nodes) seenmarkers = set() pendingnodes = set(nodes) - precursorsmarkers = obsstore.precursors + precursorsmarkers = obsstore.predecessors while pendingnodes: current = pendingnodes.pop() new = set()
--- a/hgext3rd/evolve/obshistory.py Fri Aug 11 09:32:23 2017 +0200 +++ b/hgext3rd/evolve/obshistory.py Fri Aug 11 10:41:11 2017 +0200 @@ -301,7 +301,7 @@ - The dictionnary of each node successors, values are a set - The dictionnary of each node precursors, values are a list """ - precursors = repo.obsstore.precursors + precursors = repo.obsstore.predecessors successors = repo.obsstore.successors nodec = repo.changelog.node @@ -358,7 +358,7 @@ def _debugobshistoryrevs(fm, repo, revs, opts): """ Display the obsolescence history for revset """ - precursors = repo.obsstore.precursors + precursors = repo.obsstore.predecessors successors = repo.obsstore.successors nodec = repo.changelog.node unfi = repo.unfiltered()
--- a/hgext3rd/evolve/templatekw.py Fri Aug 11 09:32:23 2017 +0200 +++ b/hgext3rd/evolve/templatekw.py Fri Aug 11 10:41:11 2017 +0200 @@ -51,7 +51,7 @@ """ Yield the list of next precursors pointing on visible changectx nodes """ - precursors = repo.obsstore.precursors + precursors = repo.obsstore.predecessors stack = [nodeid] while stack: