##// END OF EJS Templates
commands: rename clone --uncompressed to --stream and document...
Gregory Szorc -
r34394:fffd3369 default
parent child Browse files
Show More
@@ -1294,7 +1294,10 b' def cat(ui, repo, file1, *pats, **opts):'
1294 1294 ('r', 'rev', [], _('include the specified changeset'), _('REV')),
1295 1295 ('b', 'branch', [], _('clone only the specified branch'), _('BRANCH')),
1296 1296 ('', 'pull', None, _('use pull protocol to copy metadata')),
1297 ('', 'uncompressed', None, _('use uncompressed transfer (fast over LAN)')),
1297 ('', 'uncompressed', None,
1298 _('an alias to --stream (DEPRECATED)')),
1299 ('', 'stream', None,
1300 _('clone with minimal data processing')),
1298 1301 ] + remoteopts,
1299 1302 _('[OPTION]... SOURCE [DEST]'),
1300 1303 norepo=True)
@@ -1325,6 +1328,19 b' def clone(ui, source, dest=None, **opts)'
1325 1328 their ancestors. These options (or 'clone src#rev dest') imply
1326 1329 --pull, even for local source repositories.
1327 1330
1331 In normal clone mode, the remote normalizes repository data into a common
1332 exchange format and the receiving end translates this data into its local
1333 storage format. --stream activates a different clone mode that essentially
1334 copies repository files from the remote with minimal data processing. This
1335 significantly reduces the CPU cost of a clone both remotely and locally.
1336 However, it often increases the transferred data size by 30-40%. This can
1337 result in substantially faster clones where I/O throughput is plentiful,
1338 especially for larger repositories. A side-effect of --stream clones is
1339 that storage settings and requirements on the remote are applied locally:
1340 a modern client may inherit legacy or inefficient storage used by the
1341 remote or a legacy Mercurial client may not be able to clone from a
1342 modern Mercurial remote.
1343
1328 1344 .. note::
1329 1345
1330 1346 Specifying a tag will include the tagged changeset but not the
@@ -1376,10 +1392,9 b' def clone(ui, source, dest=None, **opts)'
1376 1392
1377 1393 hg clone ssh://user@server//home/projects/alpha/
1378 1394
1379 - do a high-speed clone over a LAN while checking out a
1380 specified version::
1381
1382 hg clone --uncompressed http://server/repo -u 1.5
1395 - do a streaming clone while checking out a specified version::
1396
1397 hg clone --stream http://server/repo -u 1.5
1383 1398
1384 1399 - create a repository without changesets after a particular revision::
1385 1400
@@ -1399,7 +1414,7 b' def clone(ui, source, dest=None, **opts)'
1399 1414
1400 1415 r = hg.clone(ui, opts, source, dest,
1401 1416 pull=opts.get('pull'),
1402 stream=opts.get('uncompressed'),
1417 stream=opts.get('stream') or opts.get('uncompressed'),
1403 1418 rev=opts.get('rev'),
1404 1419 update=opts.get('updaterev') or not opts.get('noupdate'),
1405 1420 branch=opts.get('branch'),
@@ -394,7 +394,7 b' stream-preferred'
394 394 ----------------
395 395
396 396 If present the server prefers that clients clone using the streaming clone
397 protocol (``hg clone --uncompressed``) rather than the standard
397 protocol (``hg clone --stream``) rather than the standard
398 398 changegroup/bundle based protocol.
399 399
400 400 This capability was introduced in Mercurial 2.2 (released May 2012).
@@ -18,7 +18,16 b' the status call is to check for issue513'
18 18
19 19 Basic clone
20 20
21 $ hg clone --uncompressed -U http://localhost:$HGPORT clone1
21 $ hg clone --stream -U http://localhost:$HGPORT clone1
22 streaming all changes
23 1027 files to transfer, 96.3 KB of data
24 transferred 96.3 KB in * seconds (*/sec) (glob)
25 searching for changes
26 no changes found
27
28 --uncompressed is an alias to --stream
29
30 $ hg clone --uncompressed -U http://localhost:$HGPORT clone1-uncompressed
22 31 streaming all changes
23 32 1027 files to transfer, 96.3 KB of data
24 33 transferred 96.3 KB in * seconds (*/sec) (glob)
@@ -27,7 +36,7 b' Basic clone'
27 36
28 37 Clone with background file closing enabled
29 38
30 $ hg --debug --config worker.backgroundclose=true --config worker.backgroundcloseminfilecount=1 clone --uncompressed -U http://localhost:$HGPORT clone-background | grep -v adding
39 $ hg --debug --config worker.backgroundclose=true --config worker.backgroundcloseminfilecount=1 clone --stream -U http://localhost:$HGPORT clone-background | grep -v adding
31 40 using http://localhost:$HGPORT/
32 41 sending capabilities command
33 42 sending branchmap command
@@ -52,7 +61,7 b' Clone with background file closing enabl'
52 61 Cannot stream clone when there are secret changesets
53 62
54 63 $ hg -R server phase --force --secret -r tip
55 $ hg clone --uncompressed -U http://localhost:$HGPORT secret-denied
64 $ hg clone --stream -U http://localhost:$HGPORT secret-denied
56 65 warning: stream clone requested but server has them disabled
57 66 requesting all changes
58 67 adding changesets
@@ -69,7 +78,7 b' Streaming of secrets can be overridden b'
69 78 $ cat hg.pid > $DAEMON_PIDS
70 79 $ cd ..
71 80
72 $ hg clone --uncompressed -U http://localhost:$HGPORT secret-allowed
81 $ hg clone --stream -U http://localhost:$HGPORT secret-allowed
73 82 streaming all changes
74 83 1027 files to transfer, 96.3 KB of data
75 84 transferred 96.3 KB in * seconds (*/sec) (glob)
@@ -101,7 +110,7 b' Clone not allowed when full bundles disa'
101 110 $ cat hg.pid > $DAEMON_PIDS
102 111 $ cd ..
103 112
104 $ hg clone --uncompressed http://localhost:$HGPORT secret-full-disabled
113 $ hg clone --stream http://localhost:$HGPORT secret-full-disabled
105 114 warning: stream clone requested but server has them disabled
106 115 requesting all changes
107 116 remote: abort: server has pull-based clones disabled
@@ -113,7 +122,7 b' Local stream clone with secrets involved'
113 122 (This is just a test over behavior: if you have access to the repo's files,
114 123 there is no security so it isn't important to prevent a clone here.)
115 124
116 $ hg clone -U --uncompressed server local-secret
125 $ hg clone -U --stream server local-secret
117 126 warning: stream clone requested but server has them disabled
118 127 requesting all changes
119 128 adding changesets
@@ -151,7 +160,7 b' prepare repo with small and big file to '
151 160 clone while modifying the repo between stating file with write lock and
152 161 actually serving file content
153 162
154 $ hg clone -q --uncompressed -U http://localhost:$HGPORT1 clone &
163 $ hg clone -q --stream -U http://localhost:$HGPORT1 clone &
155 164 $ sleep 1
156 165 $ echo >> repo/f1
157 166 $ echo >> repo/f2
@@ -432,7 +432,7 b' Test where attribute is missing from som'
432 432 searching for changes
433 433 no changes found
434 434
435 Test interaction between clone bundles and --uncompressed
435 Test interaction between clone bundles and --stream
436 436
437 437 A manifest with just a gzip bundle
438 438
@@ -440,7 +440,7 b' A manifest with just a gzip bundle'
440 440 > http://localhost:$HGPORT1/gz-a.hg BUNDLESPEC=gzip-v2
441 441 > EOF
442 442
443 $ hg clone -U --uncompressed http://localhost:$HGPORT uncompressed-gzip
443 $ hg clone -U --stream http://localhost:$HGPORT uncompressed-gzip
444 444 no compatible clone bundles available on server; falling back to regular clone
445 445 (you may want to report this to the server operator)
446 446 streaming all changes
@@ -455,7 +455,7 b' A manifest with a stream clone but no BU'
455 455 > http://localhost:$HGPORT1/packed.hg
456 456 > EOF
457 457
458 $ hg clone -U --uncompressed http://localhost:$HGPORT uncompressed-no-bundlespec
458 $ hg clone -U --stream http://localhost:$HGPORT uncompressed-no-bundlespec
459 459 no compatible clone bundles available on server; falling back to regular clone
460 460 (you may want to report this to the server operator)
461 461 streaming all changes
@@ -471,7 +471,7 b' A manifest with a gzip bundle and a stre'
471 471 > http://localhost:$HGPORT1/packed.hg BUNDLESPEC=none-packed1
472 472 > EOF
473 473
474 $ hg clone -U --uncompressed http://localhost:$HGPORT uncompressed-gzip-packed
474 $ hg clone -U --stream http://localhost:$HGPORT uncompressed-gzip-packed
475 475 applying clone bundle from http://localhost:$HGPORT1/packed.hg
476 476 4 files to transfer, 613 bytes of data
477 477 transferred 613 bytes in * seconds (*) (glob)
@@ -486,7 +486,7 b' A manifest with a gzip bundle and stream'
486 486 > http://localhost:$HGPORT1/packed.hg BUNDLESPEC=none-packed1;requirements%3Drevlogv1
487 487 > EOF
488 488
489 $ hg clone -U --uncompressed http://localhost:$HGPORT uncompressed-gzip-packed-requirements
489 $ hg clone -U --stream http://localhost:$HGPORT uncompressed-gzip-packed-requirements
490 490 applying clone bundle from http://localhost:$HGPORT1/packed.hg
491 491 4 files to transfer, 613 bytes of data
492 492 transferred 613 bytes in * seconds (*) (glob)
@@ -501,7 +501,7 b' A manifest with a gzip bundle and a stre'
501 501 > http://localhost:$HGPORT1/packed.hg BUNDLESPEC=none-packed1;requirements%3Drevlogv42
502 502 > EOF
503 503
504 $ hg clone -U --uncompressed http://localhost:$HGPORT uncompressed-gzip-packed-unsupported-requirements
504 $ hg clone -U --stream http://localhost:$HGPORT uncompressed-gzip-packed-unsupported-requirements
505 505 no compatible clone bundles available on server; falling back to regular clone
506 506 (you may want to report this to the server operator)
507 507 streaming all changes
@@ -219,7 +219,7 b' Show all commands + options'
219 219 $ hg debugcommands
220 220 add: include, exclude, subrepos, dry-run
221 221 annotate: rev, follow, no-follow, text, user, file, date, number, changeset, line-number, skip, ignore-all-space, ignore-space-change, ignore-blank-lines, ignore-space-at-eol, include, exclude, template
222 clone: noupdate, updaterev, rev, branch, pull, uncompressed, ssh, remotecmd, insecure
222 clone: noupdate, updaterev, rev, branch, pull, uncompressed, stream, ssh, remotecmd, insecure
223 223 commit: addremove, close-branch, amend, secret, edit, interactive, include, exclude, message, logfile, date, user, subrepos
224 224 diff: rev, change, text, git, binary, nodates, noprefix, show-function, reverse, ignore-all-space, ignore-space-change, ignore-blank-lines, ignore-space-at-eol, unified, stat, root, include, exclude, subrepos
225 225 export: output, switch-parent, rev, text, git, binary, nodates
@@ -40,7 +40,7 b' Test server address cannot be reused'
40 40
41 41 clone via stream
42 42
43 $ hg clone --uncompressed http://localhost:$HGPORT/ copy 2>&1
43 $ hg clone --stream http://localhost:$HGPORT/ copy 2>&1
44 44 streaming all changes
45 45 6 files to transfer, 606 bytes of data
46 46 transferred * bytes in * seconds (*/sec) (glob)
@@ -57,7 +57,7 b' clone via stream'
57 57
58 58 try to clone via stream, should use pull instead
59 59
60 $ hg clone --uncompressed http://localhost:$HGPORT1/ copy2
60 $ hg clone --stream http://localhost:$HGPORT1/ copy2
61 61 warning: stream clone requested but server has them disabled
62 62 requesting all changes
63 63 adding changesets
@@ -75,7 +75,7 b' try to clone via stream but missing requ'
75 75 > localrepo.localrepository.supportedformats.remove('generaldelta')
76 76 > EOF
77 77
78 $ hg clone --config extensions.rsf=$TESTTMP/removesupportedformat.py --uncompressed http://localhost:$HGPORT/ copy3
78 $ hg clone --config extensions.rsf=$TESTTMP/removesupportedformat.py --stream http://localhost:$HGPORT/ copy3
79 79 warning: stream clone requested but client is missing requirements: generaldelta
80 80 (see https://www.mercurial-scm.org/wiki/MissingRequirement for more information)
81 81 requesting all changes
@@ -378,7 +378,7 b' disable pull-based clones'
378 378
379 379 ... but keep stream clones working
380 380
381 $ hg clone --uncompressed --noupdate http://localhost:$HGPORT1/ test-stream-clone
381 $ hg clone --stream --noupdate http://localhost:$HGPORT1/ test-stream-clone
382 382 streaming all changes
383 383 * files to transfer, * of data (glob)
384 384 transferred * in * seconds (* KB/sec) (glob)
@@ -14,7 +14,7 b''
14 14
15 15 url for proxy, stream
16 16
17 $ http_proxy=http://localhost:$HGPORT1/ hg --config http_proxy.always=True clone --uncompressed http://localhost:$HGPORT/ b
17 $ http_proxy=http://localhost:$HGPORT1/ hg --config http_proxy.always=True clone --stream http://localhost:$HGPORT/ b
18 18 streaming all changes
19 19 3 files to transfer, 303 bytes of data
20 20 transferred * bytes in * seconds (*/sec) (glob)
@@ -31,7 +31,7 b' Test server address cannot be reused'
31 31
32 32 clone via stream
33 33
34 $ hg clone --uncompressed http://localhost:$HGPORT/ copy 2>&1
34 $ hg clone --stream http://localhost:$HGPORT/ copy 2>&1
35 35 streaming all changes
36 36 6 files to transfer, 606 bytes of data
37 37 transferred * bytes in * seconds (*/sec) (glob)
@@ -48,7 +48,7 b' clone via stream'
48 48
49 49 try to clone via stream, should use pull instead
50 50
51 $ hg clone --uncompressed http://localhost:$HGPORT1/ copy2
51 $ hg clone --stream http://localhost:$HGPORT1/ copy2
52 52 warning: stream clone requested but server has them disabled
53 53 requesting all changes
54 54 adding changesets
@@ -66,7 +66,7 b' try to clone via stream but missing requ'
66 66 > localrepo.localrepository.supportedformats.remove('generaldelta')
67 67 > EOF
68 68
69 $ hg clone --config extensions.rsf=$TESTTMP/removesupportedformat.py --uncompressed http://localhost:$HGPORT/ copy3
69 $ hg clone --config extensions.rsf=$TESTTMP/removesupportedformat.py --stream http://localhost:$HGPORT/ copy3
70 70 warning: stream clone requested but client is missing requirements: generaldelta
71 71 (see https://www.mercurial-scm.org/wiki/MissingRequirement for more information)
72 72 requesting all changes
@@ -367,7 +367,7 b' disable pull-based clones'
367 367
368 368 ... but keep stream clones working
369 369
370 $ hg clone --uncompressed --noupdate http://localhost:$HGPORT1/ test-stream-clone
370 $ hg clone --stream --noupdate http://localhost:$HGPORT1/ test-stream-clone
371 371 streaming all changes
372 372 * files to transfer, * of data (glob)
373 373 transferred * in * seconds (*/sec) (glob)
@@ -58,7 +58,7 b' non-existent absolute path'
58 58
59 59 clone remote via stream
60 60
61 $ hg clone -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" --uncompressed ssh://user@dummy/remote local-stream
61 $ hg clone -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" --stream ssh://user@dummy/remote local-stream
62 62 streaming all changes
63 63 4 files to transfer, 602 bytes of data
64 64 transferred 602 bytes in * seconds (*) (glob)
@@ -80,7 +80,7 b' clone remote via stream'
80 80 clone bookmarks via stream
81 81
82 82 $ hg -R local-stream book mybook
83 $ hg clone -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" --uncompressed ssh://user@dummy/local-stream stream2
83 $ hg clone -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" --stream ssh://user@dummy/local-stream stream2
84 84 streaming all changes
85 85 4 files to transfer, 602 bytes of data
86 86 transferred 602 bytes in * seconds (*) (glob)
@@ -17,7 +17,7 b" creating 'remote' repo"
17 17 clone remote via stream
18 18
19 19 $ for i in 0 1 2 3 4 5 6 7 8; do
20 > hg clone -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" --uncompressed -r "$i" ssh://user@dummy/remote test-"$i"
20 > hg clone -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" --stream -r "$i" ssh://user@dummy/remote test-"$i"
21 21 > if cd test-"$i"; then
22 22 > hg verify
23 23 > cd ..
@@ -52,7 +52,7 b' non-existent absolute path'
52 52
53 53 clone remote via stream
54 54
55 $ hg clone -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" --uncompressed ssh://user@dummy/remote local-stream
55 $ hg clone -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" --stream ssh://user@dummy/remote local-stream
56 56 streaming all changes
57 57 4 files to transfer, 602 bytes of data
58 58 transferred 602 bytes in * seconds (*) (glob)
@@ -74,7 +74,7 b' clone remote via stream'
74 74 clone bookmarks via stream
75 75
76 76 $ hg -R local-stream book mybook
77 $ hg clone -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" --uncompressed ssh://user@dummy/local-stream stream2
77 $ hg clone -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" --stream ssh://user@dummy/local-stream stream2
78 78 streaming all changes
79 79 4 files to transfer, 602 bytes of data
80 80 transferred 602 bytes in * seconds (*) (glob)
@@ -756,7 +756,7 b' Local clone with fncachestore'
756 756 8 files, 4 changesets, 18 total revisions
757 757
758 758 Stream clone with basicstore
759 $ hg clone --config experimental.changegroup3=True --uncompressed -U \
759 $ hg clone --config experimental.changegroup3=True --stream -U \
760 760 > http://localhost:$HGPORT1 stream-clone-basicstore
761 761 streaming all changes
762 762 18 files to transfer, * of data (glob)
@@ -772,7 +772,7 b' Stream clone with basicstore'
772 772 8 files, 4 changesets, 18 total revisions
773 773
774 774 Stream clone with encodedstore
775 $ hg clone --config experimental.changegroup3=True --uncompressed -U \
775 $ hg clone --config experimental.changegroup3=True --stream -U \
776 776 > http://localhost:$HGPORT2 stream-clone-encodedstore
777 777 streaming all changes
778 778 18 files to transfer, * of data (glob)
@@ -788,7 +788,7 b' Stream clone with encodedstore'
788 788 8 files, 4 changesets, 18 total revisions
789 789
790 790 Stream clone with fncachestore
791 $ hg clone --config experimental.changegroup3=True --uncompressed -U \
791 $ hg clone --config experimental.changegroup3=True --stream -U \
792 792 > http://localhost:$HGPORT stream-clone-fncachestore
793 793 streaming all changes
794 794 18 files to transfer, * of data (glob)
General Comments 0
You need to be logged in to leave comments. Login now