Show More
@@ -1,86 +1,110 b'' | |||
|
1 | #testcases tree flat | |
|
1 | #testcases tree flat-fncache flat-nofncache | |
|
2 | 2 | |
|
3 | 3 | Tests narrow stream clones |
|
4 | 4 | |
|
5 | 5 | $ . "$TESTDIR/narrow-library.sh" |
|
6 | 6 | |
|
7 | 7 | #if tree |
|
8 | 8 | $ cat << EOF >> $HGRCPATH |
|
9 | 9 | > [experimental] |
|
10 | 10 | > treemanifest = 1 |
|
11 | 11 | > EOF |
|
12 | 12 | #endif |
|
13 | 13 | |
|
14 | #if flat-nofncache | |
|
15 | $ cat << EOF >> $HGRCPATH | |
|
16 | > [format] | |
|
17 | > usefncache = 0 | |
|
18 | > EOF | |
|
19 | #endif | |
|
20 | ||
|
14 | 21 | Server setup |
|
15 | 22 | |
|
16 | 23 | $ hg init master |
|
17 | 24 | $ cd master |
|
18 | 25 | $ mkdir dir |
|
19 | 26 | $ mkdir dir/src |
|
20 | 27 | $ cd dir/src |
|
21 | 28 | $ for x in `$TESTDIR/seq.py 20`; do echo $x > "F$x"; hg add "F$x"; hg commit -m "Commit src $x"; done |
|
22 | 29 | |
|
23 | 30 | $ cd .. |
|
24 | 31 | $ mkdir tests |
|
25 | 32 | $ cd tests |
|
26 | 33 | $ for x in `$TESTDIR/seq.py 20`; do echo $x > "F$x"; hg add "F$x"; hg commit -m "Commit src $x"; done |
|
27 | 34 | $ cd ../../.. |
|
28 | 35 | |
|
29 | 36 | Trying to stream clone when the server does not support it |
|
30 | 37 | |
|
31 | 38 | $ hg clone --narrow ssh://user@dummy/master narrow --noupdate --include "dir/src/F10" --stream |
|
32 | 39 | streaming all changes |
|
33 | 40 | remote: abort: server does not support narrow stream clones |
|
34 | 41 | abort: pull failed on remote |
|
35 | 42 | [255] |
|
36 | 43 | |
|
37 | 44 | Enable stream clone on the server |
|
38 | 45 | |
|
39 | 46 | $ echo "[experimental]" >> master/.hg/hgrc |
|
40 | 47 | $ echo "server.stream-narrow-clones=True" >> master/.hg/hgrc |
|
41 | 48 | |
|
42 | 49 | Cloning a specific file when stream clone is supported |
|
43 | 50 | |
|
44 | 51 | $ hg clone --narrow ssh://user@dummy/master narrow --noupdate --include "dir/src/F10" --stream |
|
45 | 52 | streaming all changes |
|
46 | 53 | * files to transfer, * KB of data (glob) |
|
47 | 54 | transferred * KB in * seconds (* */sec) (glob) |
|
48 | 55 | |
|
49 | 56 | $ cd narrow |
|
50 | 57 | $ ls |
|
51 | 58 | $ hg tracked |
|
52 | 59 | I path:dir/src/F10 |
|
53 | 60 | |
|
54 | 61 | Making sure we have the correct set of requirements |
|
55 | 62 | |
|
56 | 63 | $ cat .hg/requires |
|
57 | dotencode | |
|
58 | fncache | |
|
64 | dotencode (tree flat-fncache !) | |
|
65 | fncache (tree flat-fncache !) | |
|
59 | 66 | generaldelta |
|
60 | 67 | narrowhg-experimental |
|
61 | 68 | revlogv1 |
|
62 | 69 | store |
|
63 | 70 | treemanifest (tree !) |
|
64 | 71 | |
|
65 | 72 | Making sure store has the required files |
|
66 | 73 | |
|
67 | 74 | $ ls .hg/store/ |
|
68 | 75 | 00changelog.i |
|
69 | 76 | 00manifest.i |
|
70 | data | |
|
71 | fncache | |
|
77 | data (tree flat-fncache !) | |
|
78 | fncache (tree flat-fncache !) | |
|
72 | 79 | meta (tree !) |
|
73 | 80 | narrowspec |
|
74 | 81 | undo |
|
75 | 82 | undo.backupfiles |
|
76 | 83 | undo.phaseroots |
|
77 | 84 | |
|
78 | 85 | Checking that repository has all the required data and not broken |
|
79 | 86 | |
|
87 | #if flat-nofncache | |
|
88 | $ hg verify | |
|
89 | checking changesets | |
|
90 | checking manifests | |
|
91 | crosschecking files in changesets and manifests | |
|
92 | checking files | |
|
93 | warning: revlog 'data/dir/src/F10.i' not in fncache! | |
|
94 | 9: empty or missing dir/src/F10 | |
|
95 | dir/src/F10@9: manifest refers to unknown revision 419ee72d626b | |
|
96 | checked 40 changesets with 0 changes to 1 files | |
|
97 | 1 warnings encountered! | |
|
98 | hint: run "hg debugrebuildfncache" to recover from corrupt fncache | |
|
99 | 2 integrity errors encountered! | |
|
100 | (first damaged changeset appears to be 9) | |
|
101 | [1] | |
|
102 | #else | |
|
80 | 103 | $ hg verify |
|
81 | 104 | checking changesets |
|
82 | 105 | checking manifests |
|
83 | 106 | checking directory manifests (tree !) |
|
84 | 107 | crosschecking files in changesets and manifests |
|
85 | 108 | checking files |
|
86 | 109 | checked 40 changesets with 1 changes to 1 files |
|
110 | #endif |
General Comments 0
You need to be logged in to leave comments.
Login now