Mercurial > hg
comparison mercurial/localrepo.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 | 17f179805297 |
children | 4417eb761ba8 |
comparison
equal
deleted
inserted
replaced
16360:e5788269741a | 16361:6097ede2be4d |
---|---|
2288 | 2288 |
2289 # if revlog format changes, client will have to check version | 2289 # if revlog format changes, client will have to check version |
2290 # and format flags on "stream" capability, and use | 2290 # and format flags on "stream" capability, and use |
2291 # uncompressed only if compatible. | 2291 # uncompressed only if compatible. |
2292 | 2292 |
2293 if not stream: | |
2294 # if the server explicitely prefer to stream (for fast LANs) | |
2295 stream = remote.capable('stream-preferred') | |
2296 | |
2293 if stream and not heads: | 2297 if stream and not heads: |
2294 # 'stream' means remote revlog format is revlogv1 only | 2298 # 'stream' means remote revlog format is revlogv1 only |
2295 if remote.capable('stream'): | 2299 if remote.capable('stream'): |
2296 return self.stream_in(remote, set(('revlogv1',))) | 2300 return self.stream_in(remote, set(('revlogv1',))) |
2297 # otherwise, 'streamreqs' contains the remote revlog format | 2301 # otherwise, 'streamreqs' contains the remote revlog format |