mercurial/streamclone.py
changeset 2621 5a5852a417b1
parent 2612 ffb895f16925
child 2622 064aef9162cc
--- a/mercurial/streamclone.py
+++ b/mercurial/streamclone.py
@@ -59,6 +59,13 @@ def walkrepo(root):
 def stream_out(repo, fileobj):
     '''stream out all metadata files in repository.
     writes to file-like object, must support write() and optional flush().'''
+
+    if not repo.ui.configbool('server', 'stream'):
+        fileobj.write('1\n')
+        return
+
+    fileobj.write('0\n')
+
     # get consistent snapshot of repo. lock during scan so lock not
     # needed while we stream, and commits can happen.
     lock = repo.lock()