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