author | Gregory Szorc <gregory.szorc@gmail.com> |
Sun, 29 Sep 2019 10:37:38 -0700 | |
changeset 43015 | dffa9d3c2491 |
parent 42505 | c1850798f995 |
child 44724 | 5c2a4f37eace |
permissions | -rw-r--r-- |
40583
186921bc8e66
test-narrow-clone-stream: include no usefncache case which is broken
Yuya Nishihara <yuya@tcha.org>
parents:
40582
diff
changeset
|
1 |
#testcases tree flat-fncache flat-nofncache |
40494
9aeb9e2d28a7
store: introduce _matchtrackedpath() and use it to filter store files
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
40338
diff
changeset
|
2 |
|
40338
af62936c2508
streamclone: new server config and some API changes for narrow stream clones
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
3 |
Tests narrow stream clones |
af62936c2508
streamclone: new server config and some API changes for narrow stream clones
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
4 |
|
af62936c2508
streamclone: new server config and some API changes for narrow stream clones
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
5 |
$ . "$TESTDIR/narrow-library.sh" |
af62936c2508
streamclone: new server config and some API changes for narrow stream clones
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
6 |
|
40494
9aeb9e2d28a7
store: introduce _matchtrackedpath() and use it to filter store files
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
40338
diff
changeset
|
7 |
#if tree |
9aeb9e2d28a7
store: introduce _matchtrackedpath() and use it to filter store files
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
40338
diff
changeset
|
8 |
$ cat << EOF >> $HGRCPATH |
9aeb9e2d28a7
store: introduce _matchtrackedpath() and use it to filter store files
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
40338
diff
changeset
|
9 |
> [experimental] |
9aeb9e2d28a7
store: introduce _matchtrackedpath() and use it to filter store files
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
40338
diff
changeset
|
10 |
> treemanifest = 1 |
9aeb9e2d28a7
store: introduce _matchtrackedpath() and use it to filter store files
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
40338
diff
changeset
|
11 |
> EOF |
9aeb9e2d28a7
store: introduce _matchtrackedpath() and use it to filter store files
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
40338
diff
changeset
|
12 |
#endif |
9aeb9e2d28a7
store: introduce _matchtrackedpath() and use it to filter store files
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
40338
diff
changeset
|
13 |
|
40583
186921bc8e66
test-narrow-clone-stream: include no usefncache case which is broken
Yuya Nishihara <yuya@tcha.org>
parents:
40582
diff
changeset
|
14 |
#if flat-nofncache |
186921bc8e66
test-narrow-clone-stream: include no usefncache case which is broken
Yuya Nishihara <yuya@tcha.org>
parents:
40582
diff
changeset
|
15 |
$ cat << EOF >> $HGRCPATH |
186921bc8e66
test-narrow-clone-stream: include no usefncache case which is broken
Yuya Nishihara <yuya@tcha.org>
parents:
40582
diff
changeset
|
16 |
> [format] |
186921bc8e66
test-narrow-clone-stream: include no usefncache case which is broken
Yuya Nishihara <yuya@tcha.org>
parents:
40582
diff
changeset
|
17 |
> usefncache = 0 |
186921bc8e66
test-narrow-clone-stream: include no usefncache case which is broken
Yuya Nishihara <yuya@tcha.org>
parents:
40582
diff
changeset
|
18 |
> EOF |
186921bc8e66
test-narrow-clone-stream: include no usefncache case which is broken
Yuya Nishihara <yuya@tcha.org>
parents:
40582
diff
changeset
|
19 |
#endif |
186921bc8e66
test-narrow-clone-stream: include no usefncache case which is broken
Yuya Nishihara <yuya@tcha.org>
parents:
40582
diff
changeset
|
20 |
|
40338
af62936c2508
streamclone: new server config and some API changes for narrow stream clones
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
21 |
Server setup |
af62936c2508
streamclone: new server config and some API changes for narrow stream clones
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
22 |
|
af62936c2508
streamclone: new server config and some API changes for narrow stream clones
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
23 |
$ hg init master |
af62936c2508
streamclone: new server config and some API changes for narrow stream clones
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
24 |
$ cd master |
af62936c2508
streamclone: new server config and some API changes for narrow stream clones
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
25 |
$ mkdir dir |
af62936c2508
streamclone: new server config and some API changes for narrow stream clones
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
26 |
$ mkdir dir/src |
af62936c2508
streamclone: new server config and some API changes for narrow stream clones
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
27 |
$ cd dir/src |
40582
a4c2788e8f48
test-narrow-clone-stream: include uppercase letter in filename
Yuya Nishihara <yuya@tcha.org>
parents:
40549
diff
changeset
|
28 |
$ for x in `$TESTDIR/seq.py 20`; do echo $x > "F$x"; hg add "F$x"; hg commit -m "Commit src $x"; done |
40338
af62936c2508
streamclone: new server config and some API changes for narrow stream clones
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
29 |
|
af62936c2508
streamclone: new server config and some API changes for narrow stream clones
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
30 |
$ cd .. |
af62936c2508
streamclone: new server config and some API changes for narrow stream clones
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
31 |
$ mkdir tests |
af62936c2508
streamclone: new server config and some API changes for narrow stream clones
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
32 |
$ cd tests |
40582
a4c2788e8f48
test-narrow-clone-stream: include uppercase letter in filename
Yuya Nishihara <yuya@tcha.org>
parents:
40549
diff
changeset
|
33 |
$ for x in `$TESTDIR/seq.py 20`; do echo $x > "F$x"; hg add "F$x"; hg commit -m "Commit src $x"; done |
40338
af62936c2508
streamclone: new server config and some API changes for narrow stream clones
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
34 |
$ cd ../../.. |
af62936c2508
streamclone: new server config and some API changes for narrow stream clones
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
35 |
|
af62936c2508
streamclone: new server config and some API changes for narrow stream clones
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
36 |
Trying to stream clone when the server does not support it |
af62936c2508
streamclone: new server config and some API changes for narrow stream clones
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
37 |
|
40582
a4c2788e8f48
test-narrow-clone-stream: include uppercase letter in filename
Yuya Nishihara <yuya@tcha.org>
parents:
40549
diff
changeset
|
38 |
$ hg clone --narrow ssh://user@dummy/master narrow --noupdate --include "dir/src/F10" --stream |
40338
af62936c2508
streamclone: new server config and some API changes for narrow stream clones
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
39 |
streaming all changes |
af62936c2508
streamclone: new server config and some API changes for narrow stream clones
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
40 |
remote: abort: server does not support narrow stream clones |
af62936c2508
streamclone: new server config and some API changes for narrow stream clones
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
41 |
abort: pull failed on remote |
af62936c2508
streamclone: new server config and some API changes for narrow stream clones
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
42 |
[255] |
af62936c2508
streamclone: new server config and some API changes for narrow stream clones
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
43 |
|
af62936c2508
streamclone: new server config and some API changes for narrow stream clones
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
44 |
Enable stream clone on the server |
af62936c2508
streamclone: new server config and some API changes for narrow stream clones
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
45 |
|
40549
d6ec45b79277
tests: fix config knob in test-narrow-clone-stream.t
Augie Fackler <augie@google.com>
parents:
40494
diff
changeset
|
46 |
$ echo "[experimental]" >> master/.hg/hgrc |
d6ec45b79277
tests: fix config knob in test-narrow-clone-stream.t
Augie Fackler <augie@google.com>
parents:
40494
diff
changeset
|
47 |
$ echo "server.stream-narrow-clones=True" >> master/.hg/hgrc |
40338
af62936c2508
streamclone: new server config and some API changes for narrow stream clones
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
48 |
|
af62936c2508
streamclone: new server config and some API changes for narrow stream clones
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
49 |
Cloning a specific file when stream clone is supported |
af62936c2508
streamclone: new server config and some API changes for narrow stream clones
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
50 |
|
40582
a4c2788e8f48
test-narrow-clone-stream: include uppercase letter in filename
Yuya Nishihara <yuya@tcha.org>
parents:
40549
diff
changeset
|
51 |
$ hg clone --narrow ssh://user@dummy/master narrow --noupdate --include "dir/src/F10" --stream |
40338
af62936c2508
streamclone: new server config and some API changes for narrow stream clones
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
52 |
streaming all changes |
40494
9aeb9e2d28a7
store: introduce _matchtrackedpath() and use it to filter store files
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
40338
diff
changeset
|
53 |
* files to transfer, * KB of data (glob) |
9aeb9e2d28a7
store: introduce _matchtrackedpath() and use it to filter store files
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
40338
diff
changeset
|
54 |
transferred * KB in * seconds (* */sec) (glob) |
9aeb9e2d28a7
store: introduce _matchtrackedpath() and use it to filter store files
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
40338
diff
changeset
|
55 |
|
9aeb9e2d28a7
store: introduce _matchtrackedpath() and use it to filter store files
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
40338
diff
changeset
|
56 |
$ cd narrow |
9aeb9e2d28a7
store: introduce _matchtrackedpath() and use it to filter store files
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
40338
diff
changeset
|
57 |
$ ls |
9aeb9e2d28a7
store: introduce _matchtrackedpath() and use it to filter store files
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
40338
diff
changeset
|
58 |
$ hg tracked |
40582
a4c2788e8f48
test-narrow-clone-stream: include uppercase letter in filename
Yuya Nishihara <yuya@tcha.org>
parents:
40549
diff
changeset
|
59 |
I path:dir/src/F10 |
40494
9aeb9e2d28a7
store: introduce _matchtrackedpath() and use it to filter store files
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
40338
diff
changeset
|
60 |
|
9aeb9e2d28a7
store: introduce _matchtrackedpath() and use it to filter store files
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
40338
diff
changeset
|
61 |
Making sure we have the correct set of requirements |
9aeb9e2d28a7
store: introduce _matchtrackedpath() and use it to filter store files
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
40338
diff
changeset
|
62 |
|
9aeb9e2d28a7
store: introduce _matchtrackedpath() and use it to filter store files
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
40338
diff
changeset
|
63 |
$ cat .hg/requires |
42505
c1850798f995
run-tests: stop matching line for missing feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
41226
diff
changeset
|
64 |
dotencode (tree !) |
c1850798f995
run-tests: stop matching line for missing feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
41226
diff
changeset
|
65 |
dotencode (flat-fncache !) |
c1850798f995
run-tests: stop matching line for missing feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
41226
diff
changeset
|
66 |
fncache (tree !) |
c1850798f995
run-tests: stop matching line for missing feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
41226
diff
changeset
|
67 |
fncache (flat-fncache !) |
40494
9aeb9e2d28a7
store: introduce _matchtrackedpath() and use it to filter store files
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
40338
diff
changeset
|
68 |
generaldelta |
9aeb9e2d28a7
store: introduce _matchtrackedpath() and use it to filter store files
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
40338
diff
changeset
|
69 |
narrowhg-experimental |
9aeb9e2d28a7
store: introduce _matchtrackedpath() and use it to filter store files
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
40338
diff
changeset
|
70 |
revlogv1 |
40899
192291ca909b
test: enable sparse-revlog for test-narrow-clone-stream.t
Boris Feld <boris.feld@octobus.net>
parents:
40584
diff
changeset
|
71 |
sparserevlog |
40494
9aeb9e2d28a7
store: introduce _matchtrackedpath() and use it to filter store files
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
40338
diff
changeset
|
72 |
store |
9aeb9e2d28a7
store: introduce _matchtrackedpath() and use it to filter store files
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
40338
diff
changeset
|
73 |
treemanifest (tree !) |
9aeb9e2d28a7
store: introduce _matchtrackedpath() and use it to filter store files
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
40338
diff
changeset
|
74 |
|
9aeb9e2d28a7
store: introduce _matchtrackedpath() and use it to filter store files
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
40338
diff
changeset
|
75 |
Making sure store has the required files |
9aeb9e2d28a7
store: introduce _matchtrackedpath() and use it to filter store files
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
40338
diff
changeset
|
76 |
|
9aeb9e2d28a7
store: introduce _matchtrackedpath() and use it to filter store files
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
40338
diff
changeset
|
77 |
$ ls .hg/store/ |
9aeb9e2d28a7
store: introduce _matchtrackedpath() and use it to filter store files
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
40338
diff
changeset
|
78 |
00changelog.i |
9aeb9e2d28a7
store: introduce _matchtrackedpath() and use it to filter store files
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
40338
diff
changeset
|
79 |
00manifest.i |
42505
c1850798f995
run-tests: stop matching line for missing feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
41226
diff
changeset
|
80 |
data |
c1850798f995
run-tests: stop matching line for missing feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
41226
diff
changeset
|
81 |
fncache (tree !) |
c1850798f995
run-tests: stop matching line for missing feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
41226
diff
changeset
|
82 |
fncache (flat-fncache !) |
40494
9aeb9e2d28a7
store: introduce _matchtrackedpath() and use it to filter store files
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
40338
diff
changeset
|
83 |
meta (tree !) |
9aeb9e2d28a7
store: introduce _matchtrackedpath() and use it to filter store files
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
40338
diff
changeset
|
84 |
narrowspec |
9aeb9e2d28a7
store: introduce _matchtrackedpath() and use it to filter store files
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
40338
diff
changeset
|
85 |
undo |
9aeb9e2d28a7
store: introduce _matchtrackedpath() and use it to filter store files
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
40338
diff
changeset
|
86 |
undo.backupfiles |
41226
0f2b8d51bfdf
narrow: include journal.narrowspec in transaction journal
Martin von Zweigbergk <martinvonz@google.com>
parents:
41041
diff
changeset
|
87 |
undo.narrowspec |
40494
9aeb9e2d28a7
store: introduce _matchtrackedpath() and use it to filter store files
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
40338
diff
changeset
|
88 |
undo.phaseroots |
9aeb9e2d28a7
store: introduce _matchtrackedpath() and use it to filter store files
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
40338
diff
changeset
|
89 |
|
9aeb9e2d28a7
store: introduce _matchtrackedpath() and use it to filter store files
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
40338
diff
changeset
|
90 |
Checking that repository has all the required data and not broken |
9aeb9e2d28a7
store: introduce _matchtrackedpath() and use it to filter store files
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
40338
diff
changeset
|
91 |
|
9aeb9e2d28a7
store: introduce _matchtrackedpath() and use it to filter store files
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
40338
diff
changeset
|
92 |
$ hg verify |
9aeb9e2d28a7
store: introduce _matchtrackedpath() and use it to filter store files
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
40338
diff
changeset
|
93 |
checking changesets |
9aeb9e2d28a7
store: introduce _matchtrackedpath() and use it to filter store files
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
40338
diff
changeset
|
94 |
checking manifests |
9aeb9e2d28a7
store: introduce _matchtrackedpath() and use it to filter store files
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
40338
diff
changeset
|
95 |
checking directory manifests (tree !) |
9aeb9e2d28a7
store: introduce _matchtrackedpath() and use it to filter store files
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
40338
diff
changeset
|
96 |
crosschecking files in changesets and manifests |
9aeb9e2d28a7
store: introduce _matchtrackedpath() and use it to filter store files
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
40338
diff
changeset
|
97 |
checking files |
9aeb9e2d28a7
store: introduce _matchtrackedpath() and use it to filter store files
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
40338
diff
changeset
|
98 |
checked 40 changesets with 1 changes to 1 files |