This revision was automatically updated to reflect the committed changes. Closed by commit rHGc4a2d19d393a: changegroup: move file chunk emission to generate() (authored by indygreg, committed by ).
REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D4210?vs=10204&id=10234 REVISION DETAIL https://phab.mercurial-scm.org/D4210 AFFECTED FILES mercurial/changegroup.py CHANGE DETAILS diff --git a/mercurial/changegroup.py b/mercurial/changegroup.py --- a/mercurial/changegroup.py +++ b/mercurial/changegroup.py @@ -901,10 +901,24 @@ mfs.clear() clrevs = set(cl.rev(x) for x in clnodes) - for chunk in self.generatefiles(changedfiles, commonrevs, - source, mfdicts, fastpathlinkrev, - fnodes, clrevs): - yield chunk + it = self.generatefiles(changedfiles, commonrevs, + source, mfdicts, fastpathlinkrev, + fnodes, clrevs) + + for path, chunks in it: + h = _fileheader(path) + size = len(h) + yield h + + for chunk in chunks: + size += len(chunk) + yield chunk + + close = closechunk() + size += len(close) + yield close + + self._verbosenote(_('%8.i %s\n') % (size, path)) yield closechunk() @@ -1157,9 +1171,6 @@ self._reorder) progress.update(i + 1, item=fname) - h = _fileheader(fname) - size = len(h) - yield h it = deltagroup( self._repo, revs, filerevlog, False, lookupfilelog, @@ -1169,15 +1180,8 @@ fullclnodes=self._fullclnodes, precomputedellipsis=self._precomputedellipsis) - for chunk in it: - size += len(chunk) - yield chunk + yield fname, it - close = closechunk() - size += len(close) - yield close - - self._verbosenote(_('%8.i %s\n') % (size, fname)) progress.complete() def _deltaparentprev(store, rev, p1, p2, prev): To: indygreg, #hg-reviewers Cc: mercurial-devel _______________________________________________ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel