Show More
@@ -1,161 +1,168 | |||
|
1 | TRANSITIONAL CONFIG | |
|
2 | $ cat << EOF >> $HGRCPATH | |
|
3 | > [format] | |
|
4 | > sparse-revlog = yes | |
|
5 | > EOF | |
|
6 | ||
|
1 | 7 |
$ |
|
2 | 8 | |
|
3 | 9 |
$ |
|
4 | 10 | $ cd master |
|
5 | 11 | $ mkdir dir |
|
6 | 12 | $ mkdir dir/src |
|
7 | 13 | $ cd dir/src |
|
8 | 14 | $ for x in `$TESTDIR/seq.py 20`; do echo $x > "f$x"; hg add "f$x"; hg commit -m "Commit src $x"; done |
|
9 | 15 | $ cd .. |
|
10 | 16 | $ mkdir tests |
|
11 | 17 | $ cd tests |
|
12 | 18 | $ for x in `$TESTDIR/seq.py 20`; do echo $x > "t$x"; hg add "t$x"; hg commit -m "Commit test $x"; done |
|
13 | 19 | $ cd ../../.. |
|
14 | 20 | |
|
15 | 21 | narrow clone a file, f10 |
|
16 | 22 | |
|
17 | 23 | $ hg clone --narrow ssh://user@dummy/master narrow --noupdate --include "dir/src/f10" |
|
18 | 24 | requesting all changes |
|
19 | 25 | adding changesets |
|
20 | 26 | adding manifests |
|
21 | 27 | adding file changes |
|
22 | 28 | added 40 changesets with 1 changes to 1 files |
|
23 | 29 | new changesets *:* (glob) |
|
24 | 30 | $ cd narrow |
|
25 | 31 | $ cat .hg/requires | grep -v generaldelta |
|
26 | 32 | dotencode |
|
27 | 33 | fncache |
|
28 | 34 | narrowhg-experimental |
|
29 | 35 | revlogv1 |
|
36 | sparserevlog | |
|
30 | 37 | store |
|
31 | 38 | testonly-simplestore (reposimplestore !) |
|
32 | 39 | |
|
33 | 40 | $ hg tracked |
|
34 | 41 | I path:dir/src/f10 |
|
35 | 42 | $ hg update |
|
36 | 43 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
37 | 44 | $ find * | sort |
|
38 | 45 | dir |
|
39 | 46 | dir/src |
|
40 | 47 | dir/src/f10 |
|
41 | 48 | $ cat dir/src/f10 |
|
42 | 49 | 10 |
|
43 | 50 | |
|
44 | 51 | $ cd .. |
|
45 | 52 | |
|
46 | 53 | narrow clone a directory, tests/, except tests/t19 |
|
47 | 54 | |
|
48 | 55 | $ hg clone --narrow ssh://user@dummy/master narrowdir --noupdate --include "dir/tests/" --exclude "dir/tests/t19" |
|
49 | 56 | requesting all changes |
|
50 | 57 | adding changesets |
|
51 | 58 | adding manifests |
|
52 | 59 | adding file changes |
|
53 | 60 | added 40 changesets with 19 changes to 19 files |
|
54 | 61 | new changesets *:* (glob) |
|
55 | 62 | $ cd narrowdir |
|
56 | 63 | $ hg tracked |
|
57 | 64 | I path:dir/tests |
|
58 | 65 | X path:dir/tests/t19 |
|
59 | 66 | $ hg update |
|
60 | 67 | 19 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
61 | 68 | $ find * | sort |
|
62 | 69 | dir |
|
63 | 70 | dir/tests |
|
64 | 71 | dir/tests/t1 |
|
65 | 72 | dir/tests/t10 |
|
66 | 73 | dir/tests/t11 |
|
67 | 74 | dir/tests/t12 |
|
68 | 75 | dir/tests/t13 |
|
69 | 76 | dir/tests/t14 |
|
70 | 77 | dir/tests/t15 |
|
71 | 78 | dir/tests/t16 |
|
72 | 79 | dir/tests/t17 |
|
73 | 80 | dir/tests/t18 |
|
74 | 81 | dir/tests/t2 |
|
75 | 82 | dir/tests/t20 |
|
76 | 83 | dir/tests/t3 |
|
77 | 84 | dir/tests/t4 |
|
78 | 85 | dir/tests/t5 |
|
79 | 86 | dir/tests/t6 |
|
80 | 87 | dir/tests/t7 |
|
81 | 88 | dir/tests/t8 |
|
82 | 89 | dir/tests/t9 |
|
83 | 90 | |
|
84 | 91 | $ cd .. |
|
85 | 92 | |
|
86 | 93 | narrow clone everything but a directory (tests/) |
|
87 | 94 | |
|
88 | 95 | $ hg clone --narrow ssh://user@dummy/master narrowroot --noupdate --exclude "dir/tests" |
|
89 | 96 | requesting all changes |
|
90 | 97 | adding changesets |
|
91 | 98 | adding manifests |
|
92 | 99 | adding file changes |
|
93 | 100 | added 40 changesets with 20 changes to 20 files |
|
94 | 101 | new changesets *:* (glob) |
|
95 | 102 | $ cd narrowroot |
|
96 | 103 | $ hg tracked |
|
97 | 104 | I path:. |
|
98 | 105 | X path:dir/tests |
|
99 | 106 | $ hg update |
|
100 | 107 | 20 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
101 | 108 | $ find * | sort |
|
102 | 109 | dir |
|
103 | 110 | dir/src |
|
104 | 111 | dir/src/f1 |
|
105 | 112 | dir/src/f10 |
|
106 | 113 | dir/src/f11 |
|
107 | 114 | dir/src/f12 |
|
108 | 115 | dir/src/f13 |
|
109 | 116 | dir/src/f14 |
|
110 | 117 | dir/src/f15 |
|
111 | 118 | dir/src/f16 |
|
112 | 119 | dir/src/f17 |
|
113 | 120 | dir/src/f18 |
|
114 | 121 | dir/src/f19 |
|
115 | 122 | dir/src/f2 |
|
116 | 123 | dir/src/f20 |
|
117 | 124 | dir/src/f3 |
|
118 | 125 | dir/src/f4 |
|
119 | 126 | dir/src/f5 |
|
120 | 127 | dir/src/f6 |
|
121 | 128 | dir/src/f7 |
|
122 | 129 | dir/src/f8 |
|
123 | 130 | dir/src/f9 |
|
124 | 131 | |
|
125 | 132 | $ cd .. |
|
126 | 133 | |
|
127 | 134 | Testing the --narrowspec flag to clone |
|
128 | 135 | |
|
129 | 136 | $ cat >> narrowspecs <<EOF |
|
130 | 137 | > %include foo |
|
131 | 138 | > [include] |
|
132 | 139 | > path:dir/tests/ |
|
133 | 140 | > path:dir/src/f12 |
|
134 | 141 | > EOF |
|
135 | 142 | |
|
136 | 143 | $ hg clone ssh://user@dummy/master specfile --narrowspec narrowspecs |
|
137 | 144 | reading narrowspec from '$TESTTMP/narrowspecs' |
|
138 | 145 | abort: cannot specify other files using '%include' in narrowspec |
|
139 | 146 | [255] |
|
140 | 147 | |
|
141 | 148 | $ cat > narrowspecs <<EOF |
|
142 | 149 | > [include] |
|
143 | 150 | > path:dir/tests/ |
|
144 | 151 | > path:dir/src/f12 |
|
145 | 152 | > EOF |
|
146 | 153 | |
|
147 | 154 | $ hg clone ssh://user@dummy/master specfile --narrowspec narrowspecs |
|
148 | 155 | reading narrowspec from '$TESTTMP/narrowspecs' |
|
149 | 156 | requesting all changes |
|
150 | 157 | adding changesets |
|
151 | 158 | adding manifests |
|
152 | 159 | adding file changes |
|
153 | 160 | added 40 changesets with 21 changes to 21 files |
|
154 | 161 | new changesets 681085829a73:26ce255d5b5d |
|
155 | 162 | updating to branch default |
|
156 | 163 | 21 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
157 | 164 | $ cd specfile |
|
158 | 165 | $ hg tracked |
|
159 | 166 | I path:dir/src/f12 |
|
160 | 167 | I path:dir/tests |
|
161 | 168 | $ cd .. |
General Comments 0
You need to be logged in to leave comments.
Login now