##// END OF EJS Templates
revlog: support none compression...
Joerg Sonnenberger -
r46737:84130fd7 default
parent child Browse files
Show More
@@ -617,8 +617,10 b' class _noopengine(compressionengine):'
617 617 def wireprotosupport(self):
618 618 return compewireprotosupport(b'none', 0, 10)
619 619
620 # We don't implement revlogheader because it is handled specially
621 # in the revlog class.
620 # revlog special cases the uncompressed case, but implementing
621 # revlogheader allows forcing uncompressed storage.
622 def revlogheader(self):
623 return b'\0'
622 624
623 625 def compressstream(self, it, opts=None):
624 626 return it
@@ -43,6 +43,27 b' A requirement specifying an unknown comp'
43 43
44 44 $ cd ..
45 45
46 Specifying a new format.compression on an existing repo won't introduce data
47 with that engine or a requirement
48
49 $ cd default
50 $ touch bar
51 $ hg --config format.revlog-compression=none -q commit -A -m 'add bar with a lot of repeated repeated repeated text'
52
53 $ cat .hg/requires
54 dotencode
55 fncache
56 generaldelta
57 revlogv1
58 sparserevlog
59 store
60 testonly-simplestore (reposimplestore !)
61
62 $ hg debugrevlog -c | grep 0x78
63 0x78 (x) : 2 (100.00%)
64 0x78 (x) : 199 (100.00%)
65 $ cd ..
66
46 67 #if zstd
47 68
48 69 $ hg --config format.revlog-compression=zstd init zstd
@@ -66,25 +87,6 b' A requirement specifying an unknown comp'
66 87
67 88 $ cd ..
68 89
69 Specifying a new format.compression on an existing repo won't introduce data
70 with that engine or a requirement
71
72 $ cd default
73 $ touch bar
74 $ hg --config format.revlog-compression=zstd -q commit -A -m 'add bar with a lot of repeated repeated repeated text'
75
76 $ cat .hg/requires
77 dotencode
78 fncache
79 generaldelta
80 revlogv1
81 sparserevlog
82 store
83 testonly-simplestore (reposimplestore !)
84
85 $ hg debugrevlog -c | grep 0x78
86 0x78 (x) : 2 (100.00%)
87 0x78 (x) : 199 (100.00%)
88 90
89 91 #endif
90 92
@@ -116,10 +118,12 b' checking zlib options'
116 118 > done
117 119
118 120 $ $RUNTESTDIR/f -s */.hg/store/data/*
119 default/.hg/store/data/foo.i: size=64 (pure !)
121 default/.hg/store/data/bar.i: size=64
122 default/.hg/store/data/foo.i: size=64
120 123 zlib-level-1/.hg/store/data/a.i: size=4146
121 124 zlib-level-9/.hg/store/data/a.i: size=4138
122 125 zlib-level-default/.hg/store/data/a.i: size=4138
126 zstd/.hg/store/data/foo.i: size=64 (zstd !)
123 127
124 128 Test error cases
125 129
@@ -144,6 +148,41 b' Test error cases'
144 148 abort: invalid value for `storage.revlog.zlib.level` config: 42
145 149 [255]
146 150
151 checking details of none compression
152 ====================================
153
154 $ hg init none-compression --config format.revlog-compression=none
155
156 $ commitone() {
157 > repo=$1
158 > cp $RUNTESTDIR/bundles/issue4438-r1.hg $repo/a
159 > hg -R $repo add $repo/a
160 > hg -R $repo commit -m some-commit
161 > }
162
163 $ commitone none-compression
164
165 $ hg log -R none-compression
166 changeset: 0:68b53da39cd8
167 tag: tip
168 user: test
169 date: Thu Jan 01 00:00:00 1970 +0000
170 summary: some-commit
171
172
173 $ cat none-compression/.hg/requires
174 dotencode
175 exp-compression-none
176 fncache
177 generaldelta
178 revlogv1
179 sparserevlog
180 store
181 testonly-simplestore (reposimplestore !)
182
183 $ $RUNTESTDIR/f -s none-compression/.hg/store/data/*
184 none-compression/.hg/store/data/a.i: size=4216
185
147 186 #if zstd
148 187
149 188 checking zstd options
General Comments 0
You need to be logged in to leave comments. Login now