diff --git a/mercurial/changegroup.py b/mercurial/changegroup.py --- a/mercurial/changegroup.py +++ b/mercurial/changegroup.py @@ -871,11 +871,16 @@ fnodes = {} # needed file nodes + size = 0 for chunk in self.generatemanifests(commonrevs, clrevorder, fastpathlinkrev, mfs, fnodes, source, clstate['clrevtomanifestrev']): + size += len(chunk) yield chunk + self._verbosenote(_('%8.i (manifests)\n') % size) + yield self._manifestsend + mfdicts = None if self._ellipses and self._isshallow: mfdicts = [(self._repo.manifestlog[n].read(), lr) @@ -1026,7 +1031,6 @@ return clnode return lookupmflinknode - size = 0 while tmfnodes: dir, nodes = tmfnodes.popitem() store = dirlog(dir) @@ -1053,7 +1057,6 @@ if dir: assert self.version == b'03' chunk = _fileheader(dir) - size += len(chunk) yield chunk it = deltagroup( @@ -1066,16 +1069,11 @@ precomputedellipsis=self._precomputedellipsis) for chunk in it: - size += len(chunk) yield chunk close = closechunk() - size += len(close) yield close - self._verbosenote(_('%8.i (manifests)\n') % size) - yield self._manifestsend - # The 'source' parameter is useful for extensions def generatefiles(self, changedfiles, commonrevs, source, mfdicts, fastpathlinkrev, fnodes, clrevs):