259 added 2 changesets with 2 changes to 2 files |
259 added 2 changesets with 2 changes to 2 files |
260 finished applying clone bundle |
260 finished applying clone bundle |
261 searching for changes |
261 searching for changes |
262 no changes found |
262 no changes found |
263 #endif |
263 #endif |
|
264 |
|
265 Set up manifest for testing preferences |
|
266 (Remember, the TYPE does not have to match reality - the URL is |
|
267 important) |
|
268 |
|
269 $ cp full.hg gz-a.hg |
|
270 $ cp full.hg gz-b.hg |
|
271 $ cp full.hg bz2-a.hg |
|
272 $ cp full.hg bz2-b.hg |
|
273 $ cat > server/.hg/clonebundles.manifest << EOF |
|
274 > http://localhost:$HGPORT1/gz-a.hg BUNDLESPEC=gzip-v2 extra=a |
|
275 > http://localhost:$HGPORT1/bz2-a.hg BUNDLESPEC=bzip2-v2 extra=a |
|
276 > http://localhost:$HGPORT1/gz-b.hg BUNDLESPEC=gzip-v2 extra=b |
|
277 > http://localhost:$HGPORT1/bz2-b.hg BUNDLESPEC=bzip2-v2 extra=b |
|
278 > EOF |
|
279 |
|
280 Preferring an undefined attribute will take first entry |
|
281 |
|
282 $ hg --config experimental.clonebundleprefers=foo=bar clone -U http://localhost:$HGPORT prefer-foo |
|
283 applying clone bundle from http://localhost:$HGPORT1/gz-a.hg |
|
284 adding changesets |
|
285 adding manifests |
|
286 adding file changes |
|
287 added 2 changesets with 2 changes to 2 files |
|
288 finished applying clone bundle |
|
289 searching for changes |
|
290 no changes found |
|
291 |
|
292 Preferring bz2 type will download first entry of that type |
|
293 |
|
294 $ hg --config experimental.clonebundleprefers=COMPRESSION=bzip2 clone -U http://localhost:$HGPORT prefer-bz |
|
295 applying clone bundle from http://localhost:$HGPORT1/bz2-a.hg |
|
296 adding changesets |
|
297 adding manifests |
|
298 adding file changes |
|
299 added 2 changesets with 2 changes to 2 files |
|
300 finished applying clone bundle |
|
301 searching for changes |
|
302 no changes found |
|
303 |
|
304 Preferring multiple values of an option works |
|
305 |
|
306 $ hg --config experimental.clonebundleprefers=COMPRESSION=unknown,COMPRESSION=bzip2 clone -U http://localhost:$HGPORT prefer-multiple-bz |
|
307 applying clone bundle from http://localhost:$HGPORT1/bz2-a.hg |
|
308 adding changesets |
|
309 adding manifests |
|
310 adding file changes |
|
311 added 2 changesets with 2 changes to 2 files |
|
312 finished applying clone bundle |
|
313 searching for changes |
|
314 no changes found |
|
315 |
|
316 Sorting multiple values should get us back to original first entry |
|
317 |
|
318 $ hg --config experimental.clonebundleprefers=BUNDLESPEC=unknown,BUNDLESPEC=gzip-v2,BUNDLESPEC=bzip2-v2 clone -U http://localhost:$HGPORT prefer-multiple-gz |
|
319 applying clone bundle from http://localhost:$HGPORT1/gz-a.hg |
|
320 adding changesets |
|
321 adding manifests |
|
322 adding file changes |
|
323 added 2 changesets with 2 changes to 2 files |
|
324 finished applying clone bundle |
|
325 searching for changes |
|
326 no changes found |
|
327 |
|
328 Preferring multiple attributes has correct order |
|
329 |
|
330 $ hg --config experimental.clonebundleprefers=extra=b,BUNDLESPEC=bzip2-v2 clone -U http://localhost:$HGPORT prefer-separate-attributes |
|
331 applying clone bundle from http://localhost:$HGPORT1/bz2-b.hg |
|
332 adding changesets |
|
333 adding manifests |
|
334 adding file changes |
|
335 added 2 changesets with 2 changes to 2 files |
|
336 finished applying clone bundle |
|
337 searching for changes |
|
338 no changes found |
|
339 |
|
340 Test where attribute is missing from some entries |
|
341 |
|
342 $ cat > server/.hg/clonebundles.manifest << EOF |
|
343 > http://localhost:$HGPORT1/gz-a.hg BUNDLESPEC=gzip-v2 |
|
344 > http://localhost:$HGPORT1/bz2-a.hg BUNDLESPEC=bzip2-v2 |
|
345 > http://localhost:$HGPORT1/gz-b.hg BUNDLESPEC=gzip-v2 extra=b |
|
346 > http://localhost:$HGPORT1/bz2-b.hg BUNDLESPEC=bzip2-v2 extra=b |
|
347 > EOF |
|
348 |
|
349 $ hg --config experimental.clonebundleprefers=extra=b clone -U http://localhost:$HGPORT prefer-partially-defined-attribute |
|
350 applying clone bundle from http://localhost:$HGPORT1/gz-b.hg |
|
351 adding changesets |
|
352 adding manifests |
|
353 adding file changes |
|
354 added 2 changesets with 2 changes to 2 files |
|
355 finished applying clone bundle |
|
356 searching for changes |
|
357 no changes found |