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