Show More
@@ -1,887 +1,885 b'' | |||
|
1 | 1 | #require serve no-reposimplestore no-chg |
|
2 | 2 | |
|
3 | 3 | #testcases stream-legacy stream-bundle2-v2 stream-bundle2-v3 |
|
4 | 4 | |
|
5 | 5 | #if stream-legacy |
|
6 | 6 | $ cat << EOF >> $HGRCPATH |
|
7 | 7 | > [server] |
|
8 | 8 | > bundle2.stream = no |
|
9 | 9 | > [format] |
|
10 | 10 | > # persistent nodemap is too broken with legacy format, |
|
11 | 11 | > # however client with nodemap support will have better stream support. |
|
12 | 12 | > use-persistent-nodemap=no |
|
13 | 13 | > EOF |
|
14 | 14 | #endif |
|
15 | 15 | #if stream-bundle2-v3 |
|
16 | 16 | $ cat << EOF >> $HGRCPATH |
|
17 | 17 | > [experimental] |
|
18 | 18 | > stream-v3 = yes |
|
19 | 19 | > EOF |
|
20 | 20 | #endif |
|
21 | 21 | |
|
22 | 22 | Initialize repository |
|
23 | 23 | |
|
24 | 24 | $ hg init server |
|
25 | 25 | $ cd server |
|
26 | 26 | $ sh $TESTDIR/testlib/stream_clone_setup.sh |
|
27 | 27 | adding 00changelog-ab349180a0405010.nd |
|
28 | 28 | adding 00changelog.d |
|
29 | 29 | adding 00changelog.i |
|
30 | 30 | adding 00changelog.n |
|
31 | 31 | adding 00manifest.d |
|
32 | 32 | adding 00manifest.i |
|
33 | 33 | adding container/isam-build-centos7/bazel-coverage-generator-sandboxfs-compatibility-0758e3e4f6057904d44399bd666faba9e7f40686.patch |
|
34 | 34 | adding data/foo.d |
|
35 | 35 | adding data/foo.i |
|
36 | 36 | adding data/foo.n |
|
37 | 37 | adding data/undo.babar |
|
38 | 38 | adding data/undo.d |
|
39 | 39 | adding data/undo.foo.d |
|
40 | 40 | adding data/undo.foo.i |
|
41 | 41 | adding data/undo.foo.n |
|
42 | 42 | adding data/undo.i |
|
43 | 43 | adding data/undo.n |
|
44 | 44 | adding data/undo.py |
|
45 | 45 | adding foo.d |
|
46 | 46 | adding foo.i |
|
47 | 47 | adding foo.n |
|
48 | 48 | adding meta/foo.d |
|
49 | 49 | adding meta/foo.i |
|
50 | 50 | adding meta/foo.n |
|
51 | 51 | adding meta/undo.babar |
|
52 | 52 | adding meta/undo.d |
|
53 | 53 | adding meta/undo.foo.d |
|
54 | 54 | adding meta/undo.foo.i |
|
55 | 55 | adding meta/undo.foo.n |
|
56 | 56 | adding meta/undo.i |
|
57 | 57 | adding meta/undo.n |
|
58 | 58 | adding meta/undo.py |
|
59 | 59 | adding savanah/foo.d |
|
60 | 60 | adding savanah/foo.i |
|
61 | 61 | adding savanah/foo.n |
|
62 | 62 | adding savanah/undo.babar |
|
63 | 63 | adding savanah/undo.d |
|
64 | 64 | adding savanah/undo.foo.d |
|
65 | 65 | adding savanah/undo.foo.i |
|
66 | 66 | adding savanah/undo.foo.n |
|
67 | 67 | adding savanah/undo.i |
|
68 | 68 | adding savanah/undo.n |
|
69 | 69 | adding savanah/undo.py |
|
70 | 70 | adding store/C\xc3\xa9lesteVille_is_a_Capital_City (esc) |
|
71 | 71 | adding store/foo.d |
|
72 | 72 | adding store/foo.i |
|
73 | 73 | adding store/foo.n |
|
74 | 74 | adding store/undo.babar |
|
75 | 75 | adding store/undo.d |
|
76 | 76 | adding store/undo.foo.d |
|
77 | 77 | adding store/undo.foo.i |
|
78 | 78 | adding store/undo.foo.n |
|
79 | 79 | adding store/undo.i |
|
80 | 80 | adding store/undo.n |
|
81 | 81 | adding store/undo.py |
|
82 | 82 | adding undo.babar |
|
83 | 83 | adding undo.d |
|
84 | 84 | adding undo.foo.d |
|
85 | 85 | adding undo.foo.i |
|
86 | 86 | adding undo.foo.n |
|
87 | 87 | adding undo.i |
|
88 | 88 | adding undo.n |
|
89 | 89 | adding undo.py |
|
90 | 90 | |
|
91 | 91 | $ hg --config server.uncompressed=false serve -p $HGPORT -d --pid-file=hg.pid |
|
92 | 92 | $ cat hg.pid > $DAEMON_PIDS |
|
93 | 93 | $ cd .. |
|
94 | 94 | |
|
95 | 95 | Check local clone |
|
96 | 96 | ================== |
|
97 | 97 | |
|
98 | 98 | The logic is close enough of uncompressed. |
|
99 | 99 | This is present here to reuse the testing around file with "special" names. |
|
100 | 100 | |
|
101 | 101 | $ hg clone server local-clone |
|
102 | 102 | updating to branch default |
|
103 | 103 | 1088 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
104 | 104 | |
|
105 | 105 | Check that the clone went well |
|
106 | 106 | |
|
107 | 107 | $ hg verify -R local-clone -q |
|
108 | 108 | |
|
109 | 109 | Check uncompressed |
|
110 | 110 | ================== |
|
111 | 111 | |
|
112 | 112 | Cannot stream clone when server.uncompressed is set to false |
|
113 | 113 | ------------------------------------------------------------ |
|
114 | 114 | |
|
115 | 115 | When `server.uncompressed` is disabled, the client should fallback to a bundle |
|
116 | 116 | based clone with a warning. |
|
117 | 117 | |
|
118 | 118 | |
|
119 | 119 | $ get-with-headers.py $LOCALIP:$HGPORT '?cmd=stream_out' |
|
120 | 120 | 200 Script output follows |
|
121 | 121 | |
|
122 | 122 | 1 |
|
123 | 123 | |
|
124 | 124 | $ hg debugcapabilities http://localhost:$HGPORT |
|
125 | 125 | Main capabilities: |
|
126 | 126 | batch |
|
127 | 127 | branchmap |
|
128 | 128 | $USUAL_BUNDLE2_CAPS_SERVER$ |
|
129 | 129 | changegroupsubset |
|
130 | 130 | compression=$BUNDLE2_COMPRESSIONS$ |
|
131 | 131 | getbundle |
|
132 | 132 | httpheader=1024 |
|
133 | 133 | httpmediatype=0.1rx,0.1tx,0.2tx |
|
134 | 134 | known |
|
135 | 135 | lookup |
|
136 | 136 | pushkey |
|
137 | 137 | unbundle=HG10GZ,HG10BZ,HG10UN |
|
138 | 138 | unbundlehash |
|
139 | 139 | Bundle2 capabilities: |
|
140 | 140 | HG20 |
|
141 | 141 | bookmarks |
|
142 | 142 | changegroup |
|
143 | 143 | 01 |
|
144 | 144 | 02 |
|
145 | 145 | 03 |
|
146 | 146 | checkheads |
|
147 | 147 | related |
|
148 | 148 | digests |
|
149 | 149 | md5 |
|
150 | 150 | sha1 |
|
151 | 151 | sha512 |
|
152 | 152 | error |
|
153 | 153 | abort |
|
154 | 154 | unsupportedcontent |
|
155 | 155 | pushraced |
|
156 | 156 | pushkey |
|
157 | 157 | hgtagsfnodes |
|
158 | 158 | listkeys |
|
159 | 159 | phases |
|
160 | 160 | heads |
|
161 | 161 | pushkey |
|
162 | 162 | remote-changegroup |
|
163 | 163 | http |
|
164 | 164 | https |
|
165 | 165 | |
|
166 | 166 | $ hg clone --stream -U http://localhost:$HGPORT server-disabled |
|
167 | 167 | warning: stream clone requested but server has them disabled |
|
168 | 168 | requesting all changes |
|
169 | 169 | adding changesets |
|
170 | 170 | adding manifests |
|
171 | 171 | adding file changes |
|
172 | 172 | added 3 changesets with 1088 changes to 1088 files |
|
173 | 173 | new changesets 96ee1d7354c4:5223b5e3265f |
|
174 | 174 | |
|
175 | 175 | $ killdaemons.py |
|
176 | 176 | $ cd server |
|
177 | 177 | $ hg serve -p $HGPORT -d --pid-file=hg.pid --error errors.txt |
|
178 | 178 | $ cat hg.pid > $DAEMON_PIDS |
|
179 | 179 | $ cd .. |
|
180 | 180 | |
|
181 | 181 | Basic clone |
|
182 | ----------- | |
|
183 | ||
|
184 | Check that --stream trigger a stream clone and result in a valid repositoty | |
|
185 | ||
|
186 | We check the associated output for exact bytes on file number as changes in | |
|
187 | these value implies changes in the data transfered and can detect unintended | |
|
188 | changes in the process. | |
|
182 | 189 | |
|
183 | 190 | #if stream-legacy |
|
184 | 191 | $ hg clone --stream -U http://localhost:$HGPORT clone1 |
|
185 | 192 | streaming all changes |
|
186 | 193 | 1091 files to transfer, 102 KB of data (no-zstd !) |
|
187 | 194 | transferred 102 KB in * seconds (* */sec) (glob) (no-zstd !) |
|
188 | 195 | 1091 files to transfer, 98.8 KB of data (zstd !) |
|
189 | 196 | transferred 98.8 KB in * seconds (* */sec) (glob) (zstd !) |
|
190 | 197 | searching for changes |
|
191 | 198 | no changes found |
|
192 | $ cat server/errors.txt | |
|
193 | 199 | #endif |
|
194 | 200 | #if stream-bundle2-v2 |
|
195 | 201 | $ hg clone --stream -U http://localhost:$HGPORT clone1 |
|
196 | 202 | streaming all changes |
|
197 | 203 | 1094 files to transfer, 102 KB of data (no-zstd !) |
|
198 | 204 | transferred 102 KB in * seconds (* */sec) (glob) (no-zstd !) |
|
199 | 205 | 1094 files to transfer, 98.9 KB of data (zstd no-rust !) |
|
200 | 206 | transferred 98.9 KB in * seconds (* */sec) (glob) (zstd no-rust !) |
|
201 | 207 | 1096 files to transfer, 99.0 KB of data (zstd rust !) |
|
202 | 208 | transferred 99.0 KB in * seconds (* */sec) (glob) (zstd rust !) |
|
209 | #endif | |
|
203 | 210 | |
|
211 | #if stream-bundle2-v3 | |
|
212 | $ hg clone --stream -U http://localhost:$HGPORT clone1 | |
|
213 | streaming all changes | |
|
214 | 1093 entries to transfer | |
|
215 | transferred 102 KB in * seconds (* */sec) (glob) (no-zstd !) | |
|
216 | transferred 98.9 KB in * seconds (* */sec) (glob) (zstd no-rust !) | |
|
217 | transferred 99.0 KB in * seconds (* */sec) (glob) (zstd rust !) | |
|
218 | #endif | |
|
219 | ||
|
220 | #if no-stream-legacy | |
|
204 | 221 | $ ls -1 clone1/.hg/cache |
|
205 | 222 | branch2-base |
|
206 | 223 | branch2-immutable |
|
207 | 224 | branch2-served |
|
208 | 225 | branch2-served.hidden |
|
209 | 226 | branch2-visible |
|
210 | 227 | branch2-visible-hidden |
|
211 | 228 | rbc-names-v1 |
|
212 | 229 | rbc-revs-v1 |
|
213 | 230 | tags2 |
|
214 | 231 | tags2-served |
|
215 | $ cat server/errors.txt | |
|
216 | 232 | #endif |
|
217 | #if stream-bundle2-v3 | |
|
218 | $ hg clone --stream -U http://localhost:$HGPORT clone1 | |
|
219 | streaming all changes | |
|
220 | 1093 entries to transfer | |
|
221 | transferred 102 KB in * seconds (* */sec) (glob) (no-zstd !) | |
|
222 | transferred 98.9 KB in * seconds (* */sec) (glob) (zstd no-rust !) | |
|
223 | transferred 99.0 KB in * seconds (* */sec) (glob) (zstd rust !) | |
|
224 | 233 | |
|
225 | $ ls -1 clone1/.hg/cache | |
|
226 | branch2-base | |
|
227 | branch2-immutable | |
|
228 | branch2-served | |
|
229 | branch2-served.hidden | |
|
230 | branch2-visible | |
|
231 | branch2-visible-hidden | |
|
232 | rbc-names-v1 | |
|
233 | rbc-revs-v1 | |
|
234 | tags2 | |
|
235 | tags2-served | |
|
234 | $ hg -R clone1 verify --quiet | |
|
236 | 235 | $ cat server/errors.txt |
|
237 | #endif | |
|
238 | 236 |
|
|
239 | 237 | getbundle requests with stream=1 are uncompressed |
|
240 | 238 | |
|
241 | 239 | $ get-with-headers.py $LOCALIP:$HGPORT '?cmd=getbundle' content-type --bodyfile body --hgproto '0.1 0.2 comp=zlib,none' --requestheader "x-hgarg-1=bundlecaps=HG20%2Cbundle2%3DHG20%250Abookmarks%250Achangegroup%253D01%252C02%252C03%250Adigests%253Dmd5%252Csha1%252Csha512%250Aerror%253Dabort%252Cunsupportedcontent%252Cpushraced%252Cpushkey%250Ahgtagsfnodes%250Alistkeys%250Aphases%253Dheads%250Apushkey%250Aremote-changegroup%253Dhttp%252Chttps%250Astream%253Dv2&cg=0&common=0000000000000000000000000000000000000000&heads=c17445101a72edac06facd130d14808dfbd5c7c2&stream=1" |
|
242 | 240 | 200 Script output follows |
|
243 | 241 | content-type: application/mercurial-0.2 |
|
244 | 242 | |
|
245 | 243 | |
|
246 | 244 | #if no-zstd no-rust |
|
247 | 245 | $ f --size --hex --bytes 256 body |
|
248 | 246 | body: size=119140 |
|
249 | 247 | 0000: 04 6e 6f 6e 65 48 47 32 30 00 00 00 00 00 00 00 |.noneHG20.......| |
|
250 | 248 | 0010: 62 07 53 54 52 45 41 4d 32 00 00 00 00 03 00 09 |b.STREAM2.......| |
|
251 | 249 | 0020: 06 09 04 0c 26 62 79 74 65 63 6f 75 6e 74 31 30 |....&bytecount10| |
|
252 | 250 | 0030: 34 31 31 35 66 69 6c 65 63 6f 75 6e 74 31 30 39 |4115filecount109| |
|
253 | 251 | 0040: 34 72 65 71 75 69 72 65 6d 65 6e 74 73 67 65 6e |4requirementsgen| |
|
254 | 252 | 0050: 65 72 61 6c 64 65 6c 74 61 25 32 43 72 65 76 6c |eraldelta%2Crevl| |
|
255 | 253 | 0060: 6f 67 76 31 25 32 43 73 70 61 72 73 65 72 65 76 |ogv1%2Csparserev| |
|
256 | 254 | 0070: 6c 6f 67 00 00 80 00 73 08 42 64 61 74 61 2f 30 |log....s.Bdata/0| |
|
257 | 255 | 0080: 2e 69 00 03 00 01 00 00 00 00 00 00 00 02 00 00 |.i..............| |
|
258 | 256 | 0090: 00 01 00 00 00 00 00 00 00 01 ff ff ff ff ff ff |................| |
|
259 | 257 | 00a0: ff ff 80 29 63 a0 49 d3 23 87 bf ce fe 56 67 92 |...)c.I.#....Vg.| |
|
260 | 258 | 00b0: 67 2c 69 d1 ec 39 00 00 00 00 00 00 00 00 00 00 |g,i..9..........| |
|
261 | 259 | 00c0: 00 00 75 30 73 26 45 64 61 74 61 2f 30 30 63 68 |..u0s&Edata/00ch| |
|
262 | 260 | 00d0: 61 6e 67 65 6c 6f 67 2d 61 62 33 34 39 31 38 30 |angelog-ab349180| |
|
263 | 261 | 00e0: 61 30 34 30 35 30 31 30 2e 6e 64 2e 69 00 03 00 |a0405010.nd.i...| |
|
264 | 262 | 00f0: 01 00 00 00 00 00 00 00 05 00 00 00 04 00 00 00 |................| |
|
265 | 263 | #endif |
|
266 | 264 | #if zstd no-rust |
|
267 | 265 | $ f --size --hex --bytes 256 body |
|
268 | 266 | body: size=116327 (no-bigendian !) |
|
269 | 267 | body: size=116322 (bigendian !) |
|
270 | 268 | 0000: 04 6e 6f 6e 65 48 47 32 30 00 00 00 00 00 00 00 |.noneHG20.......| |
|
271 | 269 | 0010: 7c 07 53 54 52 45 41 4d 32 00 00 00 00 03 00 09 ||.STREAM2.......| |
|
272 | 270 | 0020: 06 09 04 0c 40 62 79 74 65 63 6f 75 6e 74 31 30 |....@bytecount10| |
|
273 | 271 | 0030: 31 32 37 36 66 69 6c 65 63 6f 75 6e 74 31 30 39 |1276filecount109| (no-bigendian !) |
|
274 | 272 | 0030: 31 32 37 31 66 69 6c 65 63 6f 75 6e 74 31 30 39 |1271filecount109| (bigendian !) |
|
275 | 273 | 0040: 34 72 65 71 75 69 72 65 6d 65 6e 74 73 67 65 6e |4requirementsgen| |
|
276 | 274 | 0050: 65 72 61 6c 64 65 6c 74 61 25 32 43 72 65 76 6c |eraldelta%2Crevl| |
|
277 | 275 | 0060: 6f 67 2d 63 6f 6d 70 72 65 73 73 69 6f 6e 2d 7a |og-compression-z| |
|
278 | 276 | 0070: 73 74 64 25 32 43 72 65 76 6c 6f 67 76 31 25 32 |std%2Crevlogv1%2| |
|
279 | 277 | 0080: 43 73 70 61 72 73 65 72 65 76 6c 6f 67 00 00 80 |Csparserevlog...| |
|
280 | 278 | 0090: 00 73 08 42 64 61 74 61 2f 30 2e 69 00 03 00 01 |.s.Bdata/0.i....| |
|
281 | 279 | 00a0: 00 00 00 00 00 00 00 02 00 00 00 01 00 00 00 00 |................| |
|
282 | 280 | 00b0: 00 00 00 01 ff ff ff ff ff ff ff ff 80 29 63 a0 |.............)c.| |
|
283 | 281 | 00c0: 49 d3 23 87 bf ce fe 56 67 92 67 2c 69 d1 ec 39 |I.#....Vg.g,i..9| |
|
284 | 282 | 00d0: 00 00 00 00 00 00 00 00 00 00 00 00 75 30 73 26 |............u0s&| |
|
285 | 283 | 00e0: 45 64 61 74 61 2f 30 30 63 68 61 6e 67 65 6c 6f |Edata/00changelo| |
|
286 | 284 | 00f0: 67 2d 61 62 33 34 39 31 38 30 61 30 34 30 35 30 |g-ab349180a04050| |
|
287 | 285 | #endif |
|
288 | 286 | #if zstd rust no-dirstate-v2 |
|
289 | 287 | $ f --size --hex --bytes 256 body |
|
290 | 288 | body: size=116310 (no-rust !) |
|
291 | 289 | body: size=116495 (rust no-stream-legacy no-bigendian !) |
|
292 | 290 | body: size=116490 (rust no-stream-legacy bigendian !) |
|
293 | 291 | body: size=116327 (rust stream-legacy no-bigendian !) |
|
294 | 292 | body: size=116322 (rust stream-legacy bigendian !) |
|
295 | 293 | 0000: 04 6e 6f 6e 65 48 47 32 30 00 00 00 00 00 00 00 |.noneHG20.......| |
|
296 | 294 | 0010: 7c 07 53 54 52 45 41 4d 32 00 00 00 00 03 00 09 ||.STREAM2.......| |
|
297 | 295 | 0020: 06 09 04 0c 40 62 79 74 65 63 6f 75 6e 74 31 30 |....@bytecount10| |
|
298 | 296 | 0030: 31 32 37 36 66 69 6c 65 63 6f 75 6e 74 31 30 39 |1276filecount109| (no-rust !) |
|
299 | 297 | 0040: 33 72 65 71 75 69 72 65 6d 65 6e 74 73 67 65 6e |3requirementsgen| (no-rust !) |
|
300 | 298 | 0030: 31 34 30 32 66 69 6c 65 63 6f 75 6e 74 31 30 39 |1402filecount109| (rust no-stream-legacy no-bigendian !) |
|
301 | 299 | 0030: 31 33 39 37 66 69 6c 65 63 6f 75 6e 74 31 30 39 |1397filecount109| (rust no-stream-legacy bigendian !) |
|
302 | 300 | 0040: 36 72 65 71 75 69 72 65 6d 65 6e 74 73 67 65 6e |6requirementsgen| (rust no-stream-legacy !) |
|
303 | 301 | 0030: 31 32 37 36 66 69 6c 65 63 6f 75 6e 74 31 30 39 |1276filecount109| (rust stream-legacy no-bigendian !) |
|
304 | 302 | 0030: 31 32 37 31 66 69 6c 65 63 6f 75 6e 74 31 30 39 |1271filecount109| (rust stream-legacy bigendian !) |
|
305 | 303 | 0040: 34 72 65 71 75 69 72 65 6d 65 6e 74 73 67 65 6e |4requirementsgen| (rust stream-legacy !) |
|
306 | 304 | 0050: 65 72 61 6c 64 65 6c 74 61 25 32 43 72 65 76 6c |eraldelta%2Crevl| |
|
307 | 305 | 0060: 6f 67 2d 63 6f 6d 70 72 65 73 73 69 6f 6e 2d 7a |og-compression-z| |
|
308 | 306 | 0070: 73 74 64 25 32 43 72 65 76 6c 6f 67 76 31 25 32 |std%2Crevlogv1%2| |
|
309 | 307 | 0080: 43 73 70 61 72 73 65 72 65 76 6c 6f 67 00 00 80 |Csparserevlog...| |
|
310 | 308 | 0090: 00 73 08 42 64 61 74 61 2f 30 2e 69 00 03 00 01 |.s.Bdata/0.i....| |
|
311 | 309 | 00a0: 00 00 00 00 00 00 00 02 00 00 00 01 00 00 00 00 |................| |
|
312 | 310 | 00b0: 00 00 00 01 ff ff ff ff ff ff ff ff 80 29 63 a0 |.............)c.| |
|
313 | 311 | 00c0: 49 d3 23 87 bf ce fe 56 67 92 67 2c 69 d1 ec 39 |I.#....Vg.g,i..9| |
|
314 | 312 | 00d0: 00 00 00 00 00 00 00 00 00 00 00 00 75 30 73 26 |............u0s&| |
|
315 | 313 | 00e0: 45 64 61 74 61 2f 30 30 63 68 61 6e 67 65 6c 6f |Edata/00changelo| |
|
316 | 314 | 00f0: 67 2d 61 62 33 34 39 31 38 30 61 30 34 30 35 30 |g-ab349180a04050| |
|
317 | 315 | #endif |
|
318 | 316 | #if zstd dirstate-v2 |
|
319 | 317 | $ f --size --hex --bytes 256 body |
|
320 | 318 | body: size=109549 |
|
321 | 319 | 0000: 04 6e 6f 6e 65 48 47 32 30 00 00 00 00 00 00 00 |.noneHG20.......| |
|
322 | 320 | 0010: c0 07 53 54 52 45 41 4d 32 00 00 00 00 03 00 09 |..STREAM2.......| |
|
323 | 321 | 0020: 05 09 04 0c 85 62 79 74 65 63 6f 75 6e 74 39 35 |.....bytecount95| |
|
324 | 322 | 0030: 38 39 37 66 69 6c 65 63 6f 75 6e 74 31 30 33 30 |897filecount1030| |
|
325 | 323 | 0040: 72 65 71 75 69 72 65 6d 65 6e 74 73 64 6f 74 65 |requirementsdote| |
|
326 | 324 | 0050: 6e 63 6f 64 65 25 32 43 65 78 70 2d 64 69 72 73 |ncode%2Cexp-dirs| |
|
327 | 325 | 0060: 74 61 74 65 2d 76 32 25 32 43 66 6e 63 61 63 68 |tate-v2%2Cfncach| |
|
328 | 326 | 0070: 65 25 32 43 67 65 6e 65 72 61 6c 64 65 6c 74 61 |e%2Cgeneraldelta| |
|
329 | 327 | 0080: 25 32 43 70 65 72 73 69 73 74 65 6e 74 2d 6e 6f |%2Cpersistent-no| |
|
330 | 328 | 0090: 64 65 6d 61 70 25 32 43 72 65 76 6c 6f 67 2d 63 |demap%2Crevlog-c| |
|
331 | 329 | 00a0: 6f 6d 70 72 65 73 73 69 6f 6e 2d 7a 73 74 64 25 |ompression-zstd%| |
|
332 | 330 | 00b0: 32 43 72 65 76 6c 6f 67 76 31 25 32 43 73 70 61 |2Crevlogv1%2Cspa| |
|
333 | 331 | 00c0: 72 73 65 72 65 76 6c 6f 67 25 32 43 73 74 6f 72 |rserevlog%2Cstor| |
|
334 | 332 | 00d0: 65 00 00 80 00 73 08 42 64 61 74 61 2f 30 2e 69 |e....s.Bdata/0.i| |
|
335 | 333 | 00e0: 00 03 00 01 00 00 00 00 00 00 00 02 00 00 00 01 |................| |
|
336 | 334 | 00f0: 00 00 00 00 00 00 00 01 ff ff ff ff ff ff ff ff |................| |
|
337 | 335 | #endif |
|
338 | 336 | |
|
339 | 337 | --uncompressed is an alias to --stream |
|
340 | 338 | |
|
341 | 339 | #if stream-legacy |
|
342 | 340 | $ hg clone --uncompressed -U http://localhost:$HGPORT clone1-uncompressed |
|
343 | 341 | streaming all changes |
|
344 | 342 | 1091 files to transfer, 102 KB of data (no-zstd !) |
|
345 | 343 | transferred 102 KB in * seconds (* */sec) (glob) (no-zstd !) |
|
346 | 344 | 1091 files to transfer, 98.8 KB of data (zstd !) |
|
347 | 345 | transferred 98.8 KB in * seconds (* */sec) (glob) (zstd !) |
|
348 | 346 | searching for changes |
|
349 | 347 | no changes found |
|
350 | 348 | #endif |
|
351 | 349 | #if stream-bundle2-v2 |
|
352 | 350 | $ hg clone --uncompressed -U http://localhost:$HGPORT clone1-uncompressed |
|
353 | 351 | streaming all changes |
|
354 | 352 | 1094 files to transfer, 102 KB of data (no-zstd !) |
|
355 | 353 | transferred 102 KB in * seconds (* */sec) (glob) (no-zstd !) |
|
356 | 354 | 1094 files to transfer, 98.9 KB of data (zstd no-rust !) |
|
357 | 355 | transferred 98.9 KB in * seconds (* */sec) (glob) (zstd no-rust !) |
|
358 | 356 | 1096 files to transfer, 99.0 KB of data (zstd rust !) |
|
359 | 357 | transferred 99.0 KB in * seconds (* */sec) (glob) (zstd rust !) |
|
360 | 358 | #endif |
|
361 | 359 | #if stream-bundle2-v3 |
|
362 | 360 | $ hg clone --uncompressed -U http://localhost:$HGPORT clone1-uncompressed |
|
363 | 361 | streaming all changes |
|
364 | 362 | 1093 entries to transfer |
|
365 | 363 | transferred 102 KB in * seconds (* */sec) (glob) (no-zstd !) |
|
366 | 364 | transferred 98.9 KB in * seconds (* */sec) (glob) (zstd no-rust !) |
|
367 | 365 | transferred 99.0 KB in * seconds (* */sec) (glob) (zstd rust !) |
|
368 | 366 | #endif |
|
369 | 367 | |
|
370 | 368 | Clone with background file closing enabled |
|
371 | 369 | |
|
372 | 370 | #if stream-legacy |
|
373 | 371 | $ hg --debug --config worker.backgroundclose=true --config worker.backgroundcloseminfilecount=1 clone --stream -U http://localhost:$HGPORT clone-background | grep -v adding |
|
374 | 372 | using http://localhost:$HGPORT/ |
|
375 | 373 | sending capabilities command |
|
376 | 374 | sending branchmap command |
|
377 | 375 | streaming all changes |
|
378 | 376 | sending stream_out command |
|
379 | 377 | 1091 files to transfer, 102 KB of data (no-zstd !) |
|
380 | 378 | 1091 files to transfer, 98.8 KB of data (zstd !) |
|
381 | 379 | starting 4 threads for background file closing |
|
382 | 380 | updating the branch cache |
|
383 | 381 | transferred 102 KB in * seconds (* */sec) (glob) (no-zstd !) |
|
384 | 382 | transferred 98.8 KB in * seconds (* */sec) (glob) (zstd !) |
|
385 | 383 | query 1; heads |
|
386 | 384 | sending batch command |
|
387 | 385 | searching for changes |
|
388 | 386 | all remote heads known locally |
|
389 | 387 | no changes found |
|
390 | 388 | sending getbundle command |
|
391 | 389 | bundle2-input-bundle: with-transaction |
|
392 | 390 | bundle2-input-part: "listkeys" (params: 1 mandatory) supported |
|
393 | 391 | bundle2-input-part: "phase-heads" supported |
|
394 | 392 | bundle2-input-part: total payload size 24 |
|
395 | 393 | bundle2-input-bundle: 2 parts total |
|
396 | 394 | checking for updated bookmarks |
|
397 | 395 | updating the branch cache |
|
398 | 396 | (sent 5 HTTP requests and * bytes; received * bytes in responses) (glob) |
|
399 | 397 | #endif |
|
400 | 398 | #if stream-bundle2-v2 |
|
401 | 399 | $ hg --debug --config worker.backgroundclose=true --config worker.backgroundcloseminfilecount=1 clone --stream -U http://localhost:$HGPORT clone-background | grep -v adding |
|
402 | 400 | using http://localhost:$HGPORT/ |
|
403 | 401 | sending capabilities command |
|
404 | 402 | query 1; heads |
|
405 | 403 | sending batch command |
|
406 | 404 | streaming all changes |
|
407 | 405 | sending getbundle command |
|
408 | 406 | bundle2-input-bundle: with-transaction |
|
409 | 407 | bundle2-input-part: "stream2" (params: 3 mandatory) supported |
|
410 | 408 | applying stream bundle |
|
411 | 409 | 1094 files to transfer, 102 KB of data (no-zstd !) |
|
412 | 410 | 1094 files to transfer, 98.9 KB of data (zstd no-rust !) |
|
413 | 411 | 1096 files to transfer, 99.0 KB of data (zstd rust !) |
|
414 | 412 | starting 4 threads for background file closing |
|
415 | 413 | starting 4 threads for background file closing |
|
416 | 414 | updating the branch cache |
|
417 | 415 | transferred 102 KB in * seconds (* */sec) (glob) (no-zstd !) |
|
418 | 416 | bundle2-input-part: total payload size 119001 (no-zstd !) |
|
419 | 417 | transferred 98.9 KB in * seconds (* */sec) (glob) (zstd no-rust !) |
|
420 | 418 | transferred 99.0 KB in * seconds (* */sec) (glob) (zstd rust !) |
|
421 | 419 | bundle2-input-part: total payload size 116162 (zstd no-bigendian no-rust !) |
|
422 | 420 | bundle2-input-part: total payload size 116330 (zstd no-bigendian rust !) |
|
423 | 421 | bundle2-input-part: total payload size 116157 (zstd bigendian no-rust !) |
|
424 | 422 | bundle2-input-part: total payload size 116325 (zstd bigendian rust !) |
|
425 | 423 | bundle2-input-part: "listkeys" (params: 1 mandatory) supported |
|
426 | 424 | bundle2-input-bundle: 2 parts total |
|
427 | 425 | checking for updated bookmarks |
|
428 | 426 | updating the branch cache |
|
429 | 427 | (sent 3 HTTP requests and * bytes; received * bytes in responses) (glob) |
|
430 | 428 | #endif |
|
431 | 429 | #if stream-bundle2-v3 |
|
432 | 430 | $ hg --debug --config worker.backgroundclose=true --config worker.backgroundcloseminfilecount=1 clone --stream -U http://localhost:$HGPORT clone-background | grep -v adding |
|
433 | 431 | using http://localhost:$HGPORT/ |
|
434 | 432 | sending capabilities command |
|
435 | 433 | query 1; heads |
|
436 | 434 | sending batch command |
|
437 | 435 | streaming all changes |
|
438 | 436 | sending getbundle command |
|
439 | 437 | bundle2-input-bundle: with-transaction |
|
440 | 438 | bundle2-input-part: "stream3-exp" (params: 1 mandatory) supported |
|
441 | 439 | applying stream bundle |
|
442 | 440 | 1093 entries to transfer |
|
443 | 441 | starting 4 threads for background file closing |
|
444 | 442 | starting 4 threads for background file closing |
|
445 | 443 | updating the branch cache |
|
446 | 444 | transferred 102 KB in * seconds (* */sec) (glob) (no-zstd !) |
|
447 | 445 | bundle2-input-part: total payload size 120096 (no-zstd !) |
|
448 | 446 | transferred 98.9 KB in * seconds (* */sec) (glob) (zstd no-rust !) |
|
449 | 447 | transferred 99.0 KB in * seconds (* */sec) (glob) (zstd rust !) |
|
450 | 448 | bundle2-input-part: total payload size 117257 (zstd no-rust no-bigendian !) |
|
451 | 449 | bundle2-input-part: total payload size 117425 (zstd rust no-bigendian !) |
|
452 | 450 | bundle2-input-part: total payload size 117252 (zstd bigendian no-rust !) |
|
453 | 451 | bundle2-input-part: total payload size 117420 (zstd bigendian rust !) |
|
454 | 452 | bundle2-input-part: "listkeys" (params: 1 mandatory) supported |
|
455 | 453 | bundle2-input-bundle: 2 parts total |
|
456 | 454 | checking for updated bookmarks |
|
457 | 455 | updating the branch cache |
|
458 | 456 | (sent 3 HTTP requests and * bytes; received * bytes in responses) (glob) |
|
459 | 457 | #endif |
|
460 | 458 | |
|
461 | 459 | Cannot stream clone when there are secret changesets |
|
462 | 460 | |
|
463 | 461 | $ hg -R server phase --force --secret -r tip |
|
464 | 462 | $ hg clone --stream -U http://localhost:$HGPORT secret-denied |
|
465 | 463 | warning: stream clone requested but server has them disabled |
|
466 | 464 | requesting all changes |
|
467 | 465 | adding changesets |
|
468 | 466 | adding manifests |
|
469 | 467 | adding file changes |
|
470 | 468 | added 2 changesets with 1025 changes to 1025 files |
|
471 | 469 | new changesets 96ee1d7354c4:c17445101a72 |
|
472 | 470 | |
|
473 | 471 | $ killdaemons.py |
|
474 | 472 | |
|
475 | 473 | Streaming of secrets can be overridden by server config |
|
476 | 474 | |
|
477 | 475 | $ cd server |
|
478 | 476 | $ hg serve --config server.uncompressedallowsecret=true -p $HGPORT -d --pid-file=hg.pid |
|
479 | 477 | $ cat hg.pid > $DAEMON_PIDS |
|
480 | 478 | $ cd .. |
|
481 | 479 | |
|
482 | 480 | #if stream-legacy |
|
483 | 481 | $ hg clone --stream -U http://localhost:$HGPORT secret-allowed |
|
484 | 482 | streaming all changes |
|
485 | 483 | 1091 files to transfer, 102 KB of data (no-zstd !) |
|
486 | 484 | transferred 102 KB in * seconds (* */sec) (glob) (no-zstd !) |
|
487 | 485 | 1091 files to transfer, 98.8 KB of data (zstd !) |
|
488 | 486 | transferred 98.8 KB in * seconds (* */sec) (glob) (zstd !) |
|
489 | 487 | searching for changes |
|
490 | 488 | no changes found |
|
491 | 489 | #endif |
|
492 | 490 | #if stream-bundle2-v2 |
|
493 | 491 | $ hg clone --stream -U http://localhost:$HGPORT secret-allowed |
|
494 | 492 | streaming all changes |
|
495 | 493 | 1094 files to transfer, 102 KB of data (no-zstd !) |
|
496 | 494 | transferred 102 KB in * seconds (* */sec) (glob) (no-zstd !) |
|
497 | 495 | 1094 files to transfer, 98.9 KB of data (zstd no-rust !) |
|
498 | 496 | transferred 98.9 KB in * seconds (* */sec) (glob) (zstd no-rust !) |
|
499 | 497 | 1096 files to transfer, 99.0 KB of data (zstd rust !) |
|
500 | 498 | transferred 99.0 KB in * seconds (* */sec) (glob) (zstd rust !) |
|
501 | 499 | #endif |
|
502 | 500 | #if stream-bundle2-v3 |
|
503 | 501 | $ hg clone --stream -U http://localhost:$HGPORT secret-allowed |
|
504 | 502 | streaming all changes |
|
505 | 503 | 1093 entries to transfer |
|
506 | 504 | transferred 102 KB in * seconds (* */sec) (glob) (no-zstd !) |
|
507 | 505 | transferred 98.9 KB in * seconds (* */sec) (glob) (zstd no-rust !) |
|
508 | 506 | transferred 99.0 KB in * seconds (* */sec) (glob) (zstd rust !) |
|
509 | 507 | #endif |
|
510 | 508 | |
|
511 | 509 | $ killdaemons.py |
|
512 | 510 | |
|
513 | 511 | Verify interaction between preferuncompressed and secret presence |
|
514 | 512 | |
|
515 | 513 | $ cd server |
|
516 | 514 | $ hg serve --config server.preferuncompressed=true -p $HGPORT -d --pid-file=hg.pid |
|
517 | 515 | $ cat hg.pid > $DAEMON_PIDS |
|
518 | 516 | $ cd .. |
|
519 | 517 | |
|
520 | 518 | $ hg clone -U http://localhost:$HGPORT preferuncompressed-secret |
|
521 | 519 | requesting all changes |
|
522 | 520 | adding changesets |
|
523 | 521 | adding manifests |
|
524 | 522 | adding file changes |
|
525 | 523 | added 2 changesets with 1025 changes to 1025 files |
|
526 | 524 | new changesets 96ee1d7354c4:c17445101a72 |
|
527 | 525 | |
|
528 | 526 | $ killdaemons.py |
|
529 | 527 | |
|
530 | 528 | Clone not allowed when full bundles disabled and can't serve secrets |
|
531 | 529 | |
|
532 | 530 | $ cd server |
|
533 | 531 | $ hg serve --config server.disablefullbundle=true -p $HGPORT -d --pid-file=hg.pid |
|
534 | 532 | $ cat hg.pid > $DAEMON_PIDS |
|
535 | 533 | $ cd .. |
|
536 | 534 | |
|
537 | 535 | $ hg clone --stream http://localhost:$HGPORT secret-full-disabled |
|
538 | 536 | warning: stream clone requested but server has them disabled |
|
539 | 537 | requesting all changes |
|
540 | 538 | remote: abort: server has pull-based clones disabled |
|
541 | 539 | abort: pull failed on remote |
|
542 | 540 | (remove --pull if specified or upgrade Mercurial) |
|
543 | 541 | [100] |
|
544 | 542 | |
|
545 | 543 | Local stream clone with secrets involved |
|
546 | 544 | (This is just a test over behavior: if you have access to the repo's files, |
|
547 | 545 | there is no security so it isn't important to prevent a clone here.) |
|
548 | 546 | |
|
549 | 547 | $ hg clone -U --stream server local-secret |
|
550 | 548 | warning: stream clone requested but server has them disabled |
|
551 | 549 | requesting all changes |
|
552 | 550 | adding changesets |
|
553 | 551 | adding manifests |
|
554 | 552 | adding file changes |
|
555 | 553 | added 2 changesets with 1025 changes to 1025 files |
|
556 | 554 | new changesets 96ee1d7354c4:c17445101a72 |
|
557 | 555 | |
|
558 | 556 | Stream clone while repo is changing: |
|
559 | 557 | |
|
560 | 558 | $ mkdir changing |
|
561 | 559 | $ cd changing |
|
562 | 560 | |
|
563 | 561 | prepare repo with small and big file to cover both code paths in emitrevlogdata |
|
564 | 562 | |
|
565 | 563 | $ hg init repo |
|
566 | 564 | $ touch repo/f1 |
|
567 | 565 | $ $TESTDIR/seq.py 50000 > repo/f2 |
|
568 | 566 | $ hg -R repo ci -Aqm "0" |
|
569 | 567 | $ HG_TEST_STREAM_WALKED_FILE_1="$TESTTMP/sync_file_walked_1" |
|
570 | 568 | $ export HG_TEST_STREAM_WALKED_FILE_1 |
|
571 | 569 | $ HG_TEST_STREAM_WALKED_FILE_2="$TESTTMP/sync_file_walked_2" |
|
572 | 570 | $ export HG_TEST_STREAM_WALKED_FILE_2 |
|
573 | 571 | $ HG_TEST_STREAM_WALKED_FILE_3="$TESTTMP/sync_file_walked_3" |
|
574 | 572 | $ export HG_TEST_STREAM_WALKED_FILE_3 |
|
575 | 573 | # $ cat << EOF >> $HGRCPATH |
|
576 | 574 | # > [hooks] |
|
577 | 575 | # > pre-clone=rm -f "$TESTTMP/sync_file_walked_*" |
|
578 | 576 | # > EOF |
|
579 | 577 | $ hg serve -R repo -p $HGPORT1 -d --error errors.log --pid-file=hg.pid --config extensions.stream_steps="$RUNTESTDIR/testlib/ext-stream-clone-steps.py" |
|
580 | 578 | $ cat hg.pid >> $DAEMON_PIDS |
|
581 | 579 | |
|
582 | 580 | clone while modifying the repo between stating file with write lock and |
|
583 | 581 | actually serving file content |
|
584 | 582 | |
|
585 | 583 | $ (hg clone -q --stream -U http://localhost:$HGPORT1 clone; touch "$HG_TEST_STREAM_WALKED_FILE_3") & |
|
586 | 584 | $ $RUNTESTDIR/testlib/wait-on-file 10 $HG_TEST_STREAM_WALKED_FILE_1 |
|
587 | 585 | $ echo >> repo/f1 |
|
588 | 586 | $ echo >> repo/f2 |
|
589 | 587 | $ hg -R repo ci -m "1" --config ui.timeout.warn=-1 |
|
590 | 588 | $ touch $HG_TEST_STREAM_WALKED_FILE_2 |
|
591 | 589 | $ $RUNTESTDIR/testlib/wait-on-file 10 $HG_TEST_STREAM_WALKED_FILE_3 |
|
592 | 590 | $ hg -R clone id |
|
593 | 591 | 000000000000 |
|
594 | 592 | $ cat errors.log |
|
595 | 593 | $ cd .. |
|
596 | 594 | |
|
597 | 595 | Stream repository with bookmarks |
|
598 | 596 | -------------------------------- |
|
599 | 597 | |
|
600 | 598 | (revert introduction of secret changeset) |
|
601 | 599 | |
|
602 | 600 | $ hg -R server phase --draft 'secret()' |
|
603 | 601 | |
|
604 | 602 | add a bookmark |
|
605 | 603 | |
|
606 | 604 | $ hg -R server bookmark -r tip some-bookmark |
|
607 | 605 | |
|
608 | 606 | clone it |
|
609 | 607 | |
|
610 | 608 | #if stream-legacy |
|
611 | 609 | $ hg clone --stream http://localhost:$HGPORT with-bookmarks |
|
612 | 610 | streaming all changes |
|
613 | 611 | 1091 files to transfer, 102 KB of data (no-zstd !) |
|
614 | 612 | transferred 102 KB in * seconds (* */sec) (glob) (no-zstd !) |
|
615 | 613 | 1091 files to transfer, 98.8 KB of data (zstd !) |
|
616 | 614 | transferred 98.8 KB in * seconds (* */sec) (glob) (zstd !) |
|
617 | 615 | searching for changes |
|
618 | 616 | no changes found |
|
619 | 617 | updating to branch default |
|
620 | 618 | 1088 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
621 | 619 | #endif |
|
622 | 620 | #if stream-bundle2-v2 |
|
623 | 621 | $ hg clone --stream http://localhost:$HGPORT with-bookmarks |
|
624 | 622 | streaming all changes |
|
625 | 623 | 1097 files to transfer, 102 KB of data (no-zstd !) |
|
626 | 624 | transferred 102 KB in * seconds (* */sec) (glob) (no-zstd !) |
|
627 | 625 | 1097 files to transfer, 99.1 KB of data (zstd no-rust !) |
|
628 | 626 | transferred 99.1 KB in * seconds (* */sec) (glob) (zstd no-rust !) |
|
629 | 627 | 1099 files to transfer, 99.2 KB of data (zstd rust !) |
|
630 | 628 | transferred 99.2 KB in * seconds (* */sec) (glob) (zstd rust !) |
|
631 | 629 | updating to branch default |
|
632 | 630 | 1088 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
633 | 631 | #endif |
|
634 | 632 | #if stream-bundle2-v3 |
|
635 | 633 | $ hg clone --stream http://localhost:$HGPORT with-bookmarks |
|
636 | 634 | streaming all changes |
|
637 | 635 | 1096 entries to transfer |
|
638 | 636 | transferred 102 KB in * seconds (* */sec) (glob) (no-zstd !) |
|
639 | 637 | transferred 99.1 KB in * seconds (* */sec) (glob) (zstd no-rust !) |
|
640 | 638 | transferred 99.2 KB in * seconds (* */sec) (glob) (zstd rust !) |
|
641 | 639 | updating to branch default |
|
642 | 640 | 1088 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
643 | 641 | #endif |
|
644 | 642 | $ hg verify -R with-bookmarks -q |
|
645 | 643 | $ hg -R with-bookmarks bookmarks |
|
646 | 644 | some-bookmark 2:5223b5e3265f |
|
647 | 645 | |
|
648 | 646 | Stream repository with phases |
|
649 | 647 | ----------------------------- |
|
650 | 648 | |
|
651 | 649 | Clone as publishing |
|
652 | 650 | |
|
653 | 651 | $ hg -R server phase -r 'all()' |
|
654 | 652 | 0: draft |
|
655 | 653 | 1: draft |
|
656 | 654 | 2: draft |
|
657 | 655 | |
|
658 | 656 | #if stream-legacy |
|
659 | 657 | $ hg clone --stream http://localhost:$HGPORT phase-publish |
|
660 | 658 | streaming all changes |
|
661 | 659 | 1091 files to transfer, 102 KB of data (no-zstd !) |
|
662 | 660 | transferred 102 KB in * seconds (* */sec) (glob) (no-zstd !) |
|
663 | 661 | 1091 files to transfer, 98.8 KB of data (zstd !) |
|
664 | 662 | transferred 98.8 KB in * seconds (* */sec) (glob) (zstd !) |
|
665 | 663 | searching for changes |
|
666 | 664 | no changes found |
|
667 | 665 | updating to branch default |
|
668 | 666 | 1088 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
669 | 667 | #endif |
|
670 | 668 | #if stream-bundle2-v2 |
|
671 | 669 | $ hg clone --stream http://localhost:$HGPORT phase-publish |
|
672 | 670 | streaming all changes |
|
673 | 671 | 1097 files to transfer, 102 KB of data (no-zstd !) |
|
674 | 672 | transferred 102 KB in * seconds (* */sec) (glob) (no-zstd !) |
|
675 | 673 | 1097 files to transfer, 99.1 KB of data (zstd no-rust !) |
|
676 | 674 | transferred 99.1 KB in * seconds (* */sec) (glob) (zstd no-rust !) |
|
677 | 675 | 1099 files to transfer, 99.2 KB of data (zstd rust !) |
|
678 | 676 | transferred 99.2 KB in * seconds (* */sec) (glob) (zstd rust !) |
|
679 | 677 | updating to branch default |
|
680 | 678 | 1088 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
681 | 679 | #endif |
|
682 | 680 | #if stream-bundle2-v3 |
|
683 | 681 | $ hg clone --stream http://localhost:$HGPORT phase-publish |
|
684 | 682 | streaming all changes |
|
685 | 683 | 1096 entries to transfer |
|
686 | 684 | transferred 102 KB in * seconds (* */sec) (glob) (no-zstd !) |
|
687 | 685 | transferred 99.1 KB in * seconds (* */sec) (glob) (zstd no-rust !) |
|
688 | 686 | transferred 99.2 KB in * seconds (* */sec) (glob) (zstd rust !) |
|
689 | 687 | updating to branch default |
|
690 | 688 | 1088 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
691 | 689 | #endif |
|
692 | 690 | $ hg verify -R phase-publish -q |
|
693 | 691 | $ hg -R phase-publish phase -r 'all()' |
|
694 | 692 | 0: public |
|
695 | 693 | 1: public |
|
696 | 694 | 2: public |
|
697 | 695 | |
|
698 | 696 | Clone as non publishing |
|
699 | 697 | |
|
700 | 698 | $ cat << EOF >> server/.hg/hgrc |
|
701 | 699 | > [phases] |
|
702 | 700 | > publish = False |
|
703 | 701 | > EOF |
|
704 | 702 | $ killdaemons.py |
|
705 | 703 | $ hg -R server serve -p $HGPORT -d --pid-file=hg.pid |
|
706 | 704 | $ cat hg.pid > $DAEMON_PIDS |
|
707 | 705 | |
|
708 | 706 | #if stream-legacy |
|
709 | 707 | |
|
710 | 708 | With v1 of the stream protocol, changeset are always cloned as public. It make |
|
711 | 709 | stream v1 unsuitable for non-publishing repository. |
|
712 | 710 | |
|
713 | 711 | $ hg clone --stream http://localhost:$HGPORT phase-no-publish |
|
714 | 712 | streaming all changes |
|
715 | 713 | 1091 files to transfer, 102 KB of data (no-zstd !) |
|
716 | 714 | transferred 102 KB in * seconds (* */sec) (glob) (no-zstd !) |
|
717 | 715 | 1091 files to transfer, 98.8 KB of data (zstd !) |
|
718 | 716 | transferred 98.8 KB in * seconds (* */sec) (glob) (zstd !) |
|
719 | 717 | searching for changes |
|
720 | 718 | no changes found |
|
721 | 719 | updating to branch default |
|
722 | 720 | 1088 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
723 | 721 | $ hg -R phase-no-publish phase -r 'all()' |
|
724 | 722 | 0: public |
|
725 | 723 | 1: public |
|
726 | 724 | 2: public |
|
727 | 725 | #endif |
|
728 | 726 | #if stream-bundle2-v2 |
|
729 | 727 | $ hg clone --stream http://localhost:$HGPORT phase-no-publish |
|
730 | 728 | streaming all changes |
|
731 | 729 | 1098 files to transfer, 102 KB of data (no-zstd !) |
|
732 | 730 | transferred 102 KB in * seconds (* */sec) (glob) (no-zstd !) |
|
733 | 731 | 1098 files to transfer, 99.1 KB of data (zstd no-rust !) |
|
734 | 732 | transferred 99.1 KB in * seconds (* */sec) (glob) (zstd no-rust !) |
|
735 | 733 | 1100 files to transfer, 99.2 KB of data (zstd rust !) |
|
736 | 734 | transferred 99.2 KB in * seconds (* */sec) (glob) (zstd rust !) |
|
737 | 735 | updating to branch default |
|
738 | 736 | 1088 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
739 | 737 | $ hg -R phase-no-publish phase -r 'all()' |
|
740 | 738 | 0: draft |
|
741 | 739 | 1: draft |
|
742 | 740 | 2: draft |
|
743 | 741 | #endif |
|
744 | 742 | #if stream-bundle2-v3 |
|
745 | 743 | $ hg clone --stream http://localhost:$HGPORT phase-no-publish |
|
746 | 744 | streaming all changes |
|
747 | 745 | 1097 entries to transfer |
|
748 | 746 | transferred 102 KB in * seconds (* */sec) (glob) (no-zstd !) |
|
749 | 747 | transferred 99.1 KB in * seconds (* */sec) (glob) (zstd no-rust !) |
|
750 | 748 | transferred 99.2 KB in * seconds (* */sec) (glob) (zstd rust !) |
|
751 | 749 | updating to branch default |
|
752 | 750 | 1088 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
753 | 751 | $ hg -R phase-no-publish phase -r 'all()' |
|
754 | 752 | 0: draft |
|
755 | 753 | 1: draft |
|
756 | 754 | 2: draft |
|
757 | 755 | #endif |
|
758 | 756 | $ hg verify -R phase-no-publish -q |
|
759 | 757 | |
|
760 | 758 | $ killdaemons.py |
|
761 | 759 | |
|
762 | 760 | #if stream-legacy |
|
763 | 761 | |
|
764 | 762 | With v1 of the stream protocol, changeset are always cloned as public. There's |
|
765 | 763 | no obsolescence markers exchange in stream v1. |
|
766 | 764 | |
|
767 | 765 | #endif |
|
768 | 766 | #if stream-bundle2-v2 |
|
769 | 767 | |
|
770 | 768 | Stream repository with obsolescence |
|
771 | 769 | ----------------------------------- |
|
772 | 770 | |
|
773 | 771 | Clone non-publishing with obsolescence |
|
774 | 772 | |
|
775 | 773 | $ cat >> $HGRCPATH << EOF |
|
776 | 774 | > [experimental] |
|
777 | 775 | > evolution=all |
|
778 | 776 | > EOF |
|
779 | 777 | |
|
780 | 778 | $ cd server |
|
781 | 779 | $ echo foo > foo |
|
782 | 780 | $ hg -q commit -m 'about to be pruned' |
|
783 | 781 | $ hg debugobsolete `hg log -r . -T '{node}'` -d '0 0' -u test --record-parents |
|
784 | 782 | 1 new obsolescence markers |
|
785 | 783 | obsoleted 1 changesets |
|
786 | 784 | $ hg up null -q |
|
787 | 785 | $ hg log -T '{rev}: {phase}\n' |
|
788 | 786 | 2: draft |
|
789 | 787 | 1: draft |
|
790 | 788 | 0: draft |
|
791 | 789 | $ hg serve -p $HGPORT -d --pid-file=hg.pid |
|
792 | 790 | $ cat hg.pid > $DAEMON_PIDS |
|
793 | 791 | $ cd .. |
|
794 | 792 | |
|
795 | 793 | $ hg clone -U --stream http://localhost:$HGPORT with-obsolescence |
|
796 | 794 | streaming all changes |
|
797 | 795 | 1099 files to transfer, 102 KB of data (no-zstd !) |
|
798 | 796 | transferred 102 KB in * seconds (* */sec) (glob) (no-zstd !) |
|
799 | 797 | 1099 files to transfer, 99.5 KB of data (zstd no-rust !) |
|
800 | 798 | transferred 99.5 KB in * seconds (* */sec) (glob) (zstd no-rust !) |
|
801 | 799 | 1101 files to transfer, 99.6 KB of data (zstd rust !) |
|
802 | 800 | transferred 99.6 KB in * seconds (* */sec) (glob) (zstd rust !) |
|
803 | 801 | $ hg -R with-obsolescence log -T '{rev}: {phase}\n' |
|
804 | 802 | 2: draft |
|
805 | 803 | 1: draft |
|
806 | 804 | 0: draft |
|
807 | 805 | $ hg debugobsolete -R with-obsolescence |
|
808 | 806 | 8c206a663911c1f97f2f9d7382e417ae55872cfa 0 {5223b5e3265f0df40bb743da62249413d74ac70f} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
809 | 807 | $ hg verify -R with-obsolescence -q |
|
810 | 808 | |
|
811 | 809 | $ hg clone -U --stream --config experimental.evolution=0 http://localhost:$HGPORT with-obsolescence-no-evolution |
|
812 | 810 | streaming all changes |
|
813 | 811 | remote: abort: server has obsolescence markers, but client cannot receive them via stream clone |
|
814 | 812 | abort: pull failed on remote |
|
815 | 813 | [100] |
|
816 | 814 | |
|
817 | 815 | $ killdaemons.py |
|
818 | 816 | |
|
819 | 817 | #endif |
|
820 | 818 | #if stream-bundle2-v3 |
|
821 | 819 | |
|
822 | 820 | Stream repository with obsolescence |
|
823 | 821 | ----------------------------------- |
|
824 | 822 | |
|
825 | 823 | Clone non-publishing with obsolescence |
|
826 | 824 | |
|
827 | 825 | $ cat >> $HGRCPATH << EOF |
|
828 | 826 | > [experimental] |
|
829 | 827 | > evolution=all |
|
830 | 828 | > EOF |
|
831 | 829 | |
|
832 | 830 | $ cd server |
|
833 | 831 | $ echo foo > foo |
|
834 | 832 | $ hg -q commit -m 'about to be pruned' |
|
835 | 833 | $ hg debugobsolete `hg log -r . -T '{node}'` -d '0 0' -u test --record-parents |
|
836 | 834 | 1 new obsolescence markers |
|
837 | 835 | obsoleted 1 changesets |
|
838 | 836 | $ hg up null -q |
|
839 | 837 | $ hg log -T '{rev}: {phase}\n' |
|
840 | 838 | 2: draft |
|
841 | 839 | 1: draft |
|
842 | 840 | 0: draft |
|
843 | 841 | $ hg serve -p $HGPORT -d --pid-file=hg.pid |
|
844 | 842 | $ cat hg.pid > $DAEMON_PIDS |
|
845 | 843 | $ cd .. |
|
846 | 844 | |
|
847 | 845 | $ hg clone -U --stream http://localhost:$HGPORT with-obsolescence |
|
848 | 846 | streaming all changes |
|
849 | 847 | 1098 entries to transfer |
|
850 | 848 | transferred 102 KB in * seconds (* */sec) (glob) (no-zstd !) |
|
851 | 849 | transferred 99.5 KB in * seconds (* */sec) (glob) (zstd no-rust !) |
|
852 | 850 | transferred 99.6 KB in * seconds (* */sec) (glob) (zstd rust !) |
|
853 | 851 | $ hg -R with-obsolescence log -T '{rev}: {phase}\n' |
|
854 | 852 | 2: draft |
|
855 | 853 | 1: draft |
|
856 | 854 | 0: draft |
|
857 | 855 | $ hg debugobsolete -R with-obsolescence |
|
858 | 856 | 8c206a663911c1f97f2f9d7382e417ae55872cfa 0 {5223b5e3265f0df40bb743da62249413d74ac70f} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
859 | 857 | $ hg verify -R with-obsolescence -q |
|
860 | 858 | |
|
861 | 859 | $ hg clone -U --stream --config experimental.evolution=0 http://localhost:$HGPORT with-obsolescence-no-evolution |
|
862 | 860 | streaming all changes |
|
863 | 861 | remote: abort: server has obsolescence markers, but client cannot receive them via stream clone |
|
864 | 862 | abort: pull failed on remote |
|
865 | 863 | [100] |
|
866 | 864 | |
|
867 | 865 | $ killdaemons.py |
|
868 | 866 | |
|
869 | 867 | #endif |
|
870 | 868 | |
|
871 | 869 | Cloning a repo with no requirements doesn't give some obscure error |
|
872 | 870 | |
|
873 | 871 | $ mkdir -p empty-repo/.hg |
|
874 | 872 | $ hg clone -q --stream ssh://user@dummy/empty-repo empty-repo2 |
|
875 | 873 | $ hg --cwd empty-repo2 verify -q |
|
876 | 874 | |
|
877 | 875 | Cloning a repo with an empty manifestlog doesn't give some weird error |
|
878 | 876 | |
|
879 | 877 | $ rm -r empty-repo; hg init empty-repo |
|
880 | 878 | $ (cd empty-repo; touch x; hg commit -Am empty; hg debugstrip -r 0) > /dev/null |
|
881 | 879 | $ hg clone -q --stream ssh://user@dummy/empty-repo empty-repo3 |
|
882 | 880 | $ hg --cwd empty-repo3 verify -q 2>&1 | grep -v warning |
|
883 | 881 | [1] |
|
884 | 882 | |
|
885 | 883 | The warnings filtered out here are talking about zero-length 'orphan' data files. |
|
886 | 884 | Those are harmless, so that's fine. |
|
887 | 885 |
General Comments 0
You need to be logged in to leave comments.
Login now