Show More
@@ -84,23 +84,20 b' def filectxancestors(fctx, followfirst=F' | |||||
84 | visit[rev] = set() |
|
84 | visit[rev] = set() | |
85 | visit[rev].add(fctx) |
|
85 | visit[rev].add(fctx) | |
86 |
|
86 | |||
87 | c = fctx |
|
|||
88 | if followfirst: |
|
87 | if followfirst: | |
89 | cut = 1 |
|
88 | cut = 1 | |
90 | else: |
|
89 | else: | |
91 | cut = None |
|
90 | cut = None | |
92 |
|
91 | |||
93 | yield c |
|
92 | addvisit(fctx) | |
94 |
while |
|
93 | while visit: | |
95 | for parent in c.parents()[:cut]: |
|
|||
96 | addvisit(parent) |
|
|||
97 | if not visit: |
|
|||
98 | break |
|
|||
99 | rev = max(visit) |
|
94 | rev = max(visit) | |
100 | c = visit[rev].pop() |
|
95 | c = visit[rev].pop() | |
101 | if not visit[rev]: |
|
96 | if not visit[rev]: | |
102 | del visit[rev] |
|
97 | del visit[rev] | |
103 | yield c |
|
98 | yield c | |
|
99 | for parent in c.parents()[:cut]: | |||
|
100 | addvisit(parent) | |||
104 |
|
101 | |||
105 | def _genrevancestors(repo, revs, followfirst, startdepth, stopdepth, cutfunc): |
|
102 | def _genrevancestors(repo, revs, followfirst, startdepth, stopdepth, cutfunc): | |
106 | if followfirst: |
|
103 | if followfirst: |
General Comments 0
You need to be logged in to leave comments.
Login now