##// END OF EJS Templates
dagop: just compare with the last value to deduplicate input of revancestors()...
Yuya Nishihara -
r33000:d3d36bcd default
parent child Browse files
Show More
@@ -37,15 +37,15 b' def _genrevancestors(repo, revs, followf'
37 if inputrev is not None:
37 if inputrev is not None:
38 heapq.heappush(pendingheap, -inputrev)
38 heapq.heappush(pendingheap, -inputrev)
39
39
40 seen = set()
40 lastrev = None
41 while pendingheap:
41 while pendingheap:
42 currev = -heapq.heappop(pendingheap)
42 currev = -heapq.heappop(pendingheap)
43 if currev == inputrev:
43 if currev == inputrev:
44 inputrev = next(irevs, None)
44 inputrev = next(irevs, None)
45 if inputrev is not None:
45 if inputrev is not None:
46 heapq.heappush(pendingheap, -inputrev)
46 heapq.heappush(pendingheap, -inputrev)
47 if currev not in seen:
47 if currev != lastrev:
48 seen.add(currev)
48 lastrev = currev
49 yield currev
49 yield currev
50 try:
50 try:
51 for prev in cl.parentrevs(currev)[:cut]:
51 for prev in cl.parentrevs(currev)[:cut]:
General Comments 0
You need to be logged in to leave comments. Login now