--- a/mercurial/revlog.py Fri Jun 03 20:23:32 2011 +0200
+++ b/mercurial/revlog.py Fri Jun 03 20:32:54 2011 +0200
@@ -1096,6 +1096,11 @@
changegroup starts with a full revision.
"""
+ # if we don't have any revisions touched by these changesets, bail
+ if len(nodelist) == 0:
+ yield bundler.close()
+ return
+
# for generaldelta revlogs, we linearize the revs; this will both be
# much quicker and generate a much smaller bundle
if (self._generaldelta and reorder is not False) or reorder:
@@ -1105,11 +1110,6 @@
else:
revs = sorted([self.rev(n) for n in nodelist])
- # if we don't have any revisions touched by these changesets, bail
- if not revs:
- yield bundler.close()
- return
-
# add the parent of the first rev
p = self.parentrevs(revs[0])[0]
revs.insert(0, p)