# HG changeset patch # User Sune Foldager # Date 2011-06-03 18:32:54 # Node ID b4175b72bbd888c8f2bc9d9d6034d5f7bfbbeaba # Parent 5ca61ef6ff00bb16f9f0ac61de233da2fa470acd revlog: bail out earlier in group when we have no chunks diff --git a/mercurial/revlog.py b/mercurial/revlog.py --- a/mercurial/revlog.py +++ b/mercurial/revlog.py @@ -1096,6 +1096,11 @@ class revlog(object): 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 @@ class revlog(object): 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)