##// END OF EJS Templates
revset: return early when revs is empty...
Martin von Zweigbergk -
r24938:6db8074f default
parent child Browse files
Show More
@@ -25,20 +25,20 b' def _revancestors(repo, revs, followfirs'
25 25 cl = repo.changelog
26 26
27 27 def iterate():
28 revqueue, inputrev = None, None
29 h = []
30
31 28 revs.sort(reverse=True)
32 29 revqueue = util.deque(revs)
33 if revqueue:
34 inputrev = revqueue.popleft()
35 heapq.heappush(h, -inputrev)
30 if not revqueue:
31 return
32
33 h = []
34 inputrev = revqueue.popleft()
35 heapq.heappush(h, -inputrev)
36 36
37 37 seen = set()
38 38 while h:
39 39 current = -heapq.heappop(h)
40 40 if current not in seen:
41 if inputrev and current == inputrev:
41 if current == inputrev:
42 42 if revqueue:
43 43 inputrev = revqueue.popleft()
44 44 heapq.heappush(h, -inputrev)
General Comments 0
You need to be logged in to leave comments. Login now