Show More
@@ -1,96 +1,101 | |||||
1 | Create repo with old manifest |
|
1 | Create repo with old manifest | |
2 |
|
2 | |||
|
3 | $ cat << EOF >> $HGRCPATH | |||
|
4 | > [format] | |||
|
5 | > usegeneraldelta=yes | |||
|
6 | > EOF | |||
|
7 | ||||
3 | $ hg init existing |
|
8 | $ hg init existing | |
4 | $ cd existing |
|
9 | $ cd existing | |
5 | $ echo footext > foo |
|
10 | $ echo footext > foo | |
6 | $ hg add foo |
|
11 | $ hg add foo | |
7 | $ hg commit -m initial |
|
12 | $ hg commit -m initial | |
8 |
|
13 | |||
9 | We're using v1, so no manifestv2 entry is in requires yet. |
|
14 | We're using v1, so no manifestv2 entry is in requires yet. | |
10 |
|
15 | |||
11 | $ grep manifestv2 .hg/requires |
|
16 | $ grep manifestv2 .hg/requires | |
12 | [1] |
|
17 | [1] | |
13 |
|
18 | |||
14 | Let's clone this with manifestv2 enabled to switch to the new format for |
|
19 | Let's clone this with manifestv2 enabled to switch to the new format for | |
15 | future commits. |
|
20 | future commits. | |
16 |
|
21 | |||
17 | $ cd .. |
|
22 | $ cd .. | |
18 | $ hg clone --pull existing new --config experimental.manifestv2=1 |
|
23 | $ hg clone --pull existing new --config experimental.manifestv2=1 | |
19 | requesting all changes |
|
24 | requesting all changes | |
20 | adding changesets |
|
25 | adding changesets | |
21 | adding manifests |
|
26 | adding manifests | |
22 | adding file changes |
|
27 | adding file changes | |
23 | added 1 changesets with 1 changes to 1 files |
|
28 | added 1 changesets with 1 changes to 1 files | |
24 | updating to branch default |
|
29 | updating to branch default | |
25 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
30 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
26 | $ cd new |
|
31 | $ cd new | |
27 |
|
32 | |||
28 | Check that entry was added to .hg/requires. |
|
33 | Check that entry was added to .hg/requires. | |
29 |
|
34 | |||
30 | $ grep manifestv2 .hg/requires |
|
35 | $ grep manifestv2 .hg/requires | |
31 | manifestv2 |
|
36 | manifestv2 | |
32 |
|
37 | |||
33 | Make a new commit. |
|
38 | Make a new commit. | |
34 |
|
39 | |||
35 | $ echo newfootext > foo |
|
40 | $ echo newfootext > foo | |
36 | $ hg commit -m new |
|
41 | $ hg commit -m new | |
37 |
|
42 | |||
38 | Check that the manifest actually switched to v2. |
|
43 | Check that the manifest actually switched to v2. | |
39 |
|
44 | |||
40 | $ hg debugdata -m 0 |
|
45 | $ hg debugdata -m 0 | |
41 | foo\x0021e958b1dca695a60ee2e9cf151753204ee0f9e9 (esc) |
|
46 | foo\x0021e958b1dca695a60ee2e9cf151753204ee0f9e9 (esc) | |
42 |
|
47 | |||
43 | $ hg debugdata -m 1 |
|
48 | $ hg debugdata -m 1 | |
44 | \x00 (esc) |
|
49 | \x00 (esc) | |
45 | \x00foo\x00 (esc) |
|
50 | \x00foo\x00 (esc) | |
46 | I\xab\x7f\xb8(\x83\xcas\x15\x9d\xc2\xd3\xd3:5\x08\xbad5_ (esc) |
|
51 | I\xab\x7f\xb8(\x83\xcas\x15\x9d\xc2\xd3\xd3:5\x08\xbad5_ (esc) | |
47 |
|
52 | |||
48 | Check that manifestv2 is used if the requirement is present, even if it's |
|
53 | Check that manifestv2 is used if the requirement is present, even if it's | |
49 | disabled in the config. |
|
54 | disabled in the config. | |
50 |
|
55 | |||
51 | $ echo newerfootext > foo |
|
56 | $ echo newerfootext > foo | |
52 | $ hg --config experimental.manifestv2=False commit -m newer |
|
57 | $ hg --config experimental.manifestv2=False commit -m newer | |
53 |
|
58 | |||
54 | $ hg debugdata -m 2 |
|
59 | $ hg debugdata -m 2 | |
55 | \x00 (esc) |
|
60 | \x00 (esc) | |
56 | \x00foo\x00 (esc) |
|
61 | \x00foo\x00 (esc) | |
57 | \xa6\xb1\xfb\xef]\x91\xa1\x19`\xf3.#\x90S\xf8\x06 \xe2\x19\x00 (esc) |
|
62 | \xa6\xb1\xfb\xef]\x91\xa1\x19`\xf3.#\x90S\xf8\x06 \xe2\x19\x00 (esc) | |
58 |
|
63 | |||
59 | Check that we can still read v1 manifests. |
|
64 | Check that we can still read v1 manifests. | |
60 |
|
65 | |||
61 | $ hg files -r 0 |
|
66 | $ hg files -r 0 | |
62 | foo |
|
67 | foo | |
63 |
|
68 | |||
64 | $ cd .. |
|
69 | $ cd .. | |
65 |
|
70 | |||
66 | Check that entry is added to .hg/requires on repo creation |
|
71 | Check that entry is added to .hg/requires on repo creation | |
67 |
|
72 | |||
68 | $ hg --config experimental.manifestv2=True init repo |
|
73 | $ hg --config experimental.manifestv2=True init repo | |
69 | $ cd repo |
|
74 | $ cd repo | |
70 | $ grep manifestv2 .hg/requires |
|
75 | $ grep manifestv2 .hg/requires | |
71 | manifestv2 |
|
76 | manifestv2 | |
72 |
|
77 | |||
73 | Set up simple repo |
|
78 | Set up simple repo | |
74 |
|
79 | |||
75 | $ echo a > file1 |
|
80 | $ echo a > file1 | |
76 | $ echo b > file2 |
|
81 | $ echo b > file2 | |
77 | $ echo c > file3 |
|
82 | $ echo c > file3 | |
78 | $ hg ci -Aqm 'initial' |
|
83 | $ hg ci -Aqm 'initial' | |
79 | $ echo d > file2 |
|
84 | $ echo d > file2 | |
80 | $ hg ci -m 'modify file2' |
|
85 | $ hg ci -m 'modify file2' | |
81 |
|
86 | |||
82 | Check that 'hg verify', which uses manifest.readdelta(), works |
|
87 | Check that 'hg verify', which uses manifest.readdelta(), works | |
83 |
|
88 | |||
84 | $ hg verify |
|
89 | $ hg verify | |
85 | checking changesets |
|
90 | checking changesets | |
86 | checking manifests |
|
91 | checking manifests | |
87 | crosschecking files in changesets and manifests |
|
92 | crosschecking files in changesets and manifests | |
88 | checking files |
|
93 | checking files | |
89 | 3 files, 2 changesets, 4 total revisions |
|
94 | 3 files, 2 changesets, 4 total revisions | |
90 |
|
95 | |||
91 | Check that manifest revlog is smaller than for v1 |
|
96 | Check that manifest revlog is smaller than for v1 | |
92 |
|
97 | |||
93 | $ hg debugindex -m |
|
98 | $ hg debugindex -m | |
94 |
rev offset length |
|
99 | rev offset length delta linkrev nodeid p1 p2 | |
95 |
0 0 81 |
|
100 | 0 0 81 -1 0 57361477c778 000000000000 000000000000 | |
96 | 1 81 33 0 1 aeaab5a2ef74 57361477c778 000000000000 |
|
101 | 1 81 33 0 1 aeaab5a2ef74 57361477c778 000000000000 |
General Comments 0
You need to be logged in to leave comments.
Login now