Mercurial > public > mercurial-scm > hg
comparison mercurial/wireproto.py @ 16361:6097ede2be4d
protocol: Add the stream-preferred capability
This makes the client use the uncompressed protocol.
author | Benoit Allard <benoit@aeteurope.nl> |
---|---|
date | Wed, 04 Apr 2012 00:00:47 +0200 |
parents | f9fc46698352 |
children | 9eba72cdde34 |
comparison
equal
deleted
inserted
replaced
16360:e5788269741a | 16361:6097ede2be4d |
---|---|
413 | 413 |
414 def capabilities(repo, proto): | 414 def capabilities(repo, proto): |
415 caps = ('lookup changegroupsubset branchmap pushkey known getbundle ' | 415 caps = ('lookup changegroupsubset branchmap pushkey known getbundle ' |
416 'unbundlehash batch').split() | 416 'unbundlehash batch').split() |
417 if _allowstream(repo.ui): | 417 if _allowstream(repo.ui): |
418 if repo.ui.configbool('server', 'preferuncompressed', False): | |
419 caps.append('stream-preferred') | |
418 requiredformats = repo.requirements & repo.supportedformats | 420 requiredformats = repo.requirements & repo.supportedformats |
419 # if our local revlogs are just revlogv1, add 'stream' cap | 421 # if our local revlogs are just revlogv1, add 'stream' cap |
420 if not requiredformats - set(('revlogv1',)): | 422 if not requiredformats - set(('revlogv1',)): |
421 caps.append('stream') | 423 caps.append('stream') |
422 # otherwise, add 'streamreqs' detailing our local revlog format | 424 # otherwise, add 'streamreqs' detailing our local revlog format |