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