Mercurial > hg > mercurial-crew-with-dirclash
comparison mercurial/streamclone.py @ 2621:5a5852a417b1
clone: disable stream support on server side by default.
enable in hgrc like this:
[server]
stream=True
author | Vadim Gelfer <vadim.gelfer@gmail.com> |
---|---|
date | Sat, 15 Jul 2006 16:06:35 -0700 |
parents | ffb895f16925 |
children | 064aef9162cc |
comparison
equal
deleted
inserted
replaced
2620:de82749d3a71 | 2621:5a5852a417b1 |
---|---|
57 # server writes out raw file data. | 57 # server writes out raw file data. |
58 | 58 |
59 def stream_out(repo, fileobj): | 59 def stream_out(repo, fileobj): |
60 '''stream out all metadata files in repository. | 60 '''stream out all metadata files in repository. |
61 writes to file-like object, must support write() and optional flush().''' | 61 writes to file-like object, must support write() and optional flush().''' |
62 | |
63 if not repo.ui.configbool('server', 'stream'): | |
64 fileobj.write('1\n') | |
65 return | |
66 | |
67 fileobj.write('0\n') | |
68 | |
62 # get consistent snapshot of repo. lock during scan so lock not | 69 # get consistent snapshot of repo. lock during scan so lock not |
63 # needed while we stream, and commits can happen. | 70 # needed while we stream, and commits can happen. |
64 lock = repo.lock() | 71 lock = repo.lock() |
65 repo.ui.debug('scanning\n') | 72 repo.ui.debug('scanning\n') |
66 entries = [] | 73 entries = [] |