comparison mercurial/revset.py @ 23956:b1e026c25552 stable

revset: fix ancestors(null) to include null revision (issue4512) Since 13c0327eeb6f, null parent is explicitly excluded. So, there is no reason to have nullrev in the initial seen set.
author Yuya Nishihara <yuya@tcha.org>
date Sun, 25 Jan 2015 20:20:27 +0900
parents 310222feb9a8
children eeb5d5ab14a6
comparison
equal deleted inserted replaced
23955:8a29897d42d2 23956:b1e026c25552
29 revqueue = util.deque(revs) 29 revqueue = util.deque(revs)
30 if revqueue: 30 if revqueue:
31 revsnode = revqueue.popleft() 31 revsnode = revqueue.popleft()
32 heapq.heappush(h, -revsnode) 32 heapq.heappush(h, -revsnode)
33 33
34 seen = set([node.nullrev]) 34 seen = set()
35 while h: 35 while h:
36 current = -heapq.heappop(h) 36 current = -heapq.heappop(h)
37 if current not in seen: 37 if current not in seen:
38 if revsnode and current == revsnode: 38 if revsnode and current == revsnode:
39 if revqueue: 39 if revqueue: