Mercurial > hg > mercurial-source
diff mercurial/hg.py @ 23553:68c434799559
hg.clone: set 'stream' depending on whether --pull was requested or not
In an upcoming patch we'll differentiate between the two in localrepo.
author | Siddharth Agarwal <sid0@fb.com> |
---|---|
date | Fri, 12 Dec 2014 14:02:56 -0800 (2014-12-12) |
parents | e53f6b72a0e4 |
children | cd79fb4d75fd |
line wrap: on
line diff
--- a/mercurial/hg.py +++ b/mercurial/hg.py @@ -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,