diff --git a/mercurial/changegroup.py b/mercurial/changegroup.py --- a/mercurial/changegroup.py +++ b/mercurial/changegroup.py @@ -700,7 +700,6 @@ def deltagroup(repo, revs, store, ischan """ # if we don't have any revisions touched by these changesets, bail if len(revs) == 0: - yield closechunk() return cl = repo.changelog @@ -753,8 +752,6 @@ def deltagroup(repo, revs, store, ischan if progress: progress.complete() - yield closechunk() - class cgpacker(object): def __init__(self, repo, filematcher, version, allowreorder, deltaparentfn, builddeltaheader, manifestsend, @@ -839,6 +836,10 @@ class cgpacker(object): size += len(chunk) yield chunk + close = closechunk() + size += len(close) + yield closechunk() + self._verbosenote(_('%8.i (changelog)\n') % size) clrevorder = clstate['clrevorder'] @@ -1067,6 +1068,10 @@ class cgpacker(object): size += len(chunk) yield chunk + close = closechunk() + size += len(close) + yield close + self._verbosenote(_('%8.i (manifests)\n') % size) yield self._manifestsend @@ -1165,6 +1170,11 @@ class cgpacker(object): 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()