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