changegroup: the node list might be an empty generator (fix
issue1678)
--- 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)