comparison mercurial/obsutil.py @ 33733:d5acd967f95a

obsstore: rename precursors into predecessors Use util.nouideprecwarn because obsstore doesn't have easy access to an ui object. The renaming is done according to https://www.mercurial-scm.org/wiki/CEDVocabulary. Differential Revision: https://phab.mercurial-scm.org/D245
author Boris Feld <boris.feld@octobus.net>
date Wed, 02 Aug 2017 19:39:08 +0200
parents 2cb442bc1a76
children e6d8ee3c9ec3
comparison
equal deleted inserted replaced
33732:32d4f815c4f4 33733:d5acd967f95a
79 79
80 This function respect the repoview filtering, filtered revision will be 80 This function respect the repoview filtering, filtered revision will be
81 considered missing. 81 considered missing.
82 """ 82 """
83 83
84 precursors = repo.obsstore.precursors 84 precursors = repo.obsstore.predecessors
85 stack = [nodeid] 85 stack = [nodeid]
86 seen = set(stack) 86 seen = set(stack)
87 87
88 while stack: 88 while stack:
89 current = stack.pop() 89 current = stack.pop()
113 remaining = set(nodes) 113 remaining = set(nodes)
114 seen = set(remaining) 114 seen = set(remaining)
115 while remaining: 115 while remaining:
116 current = remaining.pop() 116 current = remaining.pop()
117 yield current 117 yield current
118 for mark in obsstore.precursors.get(current, ()): 118 for mark in obsstore.predecessors.get(current, ()):
119 # ignore marker flagged with specified flag 119 # ignore marker flagged with specified flag
120 if mark[2] & ignoreflags: 120 if mark[2] & ignoreflags:
121 continue 121 continue
122 suc = mark[0] 122 suc = mark[0]
123 if suc not in seen: 123 if suc not in seen:
205 # reported as exclusive when they are relevant for other filtered nodes. 205 # reported as exclusive when they are relevant for other filtered nodes.
206 unfi = repo.unfiltered() 206 unfi = repo.unfiltered()
207 207
208 # shortcut to various useful item 208 # shortcut to various useful item
209 nm = unfi.changelog.nodemap 209 nm = unfi.changelog.nodemap
210 precursorsmarkers = unfi.obsstore.precursors 210 precursorsmarkers = unfi.obsstore.predecessors
211 successormarkers = unfi.obsstore.successors 211 successormarkers = unfi.obsstore.successors
212 childrenmarkers = unfi.obsstore.children 212 childrenmarkers = unfi.obsstore.children
213 213
214 # exclusive markers (return of the function) 214 # exclusive markers (return of the function)
215 exclmarkers = set() 215 exclmarkers = set()