diff mercurial/localrepo.py @ 23546:deabbe7ed54b

localrepo.clone: add a way to override server preferuncompressed Without this patch, if the server sets preferuncompressed, there's no way for clients to override that and force a non-streaming clone. With this patch, we extend the meaning of --pull to also override preferuncompressed and force a non-streaming clone.
author Siddharth Agarwal <sid0@fb.com>
date Fri, 12 Dec 2014 14:06:36 -0800
parents acc73273b27e
children 3198aac7a95d
line wrap: on
line diff
--- a/mercurial/localrepo.py	Fri Dec 12 14:02:56 2014 -0800
+++ b/mercurial/localrepo.py	Fri Dec 12 14:06:36 2014 -0800
@@ -1726,7 +1726,7 @@
         finally:
             lock.release()
 
-    def clone(self, remote, heads=[], stream=False):
+    def clone(self, remote, heads=[], stream=None):
         '''clone remote repository.
 
         keyword arguments:
@@ -1741,7 +1741,7 @@
         # and format flags on "stream" capability, and use
         # uncompressed only if compatible.
 
-        if not stream:
+        if stream is None:
             # if the server explicitly prefers to stream (for fast LANs)
             stream = remote.capable('stream-preferred')