##// END OF EJS Templates
test: enable sparse-revlog for test-revlog-v2.t...
Boris Feld -
r40942:27fa1d2b default
parent child Browse files
Show More
@@ -1,64 +1,71 b''
1 TRANSITIONAL CONFIG
2 $ cat << EOF >> $HGRCPATH
3 > [format]
4 > sparse-revlog = yes
5 > EOF
6
1 #require reporevlogstore
7 #require reporevlogstore
2
8
3 A repo with unknown revlogv2 requirement string cannot be opened
9 A repo with unknown revlogv2 requirement string cannot be opened
4
10
5 $ hg init invalidreq
11 $ hg init invalidreq
6 $ cd invalidreq
12 $ cd invalidreq
7 $ echo exp-revlogv2.unknown >> .hg/requires
13 $ echo exp-revlogv2.unknown >> .hg/requires
8 $ hg log
14 $ hg log
9 abort: repository requires features unknown to this Mercurial: exp-revlogv2.unknown!
15 abort: repository requires features unknown to this Mercurial: exp-revlogv2.unknown!
10 (see https://mercurial-scm.org/wiki/MissingRequirement for more information)
16 (see https://mercurial-scm.org/wiki/MissingRequirement for more information)
11 [255]
17 [255]
12 $ cd ..
18 $ cd ..
13
19
14 Can create and open repo with revlog v2 requirement
20 Can create and open repo with revlog v2 requirement
15
21
16 $ cat >> $HGRCPATH << EOF
22 $ cat >> $HGRCPATH << EOF
17 > [experimental]
23 > [experimental]
18 > revlogv2 = enable-unstable-format-and-corrupt-my-data
24 > revlogv2 = enable-unstable-format-and-corrupt-my-data
19 > EOF
25 > EOF
20
26
21 $ hg init empty-repo
27 $ hg init empty-repo
22 $ cd empty-repo
28 $ cd empty-repo
23 $ cat .hg/requires
29 $ cat .hg/requires
24 dotencode
30 dotencode
25 exp-revlogv2.0
31 exp-revlogv2.0
26 fncache
32 fncache
33 sparserevlog
27 store
34 store
28
35
29 $ hg log
36 $ hg log
30
37
31 Unknown flags to revlog are rejected
38 Unknown flags to revlog are rejected
32
39
33 >>> with open('.hg/store/00changelog.i', 'wb') as fh:
40 >>> with open('.hg/store/00changelog.i', 'wb') as fh:
34 ... fh.write(b'\x00\x04\xde\xad') and None
41 ... fh.write(b'\x00\x04\xde\xad') and None
35
42
36 $ hg log
43 $ hg log
37 abort: unknown flags (0x04) in version 57005 revlog 00changelog.i!
44 abort: unknown flags (0x04) in version 57005 revlog 00changelog.i!
38 [255]
45 [255]
39
46
40 $ cd ..
47 $ cd ..
41
48
42 Writing a simple revlog v2 works
49 Writing a simple revlog v2 works
43
50
44 $ hg init simple
51 $ hg init simple
45 $ cd simple
52 $ cd simple
46 $ touch foo
53 $ touch foo
47 $ hg -q commit -A -m initial
54 $ hg -q commit -A -m initial
48
55
49 $ hg log
56 $ hg log
50 changeset: 0:96ee1d7354c4
57 changeset: 0:96ee1d7354c4
51 tag: tip
58 tag: tip
52 user: test
59 user: test
53 date: Thu Jan 01 00:00:00 1970 +0000
60 date: Thu Jan 01 00:00:00 1970 +0000
54 summary: initial
61 summary: initial
55
62
56 Header written as expected (changelog always disables generaldelta)
63 Header written as expected (changelog always disables generaldelta)
57
64
58 $ f --hexdump --bytes 4 .hg/store/00changelog.i
65 $ f --hexdump --bytes 4 .hg/store/00changelog.i
59 .hg/store/00changelog.i:
66 .hg/store/00changelog.i:
60 0000: 00 01 de ad |....|
67 0000: 00 01 de ad |....|
61
68
62 $ f --hexdump --bytes 4 .hg/store/data/foo.i
69 $ f --hexdump --bytes 4 .hg/store/data/foo.i
63 .hg/store/data/foo.i:
70 .hg/store/data/foo.i:
64 0000: 00 03 de ad |....|
71 0000: 00 03 de ad |....|
General Comments 0
You need to be logged in to leave comments. Login now