Mercurial > hg
comparison tests/test-http.t @ 32260:d0d9a4fca59b
clone: add a server-side option to disable full getbundles (pull-based clones)
For large enough repositories, pull-based clones take too long, and an attempt
to use them indicates some sort of configuration or other issue or maybe an
outdated Mercurial. Add a config option to disable them.
author | Siddharth Agarwal <sid0@fb.com> |
---|---|
date | Thu, 11 May 2017 10:50:05 -0700 |
parents | 076f1ff43f0f |
children | 10e162bb9bf5 |
comparison
equal
deleted
inserted
replaced
32259:076f1ff43f0f | 32260:d0d9a4fca59b |
---|---|
352 remote: abort: this is an exercise | 352 remote: abort: this is an exercise |
353 abort: pull failed on remote | 353 abort: pull failed on remote |
354 [255] | 354 [255] |
355 $ cat error.log | 355 $ cat error.log |
356 | 356 |
357 disable pull-based clones | |
358 | |
359 $ hg -R test serve -p $HGPORT1 -d --pid-file=hg4.pid -E error.log --config server.disablefullbundle=True | |
360 $ cat hg4.pid >> $DAEMON_PIDS | |
361 $ hg clone http://localhost:$HGPORT1/ disable-pull-clone | |
362 requesting all changes | |
363 remote: abort: server has pull-based clones disabled | |
364 abort: pull failed on remote | |
365 (remove --pull if specified or upgrade Mercurial) | |
366 [255] | |
367 | |
368 ... but keep stream clones working | |
369 | |
370 $ hg clone --uncompressed --noupdate http://localhost:$HGPORT1/ test-stream-clone | |
371 streaming all changes | |
372 * files to transfer, * of data (glob) | |
373 transferred * in * seconds (*/sec) (glob) | |
374 searching for changes | |
375 no changes found | |
376 $ cat error.log | |
377 | |
378 ... and also keep partial clones and pulls working | |
379 $ hg clone http://localhost:$HGPORT1 --rev 0 test-partial-clone | |
380 adding changesets | |
381 adding manifests | |
382 adding file changes | |
383 added 1 changesets with 4 changes to 4 files | |
384 updating to branch default | |
385 4 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
386 $ hg pull -R test-partial-clone | |
387 pulling from http://localhost:$HGPORT1/ | |
388 searching for changes | |
389 adding changesets | |
390 adding manifests | |
391 adding file changes | |
392 added 2 changesets with 3 changes to 3 files | |
393 (run 'hg update' to get a working copy) | |
394 | |
357 corrupt cookies file should yield a warning | 395 corrupt cookies file should yield a warning |
358 | 396 |
359 $ cat > $TESTTMP/cookies.txt << EOF | 397 $ cat > $TESTTMP/cookies.txt << EOF |
360 > bad format | 398 > bad format |
361 > EOF | 399 > EOF |