##// END OF EJS Templates
hg.clone: set 'stream' depending on whether --pull was requested or not...
Siddharth Agarwal -
r23545:68c43479 default
parent child Browse files
Show More
@@ -284,7 +284,8 b' def clone(ui, peeropts, source, dest=Non'
284 dest: URL of destination repository to create (defaults to base
284 dest: URL of destination repository to create (defaults to base
285 name of source repository)
285 name of source repository)
286
286
287 pull: always pull from source repository, even in local case
287 pull: always pull from source repository, even in local case or if the
288 server prefers streaming
288
289
289 stream: stream raw data uncompressed from repository (fast over
290 stream: stream raw data uncompressed from repository (fast over
290 LAN, slow over WAN)
291 LAN, slow over WAN)
@@ -420,6 +421,11 b' def clone(ui, peeropts, source, dest=Non'
420 revs = [srcpeer.lookup(r) for r in rev]
421 revs = [srcpeer.lookup(r) for r in rev]
421 checkout = revs[0]
422 checkout = revs[0]
422 if destpeer.local():
423 if destpeer.local():
424 if not stream:
425 if pull:
426 stream = False
427 else:
428 stream = None
423 destpeer.local().clone(srcpeer, heads=revs, stream=stream)
429 destpeer.local().clone(srcpeer, heads=revs, stream=stream)
424 elif srcrepo:
430 elif srcrepo:
425 exchange.push(srcrepo, destpeer, revs=revs,
431 exchange.push(srcrepo, destpeer, revs=revs,
General Comments 0
You need to be logged in to leave comments. Login now