Show More
@@ -665,8 +665,16 b' class obsstore(object):' | |||
|
665 | 665 | _addsuccessors(successors, self._all) |
|
666 | 666 | return successors |
|
667 | 667 | |
|
668 | @property | |
|
669 | def precursors(self): | |
|
670 | msg = ("'obsstore.precursors' is deprecated, " | |
|
671 | "use 'obsstore.predecessors'") | |
|
672 | util.nouideprecwarn(msg, '4.4') | |
|
673 | ||
|
674 | return self.predecessors | |
|
675 | ||
|
668 | 676 | @propertycache |
|
669 |
def pre |
|
|
677 | def predecessors(self): | |
|
670 | 678 | predecessors = {} |
|
671 | 679 | _addpredecessors(predecessors, self._all) |
|
672 | 680 | return predecessors |
@@ -686,8 +694,8 b' class obsstore(object):' | |||
|
686 | 694 | self._all.extend(markers) |
|
687 | 695 | if self._cached('successors'): |
|
688 | 696 | _addsuccessors(self.successors, markers) |
|
689 |
if self._cached('pre |
|
|
690 |
_addpredecessors(self.pre |
|
|
697 | if self._cached('predecessors'): | |
|
698 | _addpredecessors(self.predecessors, markers) | |
|
691 | 699 | if self._cached('children'): |
|
692 | 700 | _addchildren(self.children, markers) |
|
693 | 701 | _checkinvalidmarkers(markers) |
@@ -706,7 +714,7 b' class obsstore(object):' | |||
|
706 | 714 | pendingnodes = set(nodes) |
|
707 | 715 | seenmarkers = set() |
|
708 | 716 | seennodes = set(pendingnodes) |
|
709 |
precursorsmarkers = self.pre |
|
|
717 | precursorsmarkers = self.predecessors | |
|
710 | 718 | succsmarkers = self.successors |
|
711 | 719 | children = self.children |
|
712 | 720 | while pendingnodes: |
@@ -957,7 +965,7 b' def _computedivergentset(repo):' | |||
|
957 | 965 | obsstore = repo.obsstore |
|
958 | 966 | newermap = {} |
|
959 | 967 | for ctx in repo.set('(not public()) - obsolete()'): |
|
960 |
mark = obsstore.pre |
|
|
968 | mark = obsstore.predecessors.get(ctx.node(), ()) | |
|
961 | 969 | toprocess = set(mark) |
|
962 | 970 | seen = set() |
|
963 | 971 | while toprocess: |
@@ -971,7 +979,7 b' def _computedivergentset(repo):' | |||
|
971 | 979 | if len(newer) > 1: |
|
972 | 980 | divergent.add(ctx.rev()) |
|
973 | 981 | break |
|
974 |
toprocess.update(obsstore.pre |
|
|
982 | toprocess.update(obsstore.predecessors.get(prec, ())) | |
|
975 | 983 | return divergent |
|
976 | 984 | |
|
977 | 985 |
@@ -81,7 +81,7 b' def closestpredecessors(repo, nodeid):' | |||
|
81 | 81 | considered missing. |
|
82 | 82 | """ |
|
83 | 83 | |
|
84 |
precursors = repo.obsstore.pre |
|
|
84 | precursors = repo.obsstore.predecessors | |
|
85 | 85 | stack = [nodeid] |
|
86 | 86 | seen = set(stack) |
|
87 | 87 | |
@@ -115,7 +115,7 b' def allprecursors(obsstore, nodes, ignor' | |||
|
115 | 115 | while remaining: |
|
116 | 116 | current = remaining.pop() |
|
117 | 117 | yield current |
|
118 |
for mark in obsstore.pre |
|
|
118 | for mark in obsstore.predecessors.get(current, ()): | |
|
119 | 119 | # ignore marker flagged with specified flag |
|
120 | 120 | if mark[2] & ignoreflags: |
|
121 | 121 | continue |
@@ -207,7 +207,7 b' def exclusivemarkers(repo, nodes):' | |||
|
207 | 207 | |
|
208 | 208 | # shortcut to various useful item |
|
209 | 209 | nm = unfi.changelog.nodemap |
|
210 |
precursorsmarkers = unfi.obsstore.pre |
|
|
210 | precursorsmarkers = unfi.obsstore.predecessors | |
|
211 | 211 | successormarkers = unfi.obsstore.successors |
|
212 | 212 | childrenmarkers = unfi.obsstore.children |
|
213 | 213 |
General Comments 0
You need to be logged in to leave comments.
Login now