changegroup: the node list might be an empty generator (fix issue1678)
authorBenoit Boissinot <benoit.boissinot@ens-lyon.org>
Wed, 27 May 2009 02:46:59 +0200
changeset 8634 7659eecd9da2
parent 8633 c31fe74a6633
child 8635 aaaf4af1c173
changegroup: the node list might be an empty generator (fix issue1678)
mercurial/revlog.py
--- a/mercurial/revlog.py	Tue May 26 23:49:53 2009 +0200
+++ b/mercurial/revlog.py	Wed May 27 02:46:59 2009 +0200
@@ -1150,13 +1150,13 @@
         changesets. parent is parent[0]
         """
 
+        revs = [self.rev(n) for n in nodelist]
+
         # if we don't have any revisions touched by these changesets, bail
-        if not nodelist:
+        if not revs:
             yield changegroup.closechunk()
             return
 
-        revs = [self.rev(n) for n in nodelist]
-
         # add the parent of the first rev
         p = self.parentrevs(revs[0])[0]
         revs.insert(0, p)