hg.clone: set 'stream' depending on whether --pull was requested or not
In an upcoming patch we'll differentiate between the two in localrepo.
--- a/mercurial/hg.py Fri Nov 14 05:53:04 2014 -0800
+++ b/mercurial/hg.py Fri Dec 12 14:02:56 2014 -0800
@@ -284,7 +284,8 @@
dest: URL of destination repository to create (defaults to base
name of source repository)
- pull: always pull from source repository, even in local case
+ pull: always pull from source repository, even in local case or if the
+ server prefers streaming
stream: stream raw data uncompressed from repository (fast over
LAN, slow over WAN)
@@ -420,6 +421,11 @@
revs = [srcpeer.lookup(r) for r in rev]
checkout = revs[0]
if destpeer.local():
+ if not stream:
+ if pull:
+ stream = False
+ else:
+ stream = None
destpeer.local().clone(srcpeer, heads=revs, stream=stream)
elif srcrepo:
exchange.push(srcrepo, destpeer, revs=revs,