annotate tests/test-clonebundles.t @ 27737:482eb357fe98

exchange: make clonebundleprefers non-experimental In preparation for making the feature enabled by default.
author Gregory Szorc <gregory.szorc@gmail.com>
date Fri, 08 Jan 2016 10:57:01 -0800
parents 7644d3aeedec
children a0e783d26e81
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
26623
5a95fe44121d clonebundles: support for seeding clones from pre-generated bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
1 Set up a server
5a95fe44121d clonebundles: support for seeding clones from pre-generated bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
2
26932
eb49ffa39fe2 test: use generaldelta in 'test-clonebundle.t'
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 26857
diff changeset
3 $ cat >> $HGRCPATH << EOF
eb49ffa39fe2 test: use generaldelta in 'test-clonebundle.t'
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 26857
diff changeset
4 > [format]
eb49ffa39fe2 test: use generaldelta in 'test-clonebundle.t'
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 26857
diff changeset
5 > usegeneraldelta=yes
eb49ffa39fe2 test: use generaldelta in 'test-clonebundle.t'
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 26857
diff changeset
6 > EOF
26623
5a95fe44121d clonebundles: support for seeding clones from pre-generated bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
7 $ hg init server
5a95fe44121d clonebundles: support for seeding clones from pre-generated bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
8 $ cd server
5a95fe44121d clonebundles: support for seeding clones from pre-generated bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
9 $ cat >> .hg/hgrc << EOF
5a95fe44121d clonebundles: support for seeding clones from pre-generated bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
10 > [extensions]
5a95fe44121d clonebundles: support for seeding clones from pre-generated bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
11 > clonebundles =
5a95fe44121d clonebundles: support for seeding clones from pre-generated bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
12 > EOF
5a95fe44121d clonebundles: support for seeding clones from pre-generated bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
13
5a95fe44121d clonebundles: support for seeding clones from pre-generated bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
14 $ touch foo
5a95fe44121d clonebundles: support for seeding clones from pre-generated bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
15 $ hg -q commit -A -m 'add foo'
5a95fe44121d clonebundles: support for seeding clones from pre-generated bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
16 $ touch bar
5a95fe44121d clonebundles: support for seeding clones from pre-generated bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
17 $ hg -q commit -A -m 'add bar'
5a95fe44121d clonebundles: support for seeding clones from pre-generated bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
18
5a95fe44121d clonebundles: support for seeding clones from pre-generated bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
19 $ hg serve -d -p $HGPORT --pid-file hg.pid --accesslog access.log
5a95fe44121d clonebundles: support for seeding clones from pre-generated bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
20 $ cat hg.pid >> $DAEMON_PIDS
5a95fe44121d clonebundles: support for seeding clones from pre-generated bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
21 $ cd ..
5a95fe44121d clonebundles: support for seeding clones from pre-generated bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
22
5a95fe44121d clonebundles: support for seeding clones from pre-generated bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
23 Feature disabled by default
5a95fe44121d clonebundles: support for seeding clones from pre-generated bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
24 (client should not request manifest)
5a95fe44121d clonebundles: support for seeding clones from pre-generated bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
25
5a95fe44121d clonebundles: support for seeding clones from pre-generated bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
26 $ hg clone -U http://localhost:$HGPORT feature-disabled
5a95fe44121d clonebundles: support for seeding clones from pre-generated bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
27 requesting all changes
5a95fe44121d clonebundles: support for seeding clones from pre-generated bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
28 adding changesets
5a95fe44121d clonebundles: support for seeding clones from pre-generated bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
29 adding manifests
5a95fe44121d clonebundles: support for seeding clones from pre-generated bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
30 adding file changes
5a95fe44121d clonebundles: support for seeding clones from pre-generated bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
31 added 2 changesets with 2 changes to 2 files
5a95fe44121d clonebundles: support for seeding clones from pre-generated bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
32
5a95fe44121d clonebundles: support for seeding clones from pre-generated bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
33 $ cat server/access.log
5a95fe44121d clonebundles: support for seeding clones from pre-generated bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
34 * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
5a95fe44121d clonebundles: support for seeding clones from pre-generated bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
35 * - - [*] "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D (glob)
27432
77d25b913f80 changegroup: introduce cg3, which has support for exchanging treemanifests
Augie Fackler <augie@google.com>
parents: 26952
diff changeset
36 * - - [*] "GET /?cmd=getbundle HTTP/1.1" 200 - x-hgarg-1:bundlecaps=HG20%2Cbundle2%3DHG20%250Achangegroup%253D01%252C02%252C03%250Adigests%253Dmd5%252Csha1%252Csha512%250Aerror%253Dabort%252Cunsupportedcontent%252Cpushraced%252Cpushkey%250Ahgtagsfnodes%250Alistkeys%250Apushkey%250Aremote-changegroup%253Dhttp%252Chttps&cg=1&common=0000000000000000000000000000000000000000&heads=aaff8d2ffbbf07a46dd1f05d8ae7877e3f56e2a2&listkeys=phase%2Cbookmarks (glob)
26623
5a95fe44121d clonebundles: support for seeding clones from pre-generated bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
37 * - - [*] "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases (glob)
5a95fe44121d clonebundles: support for seeding clones from pre-generated bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
38
5a95fe44121d clonebundles: support for seeding clones from pre-generated bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
39 $ cat >> $HGRCPATH << EOF
5a95fe44121d clonebundles: support for seeding clones from pre-generated bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
40 > [experimental]
5a95fe44121d clonebundles: support for seeding clones from pre-generated bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
41 > clonebundles = true
5a95fe44121d clonebundles: support for seeding clones from pre-generated bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
42 > EOF
5a95fe44121d clonebundles: support for seeding clones from pre-generated bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
43
5a95fe44121d clonebundles: support for seeding clones from pre-generated bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
44 Missing manifest should not result in server lookup
5a95fe44121d clonebundles: support for seeding clones from pre-generated bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
45
5a95fe44121d clonebundles: support for seeding clones from pre-generated bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
46 $ hg --verbose clone -U http://localhost:$HGPORT no-manifest
5a95fe44121d clonebundles: support for seeding clones from pre-generated bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
47 requesting all changes
5a95fe44121d clonebundles: support for seeding clones from pre-generated bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
48 adding changesets
5a95fe44121d clonebundles: support for seeding clones from pre-generated bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
49 adding manifests
5a95fe44121d clonebundles: support for seeding clones from pre-generated bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
50 adding file changes
5a95fe44121d clonebundles: support for seeding clones from pre-generated bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
51 added 2 changesets with 2 changes to 2 files
5a95fe44121d clonebundles: support for seeding clones from pre-generated bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
52
5a95fe44121d clonebundles: support for seeding clones from pre-generated bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
53 $ tail -4 server/access.log
5a95fe44121d clonebundles: support for seeding clones from pre-generated bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
54 * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
5a95fe44121d clonebundles: support for seeding clones from pre-generated bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
55 * - - [*] "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D (glob)
27432
77d25b913f80 changegroup: introduce cg3, which has support for exchanging treemanifests
Augie Fackler <augie@google.com>
parents: 26952
diff changeset
56 * - - [*] "GET /?cmd=getbundle HTTP/1.1" 200 - x-hgarg-1:bundlecaps=HG20%2Cbundle2%3DHG20%250Achangegroup%253D01%252C02%252C03%250Adigests%253Dmd5%252Csha1%252Csha512%250Aerror%253Dabort%252Cunsupportedcontent%252Cpushraced%252Cpushkey%250Ahgtagsfnodes%250Alistkeys%250Apushkey%250Aremote-changegroup%253Dhttp%252Chttps&cg=1&common=0000000000000000000000000000000000000000&heads=aaff8d2ffbbf07a46dd1f05d8ae7877e3f56e2a2&listkeys=phase%2Cbookmarks (glob)
26623
5a95fe44121d clonebundles: support for seeding clones from pre-generated bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
57 * - - [*] "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases (glob)
5a95fe44121d clonebundles: support for seeding clones from pre-generated bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
58
5a95fe44121d clonebundles: support for seeding clones from pre-generated bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
59 Empty manifest file results in retrieval
5a95fe44121d clonebundles: support for seeding clones from pre-generated bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
60 (the extension only checks if the manifest file exists)
5a95fe44121d clonebundles: support for seeding clones from pre-generated bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
61
5a95fe44121d clonebundles: support for seeding clones from pre-generated bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
62 $ touch server/.hg/clonebundles.manifest
5a95fe44121d clonebundles: support for seeding clones from pre-generated bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
63 $ hg --verbose clone -U http://localhost:$HGPORT empty-manifest
5a95fe44121d clonebundles: support for seeding clones from pre-generated bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
64 no clone bundles available on remote; falling back to regular clone
5a95fe44121d clonebundles: support for seeding clones from pre-generated bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
65 requesting all changes
5a95fe44121d clonebundles: support for seeding clones from pre-generated bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
66 adding changesets
5a95fe44121d clonebundles: support for seeding clones from pre-generated bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
67 adding manifests
5a95fe44121d clonebundles: support for seeding clones from pre-generated bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
68 adding file changes
5a95fe44121d clonebundles: support for seeding clones from pre-generated bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
69 added 2 changesets with 2 changes to 2 files
5a95fe44121d clonebundles: support for seeding clones from pre-generated bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
70
5a95fe44121d clonebundles: support for seeding clones from pre-generated bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
71 Manifest file with invalid URL aborts
5a95fe44121d clonebundles: support for seeding clones from pre-generated bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
72
5a95fe44121d clonebundles: support for seeding clones from pre-generated bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
73 $ echo 'http://does.not.exist/bundle.hg' > server/.hg/clonebundles.manifest
5a95fe44121d clonebundles: support for seeding clones from pre-generated bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
74 $ hg clone http://localhost:$HGPORT 404-url
5a95fe44121d clonebundles: support for seeding clones from pre-generated bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
75 applying clone bundle from http://does.not.exist/bundle.hg
26952
4e566f513fd8 tests: tolerate differences between Linux and Windows error strings
Matt Harbison <matt_harbison@yahoo.com>
parents: 26932
diff changeset
76 error fetching bundle: (.* not known|getaddrinfo failed) (re)
26623
5a95fe44121d clonebundles: support for seeding clones from pre-generated bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
77 abort: error applying bundle
26688
7394536338bb exchange: provide hint on how to disable clone bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26648
diff changeset
78 (if this error persists, consider contacting the server operator or disable clone bundles via "--config experimental.clonebundles=false")
26623
5a95fe44121d clonebundles: support for seeding clones from pre-generated bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
79 [255]
5a95fe44121d clonebundles: support for seeding clones from pre-generated bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
80
5a95fe44121d clonebundles: support for seeding clones from pre-generated bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
81 Server is not running aborts
5a95fe44121d clonebundles: support for seeding clones from pre-generated bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
82
5a95fe44121d clonebundles: support for seeding clones from pre-generated bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
83 $ echo "http://localhost:$HGPORT1/bundle.hg" > server/.hg/clonebundles.manifest
5a95fe44121d clonebundles: support for seeding clones from pre-generated bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
84 $ hg clone http://localhost:$HGPORT server-not-runner
5a95fe44121d clonebundles: support for seeding clones from pre-generated bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
85 applying clone bundle from http://localhost:$HGPORT1/bundle.hg
26952
4e566f513fd8 tests: tolerate differences between Linux and Windows error strings
Matt Harbison <matt_harbison@yahoo.com>
parents: 26932
diff changeset
86 error fetching bundle: * refused* (glob)
26623
5a95fe44121d clonebundles: support for seeding clones from pre-generated bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
87 abort: error applying bundle
26688
7394536338bb exchange: provide hint on how to disable clone bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26648
diff changeset
88 (if this error persists, consider contacting the server operator or disable clone bundles via "--config experimental.clonebundles=false")
26623
5a95fe44121d clonebundles: support for seeding clones from pre-generated bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
89 [255]
5a95fe44121d clonebundles: support for seeding clones from pre-generated bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
90
5a95fe44121d clonebundles: support for seeding clones from pre-generated bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
91 Server returns 404
5a95fe44121d clonebundles: support for seeding clones from pre-generated bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
92
5a95fe44121d clonebundles: support for seeding clones from pre-generated bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
93 $ python $TESTDIR/dumbhttp.py -p $HGPORT1 --pid http.pid
5a95fe44121d clonebundles: support for seeding clones from pre-generated bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
94 $ cat http.pid >> $DAEMON_PIDS
5a95fe44121d clonebundles: support for seeding clones from pre-generated bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
95 $ hg clone http://localhost:$HGPORT running-404
5a95fe44121d clonebundles: support for seeding clones from pre-generated bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
96 applying clone bundle from http://localhost:$HGPORT1/bundle.hg
5a95fe44121d clonebundles: support for seeding clones from pre-generated bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
97 HTTP error fetching bundle: HTTP Error 404: File not found
5a95fe44121d clonebundles: support for seeding clones from pre-generated bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
98 abort: error applying bundle
26688
7394536338bb exchange: provide hint on how to disable clone bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26648
diff changeset
99 (if this error persists, consider contacting the server operator or disable clone bundles via "--config experimental.clonebundles=false")
26623
5a95fe44121d clonebundles: support for seeding clones from pre-generated bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
100 [255]
5a95fe44121d clonebundles: support for seeding clones from pre-generated bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
101
5a95fe44121d clonebundles: support for seeding clones from pre-generated bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
102 We can override failure to fall back to regular clone
5a95fe44121d clonebundles: support for seeding clones from pre-generated bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
103
5a95fe44121d clonebundles: support for seeding clones from pre-generated bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
104 $ hg --config ui.clonebundlefallback=true clone -U http://localhost:$HGPORT 404-fallback
5a95fe44121d clonebundles: support for seeding clones from pre-generated bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
105 applying clone bundle from http://localhost:$HGPORT1/bundle.hg
5a95fe44121d clonebundles: support for seeding clones from pre-generated bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
106 HTTP error fetching bundle: HTTP Error 404: File not found
5a95fe44121d clonebundles: support for seeding clones from pre-generated bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
107 falling back to normal clone
5a95fe44121d clonebundles: support for seeding clones from pre-generated bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
108 requesting all changes
5a95fe44121d clonebundles: support for seeding clones from pre-generated bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
109 adding changesets
5a95fe44121d clonebundles: support for seeding clones from pre-generated bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
110 adding manifests
5a95fe44121d clonebundles: support for seeding clones from pre-generated bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
111 adding file changes
5a95fe44121d clonebundles: support for seeding clones from pre-generated bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
112 added 2 changesets with 2 changes to 2 files
5a95fe44121d clonebundles: support for seeding clones from pre-generated bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
113
5a95fe44121d clonebundles: support for seeding clones from pre-generated bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
114 Bundle with partial content works
5a95fe44121d clonebundles: support for seeding clones from pre-generated bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
115
26644
74de1c59f71c clonebundles: filter on bundle specification
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26643
diff changeset
116 $ hg -R server bundle --type gzip-v1 --base null -r 53245c60e682 partial.hg
26623
5a95fe44121d clonebundles: support for seeding clones from pre-generated bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
117 1 changesets found
5a95fe44121d clonebundles: support for seeding clones from pre-generated bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
118
26644
74de1c59f71c clonebundles: filter on bundle specification
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26643
diff changeset
119 We verify exact bundle content as an extra check against accidental future
74de1c59f71c clonebundles: filter on bundle specification
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26643
diff changeset
120 changes. If this output changes, we could break old clients.
74de1c59f71c clonebundles: filter on bundle specification
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26643
diff changeset
121
74de1c59f71c clonebundles: filter on bundle specification
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26643
diff changeset
122 $ f --size --hexdump partial.hg
27711
7a678a12a5cf mdiff: don't emit a diff header for empty trivial deltas
Mike Hommey <mh@glandium.org>
parents: 27432
diff changeset
123 partial.hg: size=207
26644
74de1c59f71c clonebundles: filter on bundle specification
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26643
diff changeset
124 0000: 48 47 31 30 47 5a 78 9c 63 60 60 98 17 ac 12 93 |HG10GZx.c``.....|
74de1c59f71c clonebundles: filter on bundle specification
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26643
diff changeset
125 0010: f0 ac a9 23 45 70 cb bf 0d 5f 59 4e 4a 7f 79 21 |...#Ep..._YNJ.y!|
74de1c59f71c clonebundles: filter on bundle specification
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26643
diff changeset
126 0020: 9b cc 40 24 20 a0 d7 ce 2c d1 38 25 cd 24 25 d5 |..@$ ...,.8%.$%.|
74de1c59f71c clonebundles: filter on bundle specification
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26643
diff changeset
127 0030: d8 c2 22 cd 38 d9 24 cd 22 d5 c8 22 cd 24 cd 32 |..".8.$."..".$.2|
74de1c59f71c clonebundles: filter on bundle specification
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26643
diff changeset
128 0040: d1 c2 d0 c4 c8 d2 32 d1 38 39 29 c9 34 cd d4 80 |......2.89).4...|
74de1c59f71c clonebundles: filter on bundle specification
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26643
diff changeset
129 0050: ab 24 b5 b8 84 cb 40 c1 80 2b 2d 3f 9f 8b 2b 31 |.$....@..+-?..+1|
74de1c59f71c clonebundles: filter on bundle specification
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26643
diff changeset
130 0060: 25 45 01 c8 80 9a d2 9b 65 fb e5 9e 45 bf 8d 7f |%E......e...E...|
74de1c59f71c clonebundles: filter on bundle specification
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26643
diff changeset
131 0070: 9f c6 97 9f 2b 44 34 67 d9 ec 8e 0f a0 92 0b 75 |....+D4g.......u|
74de1c59f71c clonebundles: filter on bundle specification
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26643
diff changeset
132 0080: 41 d6 24 59 18 a4 a4 9a a6 18 1a 5b 98 9b 5a 98 |A.$Y.......[..Z.|
74de1c59f71c clonebundles: filter on bundle specification
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26643
diff changeset
133 0090: 9a 18 26 9b a6 19 98 1a 99 99 26 a6 18 9a 98 24 |..&.......&....$|
74de1c59f71c clonebundles: filter on bundle specification
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26643
diff changeset
134 00a0: 26 59 a6 25 5a 98 a5 18 a6 24 71 41 35 b1 43 dc |&Y.%Z....$qA5.C.|
27711
7a678a12a5cf mdiff: don't emit a diff header for empty trivial deltas
Mike Hommey <mh@glandium.org>
parents: 27432
diff changeset
135 00b0: 16 b2 83 f7 e9 45 8b d2 56 c7 a3 1f 82 52 d7 8a |.....E..V....R..|
7a678a12a5cf mdiff: don't emit a diff header for empty trivial deltas
Mike Hommey <mh@glandium.org>
parents: 27432
diff changeset
136 00c0: 78 ed fc d5 76 f1 36 35 dc 05 00 36 ed 5e c7 |x...v.65...6.^.|
26644
74de1c59f71c clonebundles: filter on bundle specification
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26643
diff changeset
137
26623
5a95fe44121d clonebundles: support for seeding clones from pre-generated bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
138 $ echo "http://localhost:$HGPORT1/partial.hg" > server/.hg/clonebundles.manifest
5a95fe44121d clonebundles: support for seeding clones from pre-generated bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
139 $ hg clone -U http://localhost:$HGPORT partial-bundle
5a95fe44121d clonebundles: support for seeding clones from pre-generated bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
140 applying clone bundle from http://localhost:$HGPORT1/partial.hg
5a95fe44121d clonebundles: support for seeding clones from pre-generated bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
141 adding changesets
5a95fe44121d clonebundles: support for seeding clones from pre-generated bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
142 adding manifests
5a95fe44121d clonebundles: support for seeding clones from pre-generated bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
143 adding file changes
5a95fe44121d clonebundles: support for seeding clones from pre-generated bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
144 added 1 changesets with 1 changes to 1 files
5a95fe44121d clonebundles: support for seeding clones from pre-generated bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
145 finished applying clone bundle
5a95fe44121d clonebundles: support for seeding clones from pre-generated bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
146 searching for changes
5a95fe44121d clonebundles: support for seeding clones from pre-generated bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
147 adding changesets
5a95fe44121d clonebundles: support for seeding clones from pre-generated bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
148 adding manifests
5a95fe44121d clonebundles: support for seeding clones from pre-generated bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
149 adding file changes
5a95fe44121d clonebundles: support for seeding clones from pre-generated bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
150 added 1 changesets with 1 changes to 1 files
5a95fe44121d clonebundles: support for seeding clones from pre-generated bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
151
26854
cb4b0ec54990 test-clonebundles.t: add test for incremental pull
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26761
diff changeset
152 Incremental pull doesn't fetch bundle
cb4b0ec54990 test-clonebundles.t: add test for incremental pull
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26761
diff changeset
153
cb4b0ec54990 test-clonebundles.t: add test for incremental pull
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26761
diff changeset
154 $ hg clone -r 53245c60e682 -U http://localhost:$HGPORT partial-clone
cb4b0ec54990 test-clonebundles.t: add test for incremental pull
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26761
diff changeset
155 adding changesets
cb4b0ec54990 test-clonebundles.t: add test for incremental pull
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26761
diff changeset
156 adding manifests
cb4b0ec54990 test-clonebundles.t: add test for incremental pull
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26761
diff changeset
157 adding file changes
cb4b0ec54990 test-clonebundles.t: add test for incremental pull
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26761
diff changeset
158 added 1 changesets with 1 changes to 1 files
cb4b0ec54990 test-clonebundles.t: add test for incremental pull
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26761
diff changeset
159
cb4b0ec54990 test-clonebundles.t: add test for incremental pull
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26761
diff changeset
160 $ cd partial-clone
cb4b0ec54990 test-clonebundles.t: add test for incremental pull
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26761
diff changeset
161 $ hg pull
cb4b0ec54990 test-clonebundles.t: add test for incremental pull
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26761
diff changeset
162 pulling from http://localhost:$HGPORT/
cb4b0ec54990 test-clonebundles.t: add test for incremental pull
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26761
diff changeset
163 searching for changes
cb4b0ec54990 test-clonebundles.t: add test for incremental pull
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26761
diff changeset
164 adding changesets
cb4b0ec54990 test-clonebundles.t: add test for incremental pull
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26761
diff changeset
165 adding manifests
cb4b0ec54990 test-clonebundles.t: add test for incremental pull
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26761
diff changeset
166 adding file changes
cb4b0ec54990 test-clonebundles.t: add test for incremental pull
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26761
diff changeset
167 added 1 changesets with 1 changes to 1 files
cb4b0ec54990 test-clonebundles.t: add test for incremental pull
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26761
diff changeset
168 (run 'hg update' to get a working copy)
cb4b0ec54990 test-clonebundles.t: add test for incremental pull
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26761
diff changeset
169 $ cd ..
cb4b0ec54990 test-clonebundles.t: add test for incremental pull
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26761
diff changeset
170
26623
5a95fe44121d clonebundles: support for seeding clones from pre-generated bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
171 Bundle with full content works
5a95fe44121d clonebundles: support for seeding clones from pre-generated bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
172
26643
d2e16419d3f4 clonebundle: support bundle2
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26623
diff changeset
173 $ hg -R server bundle --type gzip-v2 --base null -r tip full.hg
26623
5a95fe44121d clonebundles: support for seeding clones from pre-generated bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
174 2 changesets found
5a95fe44121d clonebundles: support for seeding clones from pre-generated bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
175
26644
74de1c59f71c clonebundles: filter on bundle specification
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26643
diff changeset
176 Again, we perform an extra check against bundle content changes. If this content
74de1c59f71c clonebundles: filter on bundle specification
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26643
diff changeset
177 changes, clone bundles produced by new Mercurial versions may not be readable
74de1c59f71c clonebundles: filter on bundle specification
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26643
diff changeset
178 by old clients.
74de1c59f71c clonebundles: filter on bundle specification
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26643
diff changeset
179
74de1c59f71c clonebundles: filter on bundle specification
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26643
diff changeset
180 $ f --size --hexdump full.hg
27711
7a678a12a5cf mdiff: don't emit a diff header for empty trivial deltas
Mike Hommey <mh@glandium.org>
parents: 27432
diff changeset
181 full.hg: size=406
26644
74de1c59f71c clonebundles: filter on bundle specification
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26643
diff changeset
182 0000: 48 47 32 30 00 00 00 0e 43 6f 6d 70 72 65 73 73 |HG20....Compress|
74de1c59f71c clonebundles: filter on bundle specification
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26643
diff changeset
183 0010: 69 6f 6e 3d 47 5a 78 9c 63 60 60 90 e5 76 f6 70 |ion=GZx.c``..v.p|
74de1c59f71c clonebundles: filter on bundle specification
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26643
diff changeset
184 0020: f4 73 77 75 0f f2 0f 0d 60 00 02 46 06 76 a6 b2 |.swu....`..F.v..|
27711
7a678a12a5cf mdiff: don't emit a diff header for empty trivial deltas
Mike Hommey <mh@glandium.org>
parents: 27432
diff changeset
185 0030: d4 a2 e2 cc fc 3c 03 23 06 06 e6 65 40 b1 4d c1 |.....<.#...e@.M.|
26644
74de1c59f71c clonebundles: filter on bundle specification
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26643
diff changeset
186 0040: 2a 31 09 cf 9a 3a 52 04 b7 fc db f0 95 e5 a4 f4 |*1...:R.........|
74de1c59f71c clonebundles: filter on bundle specification
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26643
diff changeset
187 0050: 97 17 b2 c9 0c 14 00 02 e6 d9 99 25 1a a7 a4 99 |...........%....|
74de1c59f71c clonebundles: filter on bundle specification
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26643
diff changeset
188 0060: a4 a4 1a 5b 58 a4 19 27 9b a4 59 a4 1a 59 a4 99 |...[X..'..Y..Y..|
74de1c59f71c clonebundles: filter on bundle specification
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26643
diff changeset
189 0070: a4 59 26 5a 18 9a 18 59 5a 26 1a 27 27 25 99 a6 |.Y&Z...YZ&.''%..|
74de1c59f71c clonebundles: filter on bundle specification
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26643
diff changeset
190 0080: 99 1a 70 95 a4 16 97 70 19 28 18 70 a5 e5 e7 73 |..p....p.(.p...s|
74de1c59f71c clonebundles: filter on bundle specification
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26643
diff changeset
191 0090: 71 25 a6 a4 28 00 19 40 13 0e ac fa df ab ff 7b |q%..(..@.......{|
74de1c59f71c clonebundles: filter on bundle specification
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26643
diff changeset
192 00a0: 3f fb 92 dc 8b 1f 62 bb 9e b7 d7 d9 87 3d 5a 44 |?.....b......=ZD|
74de1c59f71c clonebundles: filter on bundle specification
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26643
diff changeset
193 00b0: ac 2f b0 a9 c3 66 1e 54 b9 26 08 a7 1a 1b 1a a7 |./...f.T.&......|
74de1c59f71c clonebundles: filter on bundle specification
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26643
diff changeset
194 00c0: 25 1b 9a 1b 99 19 9a 5a 18 9b a6 18 19 00 dd 67 |%......Z.......g|
74de1c59f71c clonebundles: filter on bundle specification
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26643
diff changeset
195 00d0: 61 61 98 06 f4 80 49 4a 8a 65 52 92 41 9a 81 81 |aa....IJ.eR.A...|
74de1c59f71c clonebundles: filter on bundle specification
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26643
diff changeset
196 00e0: a5 11 17 50 31 30 58 19 cc 80 98 25 29 b1 08 c4 |...P10X....%)...|
74de1c59f71c clonebundles: filter on bundle specification
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26643
diff changeset
197 00f0: 37 07 79 19 88 d9 41 ee 07 8a 41 cd 5d 98 65 fb |7.y...A...A.].e.|
74de1c59f71c clonebundles: filter on bundle specification
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26643
diff changeset
198 0100: e5 9e 45 bf 8d 7f 9f c6 97 9f 2b 44 34 67 d9 ec |..E.......+D4g..|
74de1c59f71c clonebundles: filter on bundle specification
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26643
diff changeset
199 0110: 8e 0f a0 61 a8 eb 82 82 2e c9 c2 20 25 d5 34 c5 |...a....... %.4.|
74de1c59f71c clonebundles: filter on bundle specification
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26643
diff changeset
200 0120: d0 d8 c2 dc d4 c2 d4 c4 30 d9 34 cd c0 d4 c8 cc |........0.4.....|
74de1c59f71c clonebundles: filter on bundle specification
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26643
diff changeset
201 0130: 34 31 c5 d0 c4 24 31 c9 32 2d d1 c2 2c c5 30 25 |41...$1.2-..,.0%|
74de1c59f71c clonebundles: filter on bundle specification
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26643
diff changeset
202 0140: 09 e4 ee 85 8f 85 ff 88 ab 89 36 c7 2a c4 47 34 |..........6.*.G4|
74de1c59f71c clonebundles: filter on bundle specification
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26643
diff changeset
203 0150: fe f8 ec 7b 73 37 3f c3 24 62 1d 8d 4d 1d 9e 40 |...{s7?.$b..M..@|
27711
7a678a12a5cf mdiff: don't emit a diff header for empty trivial deltas
Mike Hommey <mh@glandium.org>
parents: 27432
diff changeset
204 0160: 06 3b 10 14 36 a4 38 10 04 d8 21 01 9a b1 83 f7 |.;..6.8...!.....|
26644
74de1c59f71c clonebundles: filter on bundle specification
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26643
diff changeset
205 0170: e9 45 8b d2 56 c7 a3 1f 82 52 d7 8a 78 ed fc d5 |.E..V....R..x...|
27711
7a678a12a5cf mdiff: don't emit a diff header for empty trivial deltas
Mike Hommey <mh@glandium.org>
parents: 27432
diff changeset
206 0180: 76 f1 36 25 81 89 c7 ad ec 90 34 48 75 2b 89 49 |v.6%......4Hu+.I|
7a678a12a5cf mdiff: don't emit a diff header for empty trivial deltas
Mike Hommey <mh@glandium.org>
parents: 27432
diff changeset
207 0190: bf 00 d6 97 f0 8d |......|
26644
74de1c59f71c clonebundles: filter on bundle specification
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26643
diff changeset
208
26623
5a95fe44121d clonebundles: support for seeding clones from pre-generated bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
209 $ echo "http://localhost:$HGPORT1/full.hg" > server/.hg/clonebundles.manifest
5a95fe44121d clonebundles: support for seeding clones from pre-generated bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
210 $ hg clone -U http://localhost:$HGPORT full-bundle
5a95fe44121d clonebundles: support for seeding clones from pre-generated bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
211 applying clone bundle from http://localhost:$HGPORT1/full.hg
5a95fe44121d clonebundles: support for seeding clones from pre-generated bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
212 adding changesets
5a95fe44121d clonebundles: support for seeding clones from pre-generated bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
213 adding manifests
5a95fe44121d clonebundles: support for seeding clones from pre-generated bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
214 adding file changes
5a95fe44121d clonebundles: support for seeding clones from pre-generated bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
215 added 2 changesets with 2 changes to 2 files
5a95fe44121d clonebundles: support for seeding clones from pre-generated bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
216 finished applying clone bundle
5a95fe44121d clonebundles: support for seeding clones from pre-generated bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
217 searching for changes
5a95fe44121d clonebundles: support for seeding clones from pre-generated bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
218 no changes found
26644
74de1c59f71c clonebundles: filter on bundle specification
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26643
diff changeset
219
26857
e5a1df51bb25 wireproto: move clonebundles command from extension (issue4931)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26855
diff changeset
220 Feature works over SSH
e5a1df51bb25 wireproto: move clonebundles command from extension (issue4931)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26855
diff changeset
221
e5a1df51bb25 wireproto: move clonebundles command from extension (issue4931)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26855
diff changeset
222 $ hg clone -U -e "python \"$TESTDIR/dummyssh\"" ssh://user@dummy/server ssh-full-clone
e5a1df51bb25 wireproto: move clonebundles command from extension (issue4931)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26855
diff changeset
223 applying clone bundle from http://localhost:$HGPORT1/full.hg
e5a1df51bb25 wireproto: move clonebundles command from extension (issue4931)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26855
diff changeset
224 adding changesets
e5a1df51bb25 wireproto: move clonebundles command from extension (issue4931)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26855
diff changeset
225 adding manifests
e5a1df51bb25 wireproto: move clonebundles command from extension (issue4931)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26855
diff changeset
226 adding file changes
e5a1df51bb25 wireproto: move clonebundles command from extension (issue4931)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26855
diff changeset
227 added 2 changesets with 2 changes to 2 files
e5a1df51bb25 wireproto: move clonebundles command from extension (issue4931)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26855
diff changeset
228 finished applying clone bundle
e5a1df51bb25 wireproto: move clonebundles command from extension (issue4931)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26855
diff changeset
229 searching for changes
e5a1df51bb25 wireproto: move clonebundles command from extension (issue4931)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26855
diff changeset
230 no changes found
e5a1df51bb25 wireproto: move clonebundles command from extension (issue4931)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26855
diff changeset
231
26644
74de1c59f71c clonebundles: filter on bundle specification
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26643
diff changeset
232 Entry with unknown BUNDLESPEC is filtered and not used
74de1c59f71c clonebundles: filter on bundle specification
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26643
diff changeset
233
74de1c59f71c clonebundles: filter on bundle specification
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26643
diff changeset
234 $ cat > server/.hg/clonebundles.manifest << EOF
74de1c59f71c clonebundles: filter on bundle specification
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26643
diff changeset
235 > http://bad.entry1 BUNDLESPEC=UNKNOWN
74de1c59f71c clonebundles: filter on bundle specification
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26643
diff changeset
236 > http://bad.entry2 BUNDLESPEC=xz-v1
74de1c59f71c clonebundles: filter on bundle specification
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26643
diff changeset
237 > http://bad.entry3 BUNDLESPEC=none-v100
74de1c59f71c clonebundles: filter on bundle specification
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26643
diff changeset
238 > http://localhost:$HGPORT1/full.hg BUNDLESPEC=gzip-v2
74de1c59f71c clonebundles: filter on bundle specification
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26643
diff changeset
239 > EOF
74de1c59f71c clonebundles: filter on bundle specification
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26643
diff changeset
240
74de1c59f71c clonebundles: filter on bundle specification
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26643
diff changeset
241 $ hg clone -U http://localhost:$HGPORT filter-unknown-type
74de1c59f71c clonebundles: filter on bundle specification
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26643
diff changeset
242 applying clone bundle from http://localhost:$HGPORT1/full.hg
74de1c59f71c clonebundles: filter on bundle specification
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26643
diff changeset
243 adding changesets
74de1c59f71c clonebundles: filter on bundle specification
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26643
diff changeset
244 adding manifests
74de1c59f71c clonebundles: filter on bundle specification
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26643
diff changeset
245 adding file changes
74de1c59f71c clonebundles: filter on bundle specification
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26643
diff changeset
246 added 2 changesets with 2 changes to 2 files
74de1c59f71c clonebundles: filter on bundle specification
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26643
diff changeset
247 finished applying clone bundle
74de1c59f71c clonebundles: filter on bundle specification
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26643
diff changeset
248 searching for changes
74de1c59f71c clonebundles: filter on bundle specification
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26643
diff changeset
249 no changes found
74de1c59f71c clonebundles: filter on bundle specification
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26643
diff changeset
250
74de1c59f71c clonebundles: filter on bundle specification
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26643
diff changeset
251 Automatic fallback when all entries are filtered
74de1c59f71c clonebundles: filter on bundle specification
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26643
diff changeset
252
74de1c59f71c clonebundles: filter on bundle specification
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26643
diff changeset
253 $ cat > server/.hg/clonebundles.manifest << EOF
74de1c59f71c clonebundles: filter on bundle specification
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26643
diff changeset
254 > http://bad.entry BUNDLESPEC=UNKNOWN
74de1c59f71c clonebundles: filter on bundle specification
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26643
diff changeset
255 > EOF
74de1c59f71c clonebundles: filter on bundle specification
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26643
diff changeset
256
74de1c59f71c clonebundles: filter on bundle specification
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26643
diff changeset
257 $ hg clone -U http://localhost:$HGPORT filter-all
74de1c59f71c clonebundles: filter on bundle specification
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26643
diff changeset
258 no compatible clone bundles available on server; falling back to regular clone
74de1c59f71c clonebundles: filter on bundle specification
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26643
diff changeset
259 (you may want to report this to the server operator)
74de1c59f71c clonebundles: filter on bundle specification
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26643
diff changeset
260 requesting all changes
74de1c59f71c clonebundles: filter on bundle specification
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26643
diff changeset
261 adding changesets
74de1c59f71c clonebundles: filter on bundle specification
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26643
diff changeset
262 adding manifests
74de1c59f71c clonebundles: filter on bundle specification
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26643
diff changeset
263 adding file changes
74de1c59f71c clonebundles: filter on bundle specification
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26643
diff changeset
264 added 2 changesets with 2 changes to 2 files
26645
2faa7671a4b3 clonebundles: filter on SNI requirement
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26644
diff changeset
265
2faa7671a4b3 clonebundles: filter on SNI requirement
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26644
diff changeset
266 URLs requiring SNI are filtered in Python <2.7.9
2faa7671a4b3 clonebundles: filter on SNI requirement
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26644
diff changeset
267
2faa7671a4b3 clonebundles: filter on SNI requirement
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26644
diff changeset
268 $ cp full.hg sni.hg
2faa7671a4b3 clonebundles: filter on SNI requirement
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26644
diff changeset
269 $ cat > server/.hg/clonebundles.manifest << EOF
2faa7671a4b3 clonebundles: filter on SNI requirement
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26644
diff changeset
270 > http://localhost:$HGPORT1/sni.hg REQUIRESNI=true
2faa7671a4b3 clonebundles: filter on SNI requirement
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26644
diff changeset
271 > http://localhost:$HGPORT1/full.hg
2faa7671a4b3 clonebundles: filter on SNI requirement
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26644
diff changeset
272 > EOF
2faa7671a4b3 clonebundles: filter on SNI requirement
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26644
diff changeset
273
2faa7671a4b3 clonebundles: filter on SNI requirement
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26644
diff changeset
274 #if sslcontext
2faa7671a4b3 clonebundles: filter on SNI requirement
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26644
diff changeset
275 Python 2.7.9+ support SNI
2faa7671a4b3 clonebundles: filter on SNI requirement
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26644
diff changeset
276
2faa7671a4b3 clonebundles: filter on SNI requirement
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26644
diff changeset
277 $ hg clone -U http://localhost:$HGPORT sni-supported
2faa7671a4b3 clonebundles: filter on SNI requirement
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26644
diff changeset
278 applying clone bundle from http://localhost:$HGPORT1/sni.hg
2faa7671a4b3 clonebundles: filter on SNI requirement
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26644
diff changeset
279 adding changesets
2faa7671a4b3 clonebundles: filter on SNI requirement
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26644
diff changeset
280 adding manifests
2faa7671a4b3 clonebundles: filter on SNI requirement
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26644
diff changeset
281 adding file changes
2faa7671a4b3 clonebundles: filter on SNI requirement
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26644
diff changeset
282 added 2 changesets with 2 changes to 2 files
2faa7671a4b3 clonebundles: filter on SNI requirement
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26644
diff changeset
283 finished applying clone bundle
2faa7671a4b3 clonebundles: filter on SNI requirement
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26644
diff changeset
284 searching for changes
2faa7671a4b3 clonebundles: filter on SNI requirement
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26644
diff changeset
285 no changes found
2faa7671a4b3 clonebundles: filter on SNI requirement
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26644
diff changeset
286 #else
2faa7671a4b3 clonebundles: filter on SNI requirement
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26644
diff changeset
287 Python <2.7.9 will filter SNI URLs
2faa7671a4b3 clonebundles: filter on SNI requirement
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26644
diff changeset
288
2faa7671a4b3 clonebundles: filter on SNI requirement
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26644
diff changeset
289 $ hg clone -U http://localhost:$HGPORT sni-unsupported
2faa7671a4b3 clonebundles: filter on SNI requirement
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26644
diff changeset
290 applying clone bundle from http://localhost:$HGPORT1/full.hg
2faa7671a4b3 clonebundles: filter on SNI requirement
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26644
diff changeset
291 adding changesets
2faa7671a4b3 clonebundles: filter on SNI requirement
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26644
diff changeset
292 adding manifests
2faa7671a4b3 clonebundles: filter on SNI requirement
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26644
diff changeset
293 adding file changes
2faa7671a4b3 clonebundles: filter on SNI requirement
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26644
diff changeset
294 added 2 changesets with 2 changes to 2 files
2faa7671a4b3 clonebundles: filter on SNI requirement
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26644
diff changeset
295 finished applying clone bundle
2faa7671a4b3 clonebundles: filter on SNI requirement
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26644
diff changeset
296 searching for changes
2faa7671a4b3 clonebundles: filter on SNI requirement
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26644
diff changeset
297 no changes found
2faa7671a4b3 clonebundles: filter on SNI requirement
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26644
diff changeset
298 #endif
26648
c347d532bb56 exchange: support sorting URLs by client-side preferences
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26645
diff changeset
299
26761
8270ee357dd9 exchange: support streaming clone bundles in clone bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26732
diff changeset
300 Stream clone bundles are supported
8270ee357dd9 exchange: support streaming clone bundles in clone bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26732
diff changeset
301
8270ee357dd9 exchange: support streaming clone bundles in clone bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26732
diff changeset
302 $ hg -R server debugcreatestreamclonebundle packed.hg
8270ee357dd9 exchange: support streaming clone bundles in clone bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26732
diff changeset
303 writing 613 bytes for 4 files
26932
eb49ffa39fe2 test: use generaldelta in 'test-clonebundle.t'
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 26857
diff changeset
304 bundle requirements: generaldelta, revlogv1
26761
8270ee357dd9 exchange: support streaming clone bundles in clone bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26732
diff changeset
305
8270ee357dd9 exchange: support streaming clone bundles in clone bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26732
diff changeset
306 No bundle spec should work
8270ee357dd9 exchange: support streaming clone bundles in clone bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26732
diff changeset
307
8270ee357dd9 exchange: support streaming clone bundles in clone bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26732
diff changeset
308 $ cat > server/.hg/clonebundles.manifest << EOF
8270ee357dd9 exchange: support streaming clone bundles in clone bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26732
diff changeset
309 > http://localhost:$HGPORT1/packed.hg
8270ee357dd9 exchange: support streaming clone bundles in clone bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26732
diff changeset
310 > EOF
8270ee357dd9 exchange: support streaming clone bundles in clone bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26732
diff changeset
311
8270ee357dd9 exchange: support streaming clone bundles in clone bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26732
diff changeset
312 $ hg clone -U http://localhost:$HGPORT stream-clone-no-spec
8270ee357dd9 exchange: support streaming clone bundles in clone bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26732
diff changeset
313 applying clone bundle from http://localhost:$HGPORT1/packed.hg
8270ee357dd9 exchange: support streaming clone bundles in clone bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26732
diff changeset
314 4 files to transfer, 613 bytes of data
8270ee357dd9 exchange: support streaming clone bundles in clone bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26732
diff changeset
315 transferred 613 bytes in *.* seconds (*) (glob)
8270ee357dd9 exchange: support streaming clone bundles in clone bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26732
diff changeset
316 finished applying clone bundle
8270ee357dd9 exchange: support streaming clone bundles in clone bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26732
diff changeset
317 searching for changes
8270ee357dd9 exchange: support streaming clone bundles in clone bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26732
diff changeset
318 no changes found
8270ee357dd9 exchange: support streaming clone bundles in clone bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26732
diff changeset
319
8270ee357dd9 exchange: support streaming clone bundles in clone bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26732
diff changeset
320 Bundle spec without parameters should work
8270ee357dd9 exchange: support streaming clone bundles in clone bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26732
diff changeset
321
8270ee357dd9 exchange: support streaming clone bundles in clone bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26732
diff changeset
322 $ cat > server/.hg/clonebundles.manifest << EOF
8270ee357dd9 exchange: support streaming clone bundles in clone bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26732
diff changeset
323 > http://localhost:$HGPORT1/packed.hg BUNDLESPEC=none-packed1
8270ee357dd9 exchange: support streaming clone bundles in clone bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26732
diff changeset
324 > EOF
8270ee357dd9 exchange: support streaming clone bundles in clone bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26732
diff changeset
325
8270ee357dd9 exchange: support streaming clone bundles in clone bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26732
diff changeset
326 $ hg clone -U http://localhost:$HGPORT stream-clone-vanilla-spec
8270ee357dd9 exchange: support streaming clone bundles in clone bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26732
diff changeset
327 applying clone bundle from http://localhost:$HGPORT1/packed.hg
8270ee357dd9 exchange: support streaming clone bundles in clone bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26732
diff changeset
328 4 files to transfer, 613 bytes of data
8270ee357dd9 exchange: support streaming clone bundles in clone bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26732
diff changeset
329 transferred 613 bytes in *.* seconds (*) (glob)
8270ee357dd9 exchange: support streaming clone bundles in clone bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26732
diff changeset
330 finished applying clone bundle
8270ee357dd9 exchange: support streaming clone bundles in clone bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26732
diff changeset
331 searching for changes
8270ee357dd9 exchange: support streaming clone bundles in clone bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26732
diff changeset
332 no changes found
8270ee357dd9 exchange: support streaming clone bundles in clone bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26732
diff changeset
333
8270ee357dd9 exchange: support streaming clone bundles in clone bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26732
diff changeset
334 Bundle spec with format requirements should work
8270ee357dd9 exchange: support streaming clone bundles in clone bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26732
diff changeset
335
8270ee357dd9 exchange: support streaming clone bundles in clone bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26732
diff changeset
336 $ cat > server/.hg/clonebundles.manifest << EOF
8270ee357dd9 exchange: support streaming clone bundles in clone bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26732
diff changeset
337 > http://localhost:$HGPORT1/packed.hg BUNDLESPEC=none-packed1;requirements%3Drevlogv1
8270ee357dd9 exchange: support streaming clone bundles in clone bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26732
diff changeset
338 > EOF
8270ee357dd9 exchange: support streaming clone bundles in clone bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26732
diff changeset
339
8270ee357dd9 exchange: support streaming clone bundles in clone bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26732
diff changeset
340 $ hg clone -U http://localhost:$HGPORT stream-clone-supported-requirements
8270ee357dd9 exchange: support streaming clone bundles in clone bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26732
diff changeset
341 applying clone bundle from http://localhost:$HGPORT1/packed.hg
8270ee357dd9 exchange: support streaming clone bundles in clone bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26732
diff changeset
342 4 files to transfer, 613 bytes of data
8270ee357dd9 exchange: support streaming clone bundles in clone bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26732
diff changeset
343 transferred 613 bytes in *.* seconds (*) (glob)
8270ee357dd9 exchange: support streaming clone bundles in clone bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26732
diff changeset
344 finished applying clone bundle
8270ee357dd9 exchange: support streaming clone bundles in clone bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26732
diff changeset
345 searching for changes
8270ee357dd9 exchange: support streaming clone bundles in clone bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26732
diff changeset
346 no changes found
8270ee357dd9 exchange: support streaming clone bundles in clone bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26732
diff changeset
347
8270ee357dd9 exchange: support streaming clone bundles in clone bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26732
diff changeset
348 Stream bundle spec with unknown requirements should be filtered out
8270ee357dd9 exchange: support streaming clone bundles in clone bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26732
diff changeset
349
8270ee357dd9 exchange: support streaming clone bundles in clone bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26732
diff changeset
350 $ cat > server/.hg/clonebundles.manifest << EOF
8270ee357dd9 exchange: support streaming clone bundles in clone bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26732
diff changeset
351 > http://localhost:$HGPORT1/packed.hg BUNDLESPEC=none-packed1;requirements%3Drevlogv42
8270ee357dd9 exchange: support streaming clone bundles in clone bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26732
diff changeset
352 > EOF
8270ee357dd9 exchange: support streaming clone bundles in clone bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26732
diff changeset
353
8270ee357dd9 exchange: support streaming clone bundles in clone bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26732
diff changeset
354 $ hg clone -U http://localhost:$HGPORT stream-clone-unsupported-requirements
8270ee357dd9 exchange: support streaming clone bundles in clone bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26732
diff changeset
355 no compatible clone bundles available on server; falling back to regular clone
8270ee357dd9 exchange: support streaming clone bundles in clone bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26732
diff changeset
356 (you may want to report this to the server operator)
8270ee357dd9 exchange: support streaming clone bundles in clone bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26732
diff changeset
357 requesting all changes
8270ee357dd9 exchange: support streaming clone bundles in clone bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26732
diff changeset
358 adding changesets
8270ee357dd9 exchange: support streaming clone bundles in clone bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26732
diff changeset
359 adding manifests
8270ee357dd9 exchange: support streaming clone bundles in clone bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26732
diff changeset
360 adding file changes
8270ee357dd9 exchange: support streaming clone bundles in clone bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26732
diff changeset
361 added 2 changesets with 2 changes to 2 files
8270ee357dd9 exchange: support streaming clone bundles in clone bundles
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26732
diff changeset
362
26648
c347d532bb56 exchange: support sorting URLs by client-side preferences
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26645
diff changeset
363 Set up manifest for testing preferences
c347d532bb56 exchange: support sorting URLs by client-side preferences
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26645
diff changeset
364 (Remember, the TYPE does not have to match reality - the URL is
c347d532bb56 exchange: support sorting URLs by client-side preferences
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26645
diff changeset
365 important)
c347d532bb56 exchange: support sorting URLs by client-side preferences
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26645
diff changeset
366
c347d532bb56 exchange: support sorting URLs by client-side preferences
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26645
diff changeset
367 $ cp full.hg gz-a.hg
c347d532bb56 exchange: support sorting URLs by client-side preferences
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26645
diff changeset
368 $ cp full.hg gz-b.hg
c347d532bb56 exchange: support sorting URLs by client-side preferences
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26645
diff changeset
369 $ cp full.hg bz2-a.hg
c347d532bb56 exchange: support sorting URLs by client-side preferences
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26645
diff changeset
370 $ cp full.hg bz2-b.hg
c347d532bb56 exchange: support sorting URLs by client-side preferences
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26645
diff changeset
371 $ cat > server/.hg/clonebundles.manifest << EOF
c347d532bb56 exchange: support sorting URLs by client-side preferences
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26645
diff changeset
372 > http://localhost:$HGPORT1/gz-a.hg BUNDLESPEC=gzip-v2 extra=a
c347d532bb56 exchange: support sorting URLs by client-side preferences
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26645
diff changeset
373 > http://localhost:$HGPORT1/bz2-a.hg BUNDLESPEC=bzip2-v2 extra=a
c347d532bb56 exchange: support sorting URLs by client-side preferences
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26645
diff changeset
374 > http://localhost:$HGPORT1/gz-b.hg BUNDLESPEC=gzip-v2 extra=b
c347d532bb56 exchange: support sorting URLs by client-side preferences
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26645
diff changeset
375 > http://localhost:$HGPORT1/bz2-b.hg BUNDLESPEC=bzip2-v2 extra=b
c347d532bb56 exchange: support sorting URLs by client-side preferences
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26645
diff changeset
376 > EOF
c347d532bb56 exchange: support sorting URLs by client-side preferences
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26645
diff changeset
377
c347d532bb56 exchange: support sorting URLs by client-side preferences
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26645
diff changeset
378 Preferring an undefined attribute will take first entry
c347d532bb56 exchange: support sorting URLs by client-side preferences
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26645
diff changeset
379
27737
482eb357fe98 exchange: make clonebundleprefers non-experimental
Gregory Szorc <gregory.szorc@gmail.com>
parents: 27736
diff changeset
380 $ hg --config ui.clonebundleprefers=foo=bar clone -U http://localhost:$HGPORT prefer-foo
26648
c347d532bb56 exchange: support sorting URLs by client-side preferences
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26645
diff changeset
381 applying clone bundle from http://localhost:$HGPORT1/gz-a.hg
c347d532bb56 exchange: support sorting URLs by client-side preferences
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26645
diff changeset
382 adding changesets
c347d532bb56 exchange: support sorting URLs by client-side preferences
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26645
diff changeset
383 adding manifests
c347d532bb56 exchange: support sorting URLs by client-side preferences
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26645
diff changeset
384 adding file changes
c347d532bb56 exchange: support sorting URLs by client-side preferences
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26645
diff changeset
385 added 2 changesets with 2 changes to 2 files
c347d532bb56 exchange: support sorting URLs by client-side preferences
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26645
diff changeset
386 finished applying clone bundle
c347d532bb56 exchange: support sorting URLs by client-side preferences
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26645
diff changeset
387 searching for changes
c347d532bb56 exchange: support sorting URLs by client-side preferences
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26645
diff changeset
388 no changes found
c347d532bb56 exchange: support sorting URLs by client-side preferences
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26645
diff changeset
389
c347d532bb56 exchange: support sorting URLs by client-side preferences
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26645
diff changeset
390 Preferring bz2 type will download first entry of that type
c347d532bb56 exchange: support sorting URLs by client-side preferences
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26645
diff changeset
391
27737
482eb357fe98 exchange: make clonebundleprefers non-experimental
Gregory Szorc <gregory.szorc@gmail.com>
parents: 27736
diff changeset
392 $ hg --config ui.clonebundleprefers=COMPRESSION=bzip2 clone -U http://localhost:$HGPORT prefer-bz
26648
c347d532bb56 exchange: support sorting URLs by client-side preferences
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26645
diff changeset
393 applying clone bundle from http://localhost:$HGPORT1/bz2-a.hg
c347d532bb56 exchange: support sorting URLs by client-side preferences
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26645
diff changeset
394 adding changesets
c347d532bb56 exchange: support sorting URLs by client-side preferences
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26645
diff changeset
395 adding manifests
c347d532bb56 exchange: support sorting URLs by client-side preferences
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26645
diff changeset
396 adding file changes
c347d532bb56 exchange: support sorting URLs by client-side preferences
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26645
diff changeset
397 added 2 changesets with 2 changes to 2 files
c347d532bb56 exchange: support sorting URLs by client-side preferences
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26645
diff changeset
398 finished applying clone bundle
c347d532bb56 exchange: support sorting URLs by client-side preferences
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26645
diff changeset
399 searching for changes
c347d532bb56 exchange: support sorting URLs by client-side preferences
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26645
diff changeset
400 no changes found
c347d532bb56 exchange: support sorting URLs by client-side preferences
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26645
diff changeset
401
c347d532bb56 exchange: support sorting URLs by client-side preferences
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26645
diff changeset
402 Preferring multiple values of an option works
c347d532bb56 exchange: support sorting URLs by client-side preferences
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26645
diff changeset
403
27737
482eb357fe98 exchange: make clonebundleprefers non-experimental
Gregory Szorc <gregory.szorc@gmail.com>
parents: 27736
diff changeset
404 $ hg --config ui.clonebundleprefers=COMPRESSION=unknown,COMPRESSION=bzip2 clone -U http://localhost:$HGPORT prefer-multiple-bz
26648
c347d532bb56 exchange: support sorting URLs by client-side preferences
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26645
diff changeset
405 applying clone bundle from http://localhost:$HGPORT1/bz2-a.hg
c347d532bb56 exchange: support sorting URLs by client-side preferences
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26645
diff changeset
406 adding changesets
c347d532bb56 exchange: support sorting URLs by client-side preferences
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26645
diff changeset
407 adding manifests
c347d532bb56 exchange: support sorting URLs by client-side preferences
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26645
diff changeset
408 adding file changes
c347d532bb56 exchange: support sorting URLs by client-side preferences
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26645
diff changeset
409 added 2 changesets with 2 changes to 2 files
c347d532bb56 exchange: support sorting URLs by client-side preferences
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26645
diff changeset
410 finished applying clone bundle
c347d532bb56 exchange: support sorting URLs by client-side preferences
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26645
diff changeset
411 searching for changes
c347d532bb56 exchange: support sorting URLs by client-side preferences
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26645
diff changeset
412 no changes found
c347d532bb56 exchange: support sorting URLs by client-side preferences
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26645
diff changeset
413
c347d532bb56 exchange: support sorting URLs by client-side preferences
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26645
diff changeset
414 Sorting multiple values should get us back to original first entry
c347d532bb56 exchange: support sorting URLs by client-side preferences
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26645
diff changeset
415
27737
482eb357fe98 exchange: make clonebundleprefers non-experimental
Gregory Szorc <gregory.szorc@gmail.com>
parents: 27736
diff changeset
416 $ hg --config ui.clonebundleprefers=BUNDLESPEC=unknown,BUNDLESPEC=gzip-v2,BUNDLESPEC=bzip2-v2 clone -U http://localhost:$HGPORT prefer-multiple-gz
26648
c347d532bb56 exchange: support sorting URLs by client-side preferences
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26645
diff changeset
417 applying clone bundle from http://localhost:$HGPORT1/gz-a.hg
c347d532bb56 exchange: support sorting URLs by client-side preferences
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26645
diff changeset
418 adding changesets
c347d532bb56 exchange: support sorting URLs by client-side preferences
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26645
diff changeset
419 adding manifests
c347d532bb56 exchange: support sorting URLs by client-side preferences
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26645
diff changeset
420 adding file changes
c347d532bb56 exchange: support sorting URLs by client-side preferences
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26645
diff changeset
421 added 2 changesets with 2 changes to 2 files
c347d532bb56 exchange: support sorting URLs by client-side preferences
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26645
diff changeset
422 finished applying clone bundle
c347d532bb56 exchange: support sorting URLs by client-side preferences
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26645
diff changeset
423 searching for changes
c347d532bb56 exchange: support sorting URLs by client-side preferences
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26645
diff changeset
424 no changes found
c347d532bb56 exchange: support sorting URLs by client-side preferences
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26645
diff changeset
425
c347d532bb56 exchange: support sorting URLs by client-side preferences
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26645
diff changeset
426 Preferring multiple attributes has correct order
c347d532bb56 exchange: support sorting URLs by client-side preferences
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26645
diff changeset
427
27737
482eb357fe98 exchange: make clonebundleprefers non-experimental
Gregory Szorc <gregory.szorc@gmail.com>
parents: 27736
diff changeset
428 $ hg --config ui.clonebundleprefers=extra=b,BUNDLESPEC=bzip2-v2 clone -U http://localhost:$HGPORT prefer-separate-attributes
26648
c347d532bb56 exchange: support sorting URLs by client-side preferences
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26645
diff changeset
429 applying clone bundle from http://localhost:$HGPORT1/bz2-b.hg
c347d532bb56 exchange: support sorting URLs by client-side preferences
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26645
diff changeset
430 adding changesets
c347d532bb56 exchange: support sorting URLs by client-side preferences
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26645
diff changeset
431 adding manifests
c347d532bb56 exchange: support sorting URLs by client-side preferences
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26645
diff changeset
432 adding file changes
c347d532bb56 exchange: support sorting URLs by client-side preferences
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26645
diff changeset
433 added 2 changesets with 2 changes to 2 files
c347d532bb56 exchange: support sorting URLs by client-side preferences
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26645
diff changeset
434 finished applying clone bundle
c347d532bb56 exchange: support sorting URLs by client-side preferences
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26645
diff changeset
435 searching for changes
c347d532bb56 exchange: support sorting URLs by client-side preferences
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26645
diff changeset
436 no changes found
c347d532bb56 exchange: support sorting URLs by client-side preferences
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26645
diff changeset
437
c347d532bb56 exchange: support sorting URLs by client-side preferences
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26645
diff changeset
438 Test where attribute is missing from some entries
c347d532bb56 exchange: support sorting URLs by client-side preferences
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26645
diff changeset
439
c347d532bb56 exchange: support sorting URLs by client-side preferences
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26645
diff changeset
440 $ cat > server/.hg/clonebundles.manifest << EOF
c347d532bb56 exchange: support sorting URLs by client-side preferences
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26645
diff changeset
441 > http://localhost:$HGPORT1/gz-a.hg BUNDLESPEC=gzip-v2
c347d532bb56 exchange: support sorting URLs by client-side preferences
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26645
diff changeset
442 > http://localhost:$HGPORT1/bz2-a.hg BUNDLESPEC=bzip2-v2
c347d532bb56 exchange: support sorting URLs by client-side preferences
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26645
diff changeset
443 > http://localhost:$HGPORT1/gz-b.hg BUNDLESPEC=gzip-v2 extra=b
c347d532bb56 exchange: support sorting URLs by client-side preferences
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26645
diff changeset
444 > http://localhost:$HGPORT1/bz2-b.hg BUNDLESPEC=bzip2-v2 extra=b
c347d532bb56 exchange: support sorting URLs by client-side preferences
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26645
diff changeset
445 > EOF
c347d532bb56 exchange: support sorting URLs by client-side preferences
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26645
diff changeset
446
27737
482eb357fe98 exchange: make clonebundleprefers non-experimental
Gregory Szorc <gregory.szorc@gmail.com>
parents: 27736
diff changeset
447 $ hg --config ui.clonebundleprefers=extra=b clone -U http://localhost:$HGPORT prefer-partially-defined-attribute
26648
c347d532bb56 exchange: support sorting URLs by client-side preferences
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26645
diff changeset
448 applying clone bundle from http://localhost:$HGPORT1/gz-b.hg
c347d532bb56 exchange: support sorting URLs by client-side preferences
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26645
diff changeset
449 adding changesets
c347d532bb56 exchange: support sorting URLs by client-side preferences
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26645
diff changeset
450 adding manifests
c347d532bb56 exchange: support sorting URLs by client-side preferences
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26645
diff changeset
451 adding file changes
c347d532bb56 exchange: support sorting URLs by client-side preferences
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26645
diff changeset
452 added 2 changesets with 2 changes to 2 files
c347d532bb56 exchange: support sorting URLs by client-side preferences
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26645
diff changeset
453 finished applying clone bundle
c347d532bb56 exchange: support sorting URLs by client-side preferences
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26645
diff changeset
454 searching for changes
c347d532bb56 exchange: support sorting URLs by client-side preferences
Gregory Szorc <gregory.szorc@gmail.com>
parents: 26645
diff changeset
455 no changes found