Mercurial > hg-stable
diff mercurial/wireproto.py @ 11623:31d0a6d50ee2
protocol: extract compression from streaming mechanics
author | Dirkjan Ochtman <dirkjan@ochtman.nl> |
---|---|
date | Fri, 16 Jul 2010 22:20:10 +0200 |
parents | 1d48681b17a4 |
children | cdeb861335d5 |
line wrap: on
line diff
--- a/mercurial/wireproto.py Fri Jul 16 18:18:35 2010 +0200 +++ b/mercurial/wireproto.py Fri Jul 16 22:20:10 2010 +0200 @@ -173,13 +173,13 @@ def changegroup(repo, proto, roots): nodes = decodelist(roots) cg = repo.changegroup(nodes, 'serve') - proto.sendchangegroup(cg) + proto.sendstream(proto.groupchunks(cg)) def changegroupsubset(repo, proto, bases, heads): bases = decodelist(bases) heads = decodelist(heads) cg = repo.changegroupsubset(bases, heads, 'serve') - proto.sendchangegroup(cg) + proto.sendstream(proto.groupchunks(cg)) def heads(repo, proto): h = repo.heads() @@ -215,10 +215,7 @@ return '%s\n' % int(r) def stream(repo, proto): - try: - proto.sendstream(streamclone.stream_out(repo)) - except streamclone.StreamException, inst: - return str(inst) + proto.sendstream(streamclone.stream_out(repo)) def unbundle(repo, proto, heads): their_heads = decodelist(heads)