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