diff --git a/mercurial/changegroup.py b/mercurial/changegroup.py --- a/mercurial/changegroup.py +++ b/mercurial/changegroup.py @@ -701,7 +701,6 @@ """ # if we don't have any revisions touched by these changesets, bail if len(revs) == 0: - yield closechunk() return cl = repo.changelog @@ -754,8 +753,6 @@ if progress: progress.complete() - yield closechunk() - class cgpacker(object): def __init__(self, repo, filematcher, version, allowreorder, deltaparentfn, builddeltaheader, manifestsend, @@ -840,6 +837,10 @@ size += len(chunk) yield chunk + close = closechunk() + size += len(close) + yield closechunk() + self._verbosenote(_('%8.i (changelog)\n') % size) clrevorder = clstate['clrevorder'] @@ -1068,6 +1069,10 @@ size += len(chunk) yield chunk + close = closechunk() + size += len(close) + yield close + self._verbosenote(_('%8.i (manifests)\n') % size) yield self._manifestsend @@ -1166,6 +1171,11 @@ for chunk in it: size += len(chunk) yield chunk + + close = closechunk() + size += len(close) + yield close + self._verbosenote(_('%8.i %s\n') % (size, fname)) progress.complete()