Mercurial > hg
changeset 14523:b4175b72bbd8
revlog: bail out earlier in group when we have no chunks
author | Sune Foldager <cryo@cyanite.org> |
---|---|
date | Fri, 03 Jun 2011 20:32:54 +0200 |
parents | 5ca61ef6ff00 |
children | 97d2259af787 |
files | mercurial/revlog.py |
diffstat | 1 files changed, 5 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- 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)