revset: rename 'revsnode' to 'inputrev' in ancestors
authorPierre-Yves David <pierre-yves.david@fb.com>
Wed, 26 Mar 2014 16:14:30 -0700
changeset 24937 f5518b47cdd1
parent 24936 2aa94b6fe51c
child 24938 6db8074f9150
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.
mercurial/revset.py
--- 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]: