Mercurial > hg-stable
diff mercurial/revset.py @ 24937:f5518b47cdd1
revset: rename 'revsnode' to 'inputrev' in ancestors
We usually use 'node' for variable containing 20 bytes hash. There is nothing
nodish in this variable, so we rename it to "inputrev" as it old the next entry
of the iteration.
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Wed, 26 Mar 2014 16:14:30 -0700 |
parents | 2aa94b6fe51c |
children | 6db8074f9150 |
line wrap: on
line diff
--- a/mercurial/revset.py Mon May 04 12:36:48 2015 -0700 +++ b/mercurial/revset.py Wed Mar 26 16:14:30 2014 -0700 @@ -25,23 +25,23 @@ cl = repo.changelog def iterate(): - revqueue, revsnode = None, None + revqueue, inputrev = None, None h = [] revs.sort(reverse=True) revqueue = util.deque(revs) if revqueue: - revsnode = revqueue.popleft() - heapq.heappush(h, -revsnode) + inputrev = revqueue.popleft() + heapq.heappush(h, -inputrev) seen = set() while h: current = -heapq.heappop(h) if current not in seen: - if revsnode and current == revsnode: + if inputrev and current == inputrev: if revqueue: - revsnode = revqueue.popleft() - heapq.heappush(h, -revsnode) + inputrev = revqueue.popleft() + heapq.heappush(h, -inputrev) seen.add(current) yield current for parent in cl.parentrevs(current)[:cut]: