Show More
This diff has been collapsed as it changes many lines, (627 lines changed) Show them Hide them | |||
@@ -0,0 +1,627 b'' | |||
|
1 | ============================================================================================== | |
|
2 | Test the computation of linkrev that is needed when sending file content after their changeset | |
|
3 | ============================================================================================== | |
|
4 | ||
|
5 | Setup | |
|
6 | ===== | |
|
7 | ||
|
8 | tree/flat make the hash unstable had are anoying, reinstall that later. | |
|
9 | .. #testcases tree flat | |
|
10 | $ . "$TESTDIR/narrow-library.sh" | |
|
11 | ||
|
12 | .. #if tree | |
|
13 | .. $ cat << EOF >> $HGRCPATH | |
|
14 | .. > [experimental] | |
|
15 | .. > treemanifest = 1 | |
|
16 | .. > EOF | |
|
17 | .. #endif | |
|
18 | ||
|
19 | $ hg init server | |
|
20 | $ cd server | |
|
21 | ||
|
22 | We build a non linear history with some filenome that exist in parallel. | |
|
23 | ||
|
24 | $ echo foo > readme.txt | |
|
25 | $ hg add readme.txt | |
|
26 | $ hg ci -m 'root' | |
|
27 | $ mkdir dir_x | |
|
28 | $ echo foo > dir_x/f1 | |
|
29 | $ echo fo0 > dir_x/f2 | |
|
30 | $ echo f0o > dir_x/f3 | |
|
31 | $ mkdir dir_y | |
|
32 | $ echo bar > dir_y/f1 | |
|
33 | $ echo 8ar > dir_y/f2 | |
|
34 | $ echo ba9 > dir_y/f3 | |
|
35 | $ hg add dir_x dir_y | |
|
36 | adding dir_x/f1 | |
|
37 | adding dir_x/f2 | |
|
38 | adding dir_x/f3 | |
|
39 | adding dir_y/f1 | |
|
40 | adding dir_y/f2 | |
|
41 | adding dir_y/f3 | |
|
42 | $ hg ci -m 'rev_a_' | |
|
43 | ||
|
44 | $ hg update 'desc("rev_a_")' | |
|
45 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
|
46 | $ echo foo-01 > dir_x/f1 | |
|
47 | $ hg ci -m 'rev_b_0_' | |
|
48 | ||
|
49 | $ hg update 'desc("rev_b_0_")' | |
|
50 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
|
51 | $ echo foo-02 > dir_x/f1 | |
|
52 | $ hg ci -m 'rev_b_1_' | |
|
53 | ||
|
54 | $ hg update 'desc("rev_a_")' | |
|
55 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
|
56 | $ mkdir dir_z | |
|
57 | $ echo bar-01 > dir_y/f1 | |
|
58 | $ echo 8ar-01 > dir_y/f2 | |
|
59 | $ echo babar > dir_z/f1 | |
|
60 | $ hg add dir_z | |
|
61 | adding dir_z/f1 | |
|
62 | $ hg ci -m 'rev_c_0_' | |
|
63 | created new head | |
|
64 | ||
|
65 | $ hg update 'desc("rev_c_0_")' | |
|
66 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
|
67 | $ echo celeste > dir_z/f2 | |
|
68 | $ echo zephir > dir_z/f1 | |
|
69 | $ hg add dir_z | |
|
70 | adding dir_z/f2 | |
|
71 | $ hg ci -m 'rev_c_1_' | |
|
72 | ||
|
73 | $ hg update 'desc("rev_b_1_")' | |
|
74 | 3 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
|
75 | $ echo fo0-01 > dir_x/f2 | |
|
76 | $ mkdir dir_z | |
|
77 | $ ls dir_z | |
|
78 | $ echo babar > dir_z/f1 | |
|
79 | $ echo celeste > dir_z/f2 | |
|
80 | $ echo foo > dir_z/f3 | |
|
81 | $ hg add dir_z | |
|
82 | adding dir_z/f1 | |
|
83 | adding dir_z/f2 | |
|
84 | adding dir_z/f3 | |
|
85 | $ hg ci -m 'rev_b_2_' | |
|
86 | ||
|
87 | $ hg update 'desc("rev_b_2_")' | |
|
88 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
|
89 | $ echo f0o-01 > dir_x/f3 | |
|
90 | $ echo zephir > dir_z/f1 | |
|
91 | $ echo arthur > dir_z/f2 | |
|
92 | $ hg ci -m 'rev_b_3_' | |
|
93 | ||
|
94 | $ hg update 'desc("rev_c_1_")' | |
|
95 | 6 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
|
96 | $ echo bar-02 > dir_y/f1 | |
|
97 | $ echo ba9-01 > dir_y/f3 | |
|
98 | $ echo bar > dir_z/f4 | |
|
99 | $ hg add dir_z/ | |
|
100 | adding dir_z/f4 | |
|
101 | $ echo arthur > dir_z/f2 | |
|
102 | $ hg ci -m 'rev_c_2_' | |
|
103 | ||
|
104 | $ hg update 'desc("rev_b_3_")' | |
|
105 | 7 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
|
106 | $ hg merge 'desc("rev_c_2_")' | |
|
107 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
|
108 | (branch merge, don't forget to commit) | |
|
109 | $ echo flore > dir_z/f1 | |
|
110 | $ echo foo-04 > dir_x/f1 | |
|
111 | $ echo foo-01 > dir_z/f3 | |
|
112 | $ hg ci -m 'rev_d_0_' | |
|
113 | $ echo alexandre > dir_z/f1 | |
|
114 | $ echo bar-01 > dir_z/f4 | |
|
115 | $ echo bar-04 > dir_y/f1 | |
|
116 | $ hg ci -m 'rev_d_1_' | |
|
117 | $ hg status | |
|
118 | $ hg status -A | |
|
119 | C dir_x/f1 | |
|
120 | C dir_x/f2 | |
|
121 | C dir_x/f3 | |
|
122 | C dir_y/f1 | |
|
123 | C dir_y/f2 | |
|
124 | C dir_y/f3 | |
|
125 | C dir_z/f1 | |
|
126 | C dir_z/f2 | |
|
127 | C dir_z/f3 | |
|
128 | C dir_z/f4 | |
|
129 | C readme.txt | |
|
130 | $ hg up null | |
|
131 | 0 files updated, 0 files merged, 11 files removed, 0 files unresolved | |
|
132 | ||
|
133 | Resulting graph | |
|
134 | ||
|
135 | $ hg log -GT "{rev}:{node|short}: {desc}\n {files}\n" | |
|
136 | o 10:71e6a9c7a6a2: rev_d_1_ | |
|
137 | | dir_y/f1 dir_z/f1 dir_z/f4 | |
|
138 | o 9:b0a0cbe5ce57: rev_d_0_ | |
|
139 | |\ dir_x/f1 dir_z/f1 dir_z/f3 | |
|
140 | | o 8:d04e01dcc82d: rev_c_2_ | |
|
141 | | | dir_y/f1 dir_y/f3 dir_z/f2 dir_z/f4 | |
|
142 | o | 7:fc05b303b551: rev_b_3_ | |
|
143 | | | dir_x/f3 dir_z/f1 dir_z/f2 | |
|
144 | o | 6:17fd34adb43b: rev_b_2_ | |
|
145 | | | dir_x/f2 dir_z/f1 dir_z/f2 dir_z/f3 | |
|
146 | | o 5:fa05dbe8eed1: rev_c_1_ | |
|
147 | | | dir_z/f1 dir_z/f2 | |
|
148 | | o 4:59b4258b00dc: rev_c_0_ | |
|
149 | | | dir_y/f1 dir_y/f2 dir_z/f1 | |
|
150 | o | 3:328f8ced5276: rev_b_1_ | |
|
151 | | | dir_x/f1 | |
|
152 | o | 2:0ccce83dd29b: rev_b_0_ | |
|
153 | |/ dir_x/f1 | |
|
154 | o 1:63f468a0fdac: rev_a_ | |
|
155 | | dir_x/f1 dir_x/f2 dir_x/f3 dir_y/f1 dir_y/f2 dir_y/f3 | |
|
156 | o 0:4978c5c7386b: root | |
|
157 | readme.txt | |
|
158 | ||
|
159 | Useful save useful nodes : | |
|
160 | ||
|
161 | $ hg log -T '{node}' > ../rev_c_2_ --rev 'desc("rev_c_2_")' | |
|
162 | $ hg log -T '{node}' > ../rev_b_3_ --rev 'desc("rev_b_3_")' | |
|
163 | ||
|
164 | Reference output | |
|
165 | ||
|
166 | Since we have the same file conent on each side, we should get a limited number | |
|
167 | of file revision (and the associated linkrev). | |
|
168 | ||
|
169 | This these shared file-revision and the associated linkrev computation is | |
|
170 | fueling the complexity test in this file. | |
|
171 | ||
|
172 | $ cat > ../linkrev-check.sh << EOF | |
|
173 | > echo '# expected linkrev for dir_z/f1' | |
|
174 | > hg log -T '0 {rev}\n' --rev 'min(desc(rev_b_2_) or desc(rev_c_0_))' | |
|
175 | > hg log -T '1 {rev}\n' --rev 'min(desc(rev_b_3_) or desc(rev_c_1_))' | |
|
176 | > hg log -T '2 {rev}\n' --rev 'min(desc(rev_d_0_))' | |
|
177 | > hg log -T '3 {rev}\n' --rev 'min(desc(rev_d_1_))' | |
|
178 | > hg debugindex dir_z/f1 | |
|
179 | > # rev linkrev nodeid p1-nodeid p2-nodeid | |
|
180 | > # 0 4 360afd990eef 000000000000 000000000000 | |
|
181 | > # 1 5 7054ee088631 360afd990eef 000000000000 | |
|
182 | > # 2 9 6bb290463f21 7054ee088631 000000000000 | |
|
183 | > # 3 10 91fec784ff86 6bb290463f21 000000000000 | |
|
184 | > echo '# expected linkrev for dir_z/f2' | |
|
185 | > hg log -T '0 {rev}\n' --rev 'min(desc(rev_c_1_) or desc(rev_b_2_))' | |
|
186 | > hg log -T '1 {rev}\n' --rev 'min(desc(rev_c_2_) or desc(rev_b_3_))' | |
|
187 | > hg debugindex dir_z/f2 | |
|
188 | > # rev linkrev nodeid p1-nodeid p2-nodeid | |
|
189 | > # 0 5 093bb0f8a0fb 000000000000 000000000000 | |
|
190 | > # 1 7 0f47e254cb19 093bb0f8a0fb 000000000000 | |
|
191 | > if hg files --rev tip | grep dir_z/f3 > /dev/null; then | |
|
192 | > echo '# expected linkrev for dir_z/f3' | |
|
193 | > hg log -T '0 {rev}\n' --rev 'desc(rev_b_2_)' | |
|
194 | > hg log -T '1 {rev}\n' --rev 'desc(rev_d_0_)' | |
|
195 | > hg debugindex dir_z/f3 | |
|
196 | > # rev linkrev nodeid p1-nodeid p2-nodeid | |
|
197 | > # 0 6 2ed2a3912a0b 000000000000 000000000000 | |
|
198 | > # 1 9 7c6d649320ae 2ed2a3912a0b 000000000000 | |
|
199 | > fi | |
|
200 | > if hg files --rev tip | grep dir_z/f4 > /dev/null; then | |
|
201 | > echo '# expected linkrev for dir_z/f4' | |
|
202 | > hg log -T '0 {rev}\n' --rev 'desc(rev_c_2_)' | |
|
203 | > hg log -T '1 {rev}\n' --rev 'desc(rev_d_1_)' | |
|
204 | > hg debugindex dir_z/f4 | |
|
205 | > # rev linkrev nodeid p1-nodeid p2-nodeid | |
|
206 | > # 0 8 b004912a8510 000000000000 000000000000 | |
|
207 | > # 1 10 9f85b3b95e70 b004912a8510 000000000000 | |
|
208 | > fi | |
|
209 | > echo '# verify the repository' | |
|
210 | > hg verify | |
|
211 | > EOF | |
|
212 | $ sh ../linkrev-check.sh | |
|
213 | # expected linkrev for dir_z/f1 | |
|
214 | 0 4 | |
|
215 | 1 5 | |
|
216 | 2 9 | |
|
217 | 3 10 | |
|
218 | rev linkrev nodeid p1-nodeid p2-nodeid | |
|
219 | 0 4 360afd990eef 000000000000 000000000000 | |
|
220 | 1 5 7054ee088631 360afd990eef 000000000000 | |
|
221 | 2 9 6bb290463f21 7054ee088631 000000000000 | |
|
222 | 3 10 91fec784ff86 6bb290463f21 000000000000 | |
|
223 | # expected linkrev for dir_z/f2 | |
|
224 | 0 5 | |
|
225 | 1 7 | |
|
226 | rev linkrev nodeid p1-nodeid p2-nodeid | |
|
227 | 0 5 093bb0f8a0fb 000000000000 000000000000 | |
|
228 | 1 7 0f47e254cb19 093bb0f8a0fb 000000000000 | |
|
229 | # expected linkrev for dir_z/f3 | |
|
230 | 0 6 | |
|
231 | 1 9 | |
|
232 | rev linkrev nodeid p1-nodeid p2-nodeid | |
|
233 | 0 6 2ed2a3912a0b 000000000000 000000000000 | |
|
234 | 1 9 7c6d649320ae 2ed2a3912a0b 000000000000 | |
|
235 | # expected linkrev for dir_z/f4 | |
|
236 | 0 8 | |
|
237 | 1 10 | |
|
238 | rev linkrev nodeid p1-nodeid p2-nodeid | |
|
239 | 0 8 b004912a8510 000000000000 000000000000 | |
|
240 | 1 10 9f85b3b95e70 b004912a8510 000000000000 | |
|
241 | # verify the repository | |
|
242 | checking changesets | |
|
243 | checking manifests | |
|
244 | crosschecking files in changesets and manifests | |
|
245 | checking files | |
|
246 | checking dirstate | |
|
247 | checked 11 changesets with 27 changes to 11 files | |
|
248 | ||
|
249 | $ cd .. | |
|
250 | ||
|
251 | Test linkrev computation for various widening scenario | |
|
252 | ====================================================== | |
|
253 | ||
|
254 | Having cloning all revisions initially | |
|
255 | -------------------------------------- | |
|
256 | ||
|
257 | $ hg clone --narrow ssh://user@dummy/server --include dir_x --include dir_y client_xy_rev_all --noupdate | |
|
258 | requesting all changes | |
|
259 | adding changesets | |
|
260 | adding manifests | |
|
261 | adding file changes | |
|
262 | added 11 changesets with 16 changes to 6 files | |
|
263 | new changesets 4978c5c7386b:71e6a9c7a6a2 | |
|
264 | $ cd client_xy_rev_all | |
|
265 | $ hg log -GT "{rev}:{node|short}: {desc}\n {files}\n" | |
|
266 | o 10:71e6a9c7a6a2: rev_d_1_ | |
|
267 | | dir_y/f1 dir_z/f1 dir_z/f4 | |
|
268 | o 9:b0a0cbe5ce57: rev_d_0_ | |
|
269 | |\ dir_x/f1 dir_z/f1 dir_z/f3 | |
|
270 | | o 8:d04e01dcc82d: rev_c_2_ | |
|
271 | | | dir_y/f1 dir_y/f3 dir_z/f2 dir_z/f4 | |
|
272 | o | 7:fc05b303b551: rev_b_3_ | |
|
273 | | | dir_x/f3 dir_z/f1 dir_z/f2 | |
|
274 | o | 6:17fd34adb43b: rev_b_2_ | |
|
275 | | | dir_x/f2 dir_z/f1 dir_z/f2 dir_z/f3 | |
|
276 | | o 5:fa05dbe8eed1: rev_c_1_ | |
|
277 | | | dir_z/f1 dir_z/f2 | |
|
278 | | o 4:59b4258b00dc: rev_c_0_ | |
|
279 | | | dir_y/f1 dir_y/f2 dir_z/f1 | |
|
280 | o | 3:328f8ced5276: rev_b_1_ | |
|
281 | | | dir_x/f1 | |
|
282 | o | 2:0ccce83dd29b: rev_b_0_ | |
|
283 | |/ dir_x/f1 | |
|
284 | o 1:63f468a0fdac: rev_a_ | |
|
285 | | dir_x/f1 dir_x/f2 dir_x/f3 dir_y/f1 dir_y/f2 dir_y/f3 | |
|
286 | o 0:4978c5c7386b: root | |
|
287 | readme.txt | |
|
288 | ||
|
289 | $ hg tracked --addinclude dir_z | |
|
290 | comparing with ssh://user@dummy/server | |
|
291 | searching for changes | |
|
292 | adding changesets | |
|
293 | adding manifests | |
|
294 | adding file changes | |
|
295 | added 0 changesets with 10 changes to 4 files | |
|
296 | $ sh ../linkrev-check.sh | |
|
297 | # expected linkrev for dir_z/f1 | |
|
298 | 0 4 | |
|
299 | 1 5 | |
|
300 | 2 9 | |
|
301 | 3 10 | |
|
302 | rev linkrev nodeid p1-nodeid p2-nodeid | |
|
303 | 0 4 360afd990eef 000000000000 000000000000 | |
|
304 | 1 5 7054ee088631 360afd990eef 000000000000 | |
|
305 | 2 9 6bb290463f21 7054ee088631 000000000000 | |
|
306 | 3 10 91fec784ff86 6bb290463f21 000000000000 | |
|
307 | # expected linkrev for dir_z/f2 | |
|
308 | 0 5 | |
|
309 | 1 7 | |
|
310 | rev linkrev nodeid p1-nodeid p2-nodeid | |
|
311 | 0 5 093bb0f8a0fb 000000000000 000000000000 | |
|
312 | 1 7 0f47e254cb19 093bb0f8a0fb 000000000000 | |
|
313 | # expected linkrev for dir_z/f3 | |
|
314 | 0 6 | |
|
315 | 1 9 | |
|
316 | rev linkrev nodeid p1-nodeid p2-nodeid | |
|
317 | 0 6 2ed2a3912a0b 000000000000 000000000000 | |
|
318 | 1 9 7c6d649320ae 2ed2a3912a0b 000000000000 | |
|
319 | # expected linkrev for dir_z/f4 | |
|
320 | 0 8 | |
|
321 | 1 10 | |
|
322 | rev linkrev nodeid p1-nodeid p2-nodeid | |
|
323 | 0 8 b004912a8510 000000000000 000000000000 | |
|
324 | 1 10 9f85b3b95e70 b004912a8510 000000000000 | |
|
325 | # verify the repository | |
|
326 | checking changesets | |
|
327 | checking manifests | |
|
328 | crosschecking files in changesets and manifests | |
|
329 | checking files | |
|
330 | checking dirstate | |
|
331 | checked 11 changesets with 26 changes to 10 files | |
|
332 | $ cd .. | |
|
333 | ||
|
334 | ||
|
335 | Having cloning all only branch b | |
|
336 | -------------------------------- | |
|
337 | ||
|
338 | $ hg clone --narrow ssh://user@dummy/server --rev `cat ./rev_b_3_` --include dir_x --include dir_y client_xy_rev_from_b_only --noupdate | |
|
339 | adding changesets | |
|
340 | adding manifests | |
|
341 | adding file changes | |
|
342 | added 6 changesets with 10 changes to 6 files | |
|
343 | new changesets 4978c5c7386b:fc05b303b551 | |
|
344 | $ cd client_xy_rev_from_b_only | |
|
345 | $ hg log -GT "{rev}:{node|short}: {desc}\n {files}\n" | |
|
346 | o 5:fc05b303b551: rev_b_3_ | |
|
347 | | dir_x/f3 dir_z/f1 dir_z/f2 | |
|
348 | o 4:17fd34adb43b: rev_b_2_ | |
|
349 | | dir_x/f2 dir_z/f1 dir_z/f2 dir_z/f3 | |
|
350 | o 3:328f8ced5276: rev_b_1_ | |
|
351 | | dir_x/f1 | |
|
352 | o 2:0ccce83dd29b: rev_b_0_ | |
|
353 | | dir_x/f1 | |
|
354 | o 1:63f468a0fdac: rev_a_ | |
|
355 | | dir_x/f1 dir_x/f2 dir_x/f3 dir_y/f1 dir_y/f2 dir_y/f3 | |
|
356 | o 0:4978c5c7386b: root | |
|
357 | readme.txt | |
|
358 | ||
|
359 | $ hg tracked --addinclude dir_z | |
|
360 | comparing with ssh://user@dummy/server | |
|
361 | searching for changes | |
|
362 | adding changesets | |
|
363 | adding manifests | |
|
364 | adding file changes | |
|
365 | added 0 changesets with 5 changes to 3 files | |
|
366 | $ sh ../linkrev-check.sh | |
|
367 | # expected linkrev for dir_z/f1 | |
|
368 | 0 4 | |
|
369 | 1 5 | |
|
370 | rev linkrev nodeid p1-nodeid p2-nodeid | |
|
371 | 0 4 360afd990eef 000000000000 000000000000 | |
|
372 | 1 5 7054ee088631 360afd990eef 000000000000 | |
|
373 | # expected linkrev for dir_z/f2 | |
|
374 | 0 4 | |
|
375 | 1 5 | |
|
376 | rev linkrev nodeid p1-nodeid p2-nodeid | |
|
377 | 0 4 093bb0f8a0fb 000000000000 000000000000 | |
|
378 | 1 5 0f47e254cb19 093bb0f8a0fb 000000000000 | |
|
379 | # expected linkrev for dir_z/f3 | |
|
380 | 0 4 | |
|
381 | rev linkrev nodeid p1-nodeid p2-nodeid | |
|
382 | 0 4 2ed2a3912a0b 000000000000 000000000000 | |
|
383 | # verify the repository | |
|
384 | checking changesets | |
|
385 | checking manifests | |
|
386 | crosschecking files in changesets and manifests | |
|
387 | checking files | |
|
388 | checking dirstate | |
|
389 | checked 6 changesets with 15 changes to 9 files | |
|
390 | $ cd .. | |
|
391 | ||
|
392 | ||
|
393 | Having cloning all only branch c | |
|
394 | -------------------------------- | |
|
395 | ||
|
396 | $ hg clone --narrow ssh://user@dummy/server --rev `cat ./rev_c_2_` --include dir_x --include dir_y client_xy_rev_from_c_only --noupdate | |
|
397 | adding changesets | |
|
398 | adding manifests | |
|
399 | adding file changes | |
|
400 | added 5 changesets with 10 changes to 6 files | |
|
401 | new changesets 4978c5c7386b:d04e01dcc82d | |
|
402 | $ cd client_xy_rev_from_c_only | |
|
403 | $ hg log -GT "{rev}:{node|short}: {desc}\n {files}\n" | |
|
404 | o 4:d04e01dcc82d: rev_c_2_ | |
|
405 | | dir_y/f1 dir_y/f3 dir_z/f2 dir_z/f4 | |
|
406 | o 3:fa05dbe8eed1: rev_c_1_ | |
|
407 | | dir_z/f1 dir_z/f2 | |
|
408 | o 2:59b4258b00dc: rev_c_0_ | |
|
409 | | dir_y/f1 dir_y/f2 dir_z/f1 | |
|
410 | o 1:63f468a0fdac: rev_a_ | |
|
411 | | dir_x/f1 dir_x/f2 dir_x/f3 dir_y/f1 dir_y/f2 dir_y/f3 | |
|
412 | o 0:4978c5c7386b: root | |
|
413 | readme.txt | |
|
414 | ||
|
415 | $ hg tracked --addinclude dir_z | |
|
416 | comparing with ssh://user@dummy/server | |
|
417 | searching for changes | |
|
418 | adding changesets | |
|
419 | adding manifests | |
|
420 | adding file changes | |
|
421 | added 0 changesets with 5 changes to 3 files | |
|
422 | $ sh ../linkrev-check.sh | |
|
423 | # expected linkrev for dir_z/f1 | |
|
424 | 0 2 | |
|
425 | 1 3 | |
|
426 | rev linkrev nodeid p1-nodeid p2-nodeid | |
|
427 | 0 2 360afd990eef 000000000000 000000000000 | |
|
428 | 1 3 7054ee088631 360afd990eef 000000000000 | |
|
429 | # expected linkrev for dir_z/f2 | |
|
430 | 0 3 | |
|
431 | 1 4 | |
|
432 | rev linkrev nodeid p1-nodeid p2-nodeid | |
|
433 | 0 3 093bb0f8a0fb 000000000000 000000000000 | |
|
434 | 1 4 0f47e254cb19 093bb0f8a0fb 000000000000 | |
|
435 | # expected linkrev for dir_z/f4 | |
|
436 | 0 4 | |
|
437 | rev linkrev nodeid p1-nodeid p2-nodeid | |
|
438 | 0 4 b004912a8510 000000000000 000000000000 | |
|
439 | # verify the repository | |
|
440 | checking changesets | |
|
441 | checking manifests | |
|
442 | crosschecking files in changesets and manifests | |
|
443 | checking files | |
|
444 | checking dirstate | |
|
445 | checked 5 changesets with 15 changes to 9 files | |
|
446 | $ cd .. | |
|
447 | ||
|
448 | Having cloning all first branch b | |
|
449 | --------------------------------- | |
|
450 | ||
|
451 | $ hg clone --narrow ssh://user@dummy/server --rev `cat ./rev_b_3_` --include dir_x --include dir_y client_xy_rev_from_b_first --noupdate | |
|
452 | adding changesets | |
|
453 | adding manifests | |
|
454 | adding file changes | |
|
455 | added 6 changesets with 10 changes to 6 files | |
|
456 | new changesets 4978c5c7386b:fc05b303b551 | |
|
457 | $ cd client_xy_rev_from_b_first | |
|
458 | $ hg pull | |
|
459 | pulling from ssh://user@dummy/server | |
|
460 | searching for changes | |
|
461 | adding changesets | |
|
462 | adding manifests | |
|
463 | adding file changes | |
|
464 | added 5 changesets with 6 changes to 4 files | |
|
465 | new changesets 59b4258b00dc:71e6a9c7a6a2 | |
|
466 | (run 'hg update' to get a working copy) | |
|
467 | $ hg log -GT "{rev}:{node|short}: {desc}\n {files}\n" | |
|
468 | o 10:71e6a9c7a6a2: rev_d_1_ | |
|
469 | | dir_y/f1 dir_z/f1 dir_z/f4 | |
|
470 | o 9:b0a0cbe5ce57: rev_d_0_ | |
|
471 | |\ dir_x/f1 dir_z/f1 dir_z/f3 | |
|
472 | | o 8:d04e01dcc82d: rev_c_2_ | |
|
473 | | | dir_y/f1 dir_y/f3 dir_z/f2 dir_z/f4 | |
|
474 | | o 7:fa05dbe8eed1: rev_c_1_ | |
|
475 | | | dir_z/f1 dir_z/f2 | |
|
476 | | o 6:59b4258b00dc: rev_c_0_ | |
|
477 | | | dir_y/f1 dir_y/f2 dir_z/f1 | |
|
478 | o | 5:fc05b303b551: rev_b_3_ | |
|
479 | | | dir_x/f3 dir_z/f1 dir_z/f2 | |
|
480 | o | 4:17fd34adb43b: rev_b_2_ | |
|
481 | | | dir_x/f2 dir_z/f1 dir_z/f2 dir_z/f3 | |
|
482 | o | 3:328f8ced5276: rev_b_1_ | |
|
483 | | | dir_x/f1 | |
|
484 | o | 2:0ccce83dd29b: rev_b_0_ | |
|
485 | |/ dir_x/f1 | |
|
486 | o 1:63f468a0fdac: rev_a_ | |
|
487 | | dir_x/f1 dir_x/f2 dir_x/f3 dir_y/f1 dir_y/f2 dir_y/f3 | |
|
488 | o 0:4978c5c7386b: root | |
|
489 | readme.txt | |
|
490 | ||
|
491 | $ hg tracked --addinclude dir_z | |
|
492 | comparing with ssh://user@dummy/server | |
|
493 | searching for changes | |
|
494 | adding changesets | |
|
495 | adding manifests | |
|
496 | adding file changes | |
|
497 | added 0 changesets with 10 changes to 4 files | |
|
498 | $ sh ../linkrev-check.sh | |
|
499 | # expected linkrev for dir_z/f1 | |
|
500 | 0 4 | |
|
501 | 1 5 | |
|
502 | 2 9 | |
|
503 | 3 10 | |
|
504 | rev linkrev nodeid p1-nodeid p2-nodeid | |
|
505 | 0 6 360afd990eef 000000000000 000000000000 (known-bad-output !) | |
|
506 | 0 4 360afd990eef 000000000000 000000000000 (missing-correct-output !) | |
|
507 | 1 7 7054ee088631 360afd990eef 000000000000 (known-bad-output !) | |
|
508 | 1 5 7054ee088631 360afd990eef 000000000000 (missing-correct-output !) | |
|
509 | 2 9 6bb290463f21 7054ee088631 000000000000 | |
|
510 | 3 10 91fec784ff86 6bb290463f21 000000000000 | |
|
511 | # expected linkrev for dir_z/f2 | |
|
512 | 0 4 | |
|
513 | 1 5 | |
|
514 | rev linkrev nodeid p1-nodeid p2-nodeid | |
|
515 | 0 7 093bb0f8a0fb 000000000000 000000000000 (known-bad-output !) | |
|
516 | 0 4 093bb0f8a0fb 000000000000 000000000000 (missing-correct-output !) | |
|
517 | 1 5 0f47e254cb19 093bb0f8a0fb 000000000000 | |
|
518 | # expected linkrev for dir_z/f3 | |
|
519 | 0 4 | |
|
520 | 1 9 | |
|
521 | rev linkrev nodeid p1-nodeid p2-nodeid | |
|
522 | 0 4 2ed2a3912a0b 000000000000 000000000000 | |
|
523 | 1 9 7c6d649320ae 2ed2a3912a0b 000000000000 | |
|
524 | # expected linkrev for dir_z/f4 | |
|
525 | 0 8 | |
|
526 | 1 10 | |
|
527 | rev linkrev nodeid p1-nodeid p2-nodeid | |
|
528 | 0 8 b004912a8510 000000000000 000000000000 | |
|
529 | 1 10 9f85b3b95e70 b004912a8510 000000000000 | |
|
530 | # verify the repository | |
|
531 | checking changesets | |
|
532 | checking manifests | |
|
533 | crosschecking files in changesets and manifests | |
|
534 | checking files | |
|
535 | checking dirstate | |
|
536 | checked 11 changesets with 26 changes to 10 files | |
|
537 | $ cd .. | |
|
538 | ||
|
539 | ||
|
540 | Having cloning all first branch c | |
|
541 | --------------------------------- | |
|
542 | ||
|
543 | $ hg clone --narrow ssh://user@dummy/server --rev `cat ./rev_c_2_` --include dir_x --include dir_y client_xy_rev_from_c_first --noupdate | |
|
544 | adding changesets | |
|
545 | adding manifests | |
|
546 | adding file changes | |
|
547 | added 5 changesets with 10 changes to 6 files | |
|
548 | new changesets 4978c5c7386b:d04e01dcc82d | |
|
549 | $ cd client_xy_rev_from_c_first | |
|
550 | $ hg pull | |
|
551 | pulling from ssh://user@dummy/server | |
|
552 | searching for changes | |
|
553 | adding changesets | |
|
554 | adding manifests | |
|
555 | adding file changes | |
|
556 | added 6 changesets with 6 changes to 4 files | |
|
557 | new changesets 0ccce83dd29b:71e6a9c7a6a2 | |
|
558 | (run 'hg update' to get a working copy) | |
|
559 | $ hg log -GT "{rev}:{node|short}: {desc}\n {files}\n" | |
|
560 | o 10:71e6a9c7a6a2: rev_d_1_ | |
|
561 | | dir_y/f1 dir_z/f1 dir_z/f4 | |
|
562 | o 9:b0a0cbe5ce57: rev_d_0_ | |
|
563 | |\ dir_x/f1 dir_z/f1 dir_z/f3 | |
|
564 | | o 8:fc05b303b551: rev_b_3_ | |
|
565 | | | dir_x/f3 dir_z/f1 dir_z/f2 | |
|
566 | | o 7:17fd34adb43b: rev_b_2_ | |
|
567 | | | dir_x/f2 dir_z/f1 dir_z/f2 dir_z/f3 | |
|
568 | | o 6:328f8ced5276: rev_b_1_ | |
|
569 | | | dir_x/f1 | |
|
570 | | o 5:0ccce83dd29b: rev_b_0_ | |
|
571 | | | dir_x/f1 | |
|
572 | o | 4:d04e01dcc82d: rev_c_2_ | |
|
573 | | | dir_y/f1 dir_y/f3 dir_z/f2 dir_z/f4 | |
|
574 | o | 3:fa05dbe8eed1: rev_c_1_ | |
|
575 | | | dir_z/f1 dir_z/f2 | |
|
576 | o | 2:59b4258b00dc: rev_c_0_ | |
|
577 | |/ dir_y/f1 dir_y/f2 dir_z/f1 | |
|
578 | o 1:63f468a0fdac: rev_a_ | |
|
579 | | dir_x/f1 dir_x/f2 dir_x/f3 dir_y/f1 dir_y/f2 dir_y/f3 | |
|
580 | o 0:4978c5c7386b: root | |
|
581 | readme.txt | |
|
582 | ||
|
583 | $ hg tracked --addinclude dir_z | |
|
584 | comparing with ssh://user@dummy/server | |
|
585 | searching for changes | |
|
586 | adding changesets | |
|
587 | adding manifests | |
|
588 | adding file changes | |
|
589 | added 0 changesets with 10 changes to 4 files | |
|
590 | $ sh ../linkrev-check.sh | |
|
591 | # expected linkrev for dir_z/f1 | |
|
592 | 0 2 | |
|
593 | 1 3 | |
|
594 | 2 9 | |
|
595 | 3 10 | |
|
596 | rev linkrev nodeid p1-nodeid p2-nodeid | |
|
597 | 0 2 360afd990eef 000000000000 000000000000 | |
|
598 | 1 3 7054ee088631 360afd990eef 000000000000 | |
|
599 | 2 9 6bb290463f21 7054ee088631 000000000000 | |
|
600 | 3 10 91fec784ff86 6bb290463f21 000000000000 | |
|
601 | # expected linkrev for dir_z/f2 | |
|
602 | 0 3 | |
|
603 | 1 4 | |
|
604 | rev linkrev nodeid p1-nodeid p2-nodeid | |
|
605 | 0 3 093bb0f8a0fb 000000000000 000000000000 | |
|
606 | 1 8 0f47e254cb19 093bb0f8a0fb 000000000000 (known-bad-output !) | |
|
607 | 1 4 0f47e254cb19 093bb0f8a0fb 000000000000 (missing-correct-output !) | |
|
608 | # expected linkrev for dir_z/f3 | |
|
609 | 0 7 | |
|
610 | 1 9 | |
|
611 | rev linkrev nodeid p1-nodeid p2-nodeid | |
|
612 | 0 7 2ed2a3912a0b 000000000000 000000000000 | |
|
613 | 1 9 7c6d649320ae 2ed2a3912a0b 000000000000 | |
|
614 | # expected linkrev for dir_z/f4 | |
|
615 | 0 4 | |
|
616 | 1 10 | |
|
617 | rev linkrev nodeid p1-nodeid p2-nodeid | |
|
618 | 0 4 b004912a8510 000000000000 000000000000 | |
|
619 | 1 10 9f85b3b95e70 b004912a8510 000000000000 | |
|
620 | # verify the repository | |
|
621 | checking changesets | |
|
622 | checking manifests | |
|
623 | crosschecking files in changesets and manifests | |
|
624 | checking files | |
|
625 | checking dirstate | |
|
626 | checked 11 changesets with 26 changes to 10 files | |
|
627 | $ cd .. |
General Comments 0
You need to be logged in to leave comments.
Login now