Mercurial > hg > mercurial-crew
diff mercurial/changegroup.py @ 5903:0136d7f58982
allow the creation of bundles with empty changelog/manifest chunks
author | Alexis S. L. Carvalho <alexis@cecm.usp.br> |
---|---|
date | Sat, 19 Jan 2008 18:01:16 -0200 |
parents | 61462e7d62ed |
children | c050548307a4 |
line wrap: on
line diff
--- a/mercurial/changegroup.py +++ b/mercurial/changegroup.py @@ -80,9 +80,13 @@ # in case of sshrepo because we don't know the end of the stream # an empty chunkiter is the end of the changegroup + # a changegroup has at least 2 chunkiters (changelog and manifest). + # after that, an empty chunkiter is the end of the changegroup empty = False - while not empty: + count = 0 + while not empty or count <= 2: empty = True + count += 1 for chunk in chunkiter(cg): empty = False fh.write(z.compress(chunkheader(len(chunk))))