test-narrow-clone-stream.t
105 lines
| 2.3 KiB
| text/troff
|
Tads3Lexer
/ tests / test-narrow-clone-stream.t
|
r40619 | #testcases tree flat-fncache flat-nofncache | ||
|
r40529 | |||
|
r40374 | Tests narrow stream clones | ||
$ . "$TESTDIR/narrow-library.sh" | ||||
|
r40529 | #if tree | ||
$ cat << EOF >> $HGRCPATH | ||||
> [experimental] | ||||
> treemanifest = 1 | ||||
> EOF | ||||
#endif | ||||
|
r40619 | #if flat-nofncache | ||
$ cat << EOF >> $HGRCPATH | ||||
> [format] | ||||
> usefncache = 0 | ||||
> EOF | ||||
#endif | ||||
|
r40374 | Server setup | ||
$ hg init master | ||||
$ cd master | ||||
$ mkdir dir | ||||
$ mkdir dir/src | ||||
$ cd dir/src | ||||
|
r40618 | $ for x in `$TESTDIR/seq.py 20`; do echo $x > "F$x"; hg add "F$x"; hg commit -m "Commit src $x"; done | ||
|
r40374 | |||
$ cd .. | ||||
$ mkdir tests | ||||
$ cd tests | ||||
|
r40618 | $ for x in `$TESTDIR/seq.py 20`; do echo $x > "F$x"; hg add "F$x"; hg commit -m "Commit src $x"; done | ||
|
r40374 | $ cd ../../.. | ||
Trying to stream clone when the server does not support it | ||||
|
r40618 | $ hg clone --narrow ssh://user@dummy/master narrow --noupdate --include "dir/src/F10" --stream | ||
|
r40374 | streaming all changes | ||
remote: abort: server does not support narrow stream clones | ||||
abort: pull failed on remote | ||||
|
r47739 | [100] | ||
|
r40374 | |||
Enable stream clone on the server | ||||
|
r40582 | $ echo "[experimental]" >> master/.hg/hgrc | ||
$ echo "server.stream-narrow-clones=True" >> master/.hg/hgrc | ||||
|
r40374 | |||
Cloning a specific file when stream clone is supported | ||||
|
r40618 | $ hg clone --narrow ssh://user@dummy/master narrow --noupdate --include "dir/src/F10" --stream | ||
|
r40374 | streaming all changes | ||
|
r40529 | * files to transfer, * KB of data (glob) | ||
transferred * KB in * seconds (* */sec) (glob) | ||||
$ cd narrow | ||||
|
r45218 | $ ls -A | ||
.hg | ||||
|
r40529 | $ hg tracked | ||
|
r40618 | I path:dir/src/F10 | ||
|
r40529 | |||
Making sure we have the correct set of requirements | ||||
r49295 | $ hg debugrequires | |||
r42705 | dotencode (tree !) | |||
dotencode (flat-fncache !) | ||||
|
r49142 | dirstate-v2 (dirstate-v2 !) | ||
r42705 | fncache (tree !) | |||
fncache (flat-fncache !) | ||||
|
r40529 | generaldelta | ||
narrowhg-experimental | ||||
r47646 | persistent-nodemap (rust !) | |||
r47636 | revlog-compression-zstd (zstd !) | |||
|
r40529 | revlogv1 | ||
r49515 | share-safe | |||
|
r40935 | sparserevlog | ||
|
r40529 | store | ||
treemanifest (tree !) | ||||
Making sure store has the required files | ||||
$ ls .hg/store/ | ||||
00changelog.i | ||||
00manifest.i | ||||
r42705 | data | |||
fncache (tree !) | ||||
fncache (flat-fncache !) | ||||
|
r40529 | meta (tree !) | ||
narrowspec | ||||
r49515 | requires | |||
|
r40529 | undo | ||
undo.backupfiles | ||||
|
r41262 | undo.narrowspec | ||
|
r40529 | undo.phaseroots | ||
Checking that repository has all the required data and not broken | ||||
$ hg verify | ||||
checking changesets | ||||
checking manifests | ||||
checking directory manifests (tree !) | ||||
crosschecking files in changesets and manifests | ||||
checking files | ||||
|
r50721 | checking dirstate | ||
|
r40529 | checked 40 changesets with 1 changes to 1 files | ||