Show More
@@ -284,6 +284,28 b' class removecldeltachain(formatvariant):' | |||
|
284 | 284 | def fromconfig(repo): |
|
285 | 285 | return True |
|
286 | 286 | |
|
287 | @registerformatvariant | |
|
288 | class compressionengine(formatvariant): | |
|
289 | name = 'compression' | |
|
290 | default = 'zlib' | |
|
291 | ||
|
292 | description = _('Compresion algorithm used to compress data. ' | |
|
293 | 'Some engine are faster than other') | |
|
294 | ||
|
295 | upgrademessage = _('revlog content will be recompressed with the new ' | |
|
296 | 'algorithm.') | |
|
297 | ||
|
298 | @classmethod | |
|
299 | def fromrepo(cls, repo): | |
|
300 | for req in repo.requirements: | |
|
301 | if req.startswith('exp-compression-'): | |
|
302 | return req.split('-', 2)[2] | |
|
303 | return 'zlib' | |
|
304 | ||
|
305 | @classmethod | |
|
306 | def fromconfig(cls, repo): | |
|
307 | return repo.ui.config('experimental', 'format.compression') | |
|
308 | ||
|
287 | 309 | def finddeficiencies(repo): |
|
288 | 310 | """returns a list of deficiencies that the repo suffer from""" |
|
289 | 311 | deficiencies = [] |
@@ -60,24 +60,28 b' An upgrade of a repository created with ' | |||
|
60 | 60 | dotencode: yes |
|
61 | 61 | generaldelta: yes |
|
62 | 62 | plain-cl-delta: yes |
|
63 | compression: zlib | |
|
63 | 64 | $ hg debugformat --verbose |
|
64 | 65 | format-variant repo config default |
|
65 | 66 | fncache: yes yes yes |
|
66 | 67 | dotencode: yes yes yes |
|
67 | 68 | generaldelta: yes yes yes |
|
68 | 69 | plain-cl-delta: yes yes yes |
|
70 | compression: zlib zlib zlib | |
|
69 | 71 | $ hg debugformat --verbose --config format.usegfncache=no |
|
70 | 72 | format-variant repo config default |
|
71 | 73 | fncache: yes yes yes |
|
72 | 74 | dotencode: yes yes yes |
|
73 | 75 | generaldelta: yes yes yes |
|
74 | 76 | plain-cl-delta: yes yes yes |
|
77 | compression: zlib zlib zlib | |
|
75 | 78 | $ hg debugformat --verbose --config format.usegfncache=no --color=debug |
|
76 | 79 | format-variant repo config default |
|
77 | 80 | [formatvariant.name.uptodate|fncache: ][formatvariant.repo.uptodate| yes][formatvariant.config.default| yes][formatvariant.default| yes] |
|
78 | 81 | [formatvariant.name.uptodate|dotencode: ][formatvariant.repo.uptodate| yes][formatvariant.config.default| yes][formatvariant.default| yes] |
|
79 | 82 | [formatvariant.name.uptodate|generaldelta: ][formatvariant.repo.uptodate| yes][formatvariant.config.default| yes][formatvariant.default| yes] |
|
80 | 83 | [formatvariant.name.uptodate|plain-cl-delta:][formatvariant.repo.uptodate| yes][formatvariant.config.default| yes][formatvariant.default| yes] |
|
84 | [formatvariant.name.uptodate|compression: ][formatvariant.repo.uptodate| zlib][formatvariant.config.default| zlib][formatvariant.default| zlib] | |
|
81 | 85 | $ hg debugupgraderepo |
|
82 | 86 | (no feature deficiencies found in existing repository) |
|
83 | 87 | performing an upgrade with "--run" will make the following changes: |
@@ -131,24 +135,28 b' Various sub-optimal detections work' | |||
|
131 | 135 | dotencode: no |
|
132 | 136 | generaldelta: no |
|
133 | 137 | plain-cl-delta: yes |
|
138 | compression: zlib | |
|
134 | 139 | $ hg debugformat --verbose |
|
135 | 140 | format-variant repo config default |
|
136 | 141 | fncache: no yes yes |
|
137 | 142 | dotencode: no yes yes |
|
138 | 143 | generaldelta: no yes yes |
|
139 | 144 | plain-cl-delta: yes yes yes |
|
145 | compression: zlib zlib zlib | |
|
140 | 146 | $ hg debugformat --verbose --config format.usegeneraldelta=no |
|
141 | 147 | format-variant repo config default |
|
142 | 148 | fncache: no yes yes |
|
143 | 149 | dotencode: no yes yes |
|
144 | 150 | generaldelta: no no yes |
|
145 | 151 | plain-cl-delta: yes yes yes |
|
152 | compression: zlib zlib zlib | |
|
146 | 153 | $ hg debugformat --verbose --config format.usegeneraldelta=no --color=debug |
|
147 | 154 | format-variant repo config default |
|
148 | 155 | [formatvariant.name.mismatchconfig|fncache: ][formatvariant.repo.mismatchconfig| no][formatvariant.config.default| yes][formatvariant.default| yes] |
|
149 | 156 | [formatvariant.name.mismatchconfig|dotencode: ][formatvariant.repo.mismatchconfig| no][formatvariant.config.default| yes][formatvariant.default| yes] |
|
150 | 157 | [formatvariant.name.mismatchdefault|generaldelta: ][formatvariant.repo.mismatchdefault| no][formatvariant.config.special| no][formatvariant.default| yes] |
|
151 | 158 | [formatvariant.name.uptodate|plain-cl-delta:][formatvariant.repo.uptodate| yes][formatvariant.config.default| yes][formatvariant.default| yes] |
|
159 | [formatvariant.name.uptodate|compression: ][formatvariant.repo.uptodate| zlib][formatvariant.config.default| zlib][formatvariant.default| zlib] | |
|
152 | 160 | $ hg debugupgraderepo |
|
153 | 161 | repository lacks features recommended by current config options: |
|
154 | 162 |
General Comments 0
You need to be logged in to leave comments.
Login now