Sparse-revlog requires general-delta in order to work. If general-delta is
explicitly disabled through configuration, we should honor that and also
disabled sparse-revlog.
This change will be more relevant when sparse-revlog is enabled by default.
hg-reviewers |
Sparse-revlog requires general-delta in order to work. If general-delta is
explicitly disabled through configuration, we should honor that and also
disabled sparse-revlog.
This change will be more relevant when sparse-revlog is enabled by default.
Automatic diff as part of commit; lint not applicable. |
Automatic diff as part of commit; unit tests not applicable. |
Path | Packages | |||
---|---|---|---|---|
M | mercurial/localrepo.py (6 lines) | |||
M | mercurial/scmutil.py (3 lines) |
Status | Author | Revision | |
---|---|---|---|
Closed | lothiraldan | ||
Closed | lothiraldan | ||
Closed | lothiraldan | ||
Closed | lothiraldan | ||
Closed | lothiraldan | ||
Closed | lothiraldan | ||
Closed | lothiraldan | ||
Closed | lothiraldan | ||
Closed | lothiraldan | ||
Closed | lothiraldan | ||
Closed | lothiraldan | ||
Closed | lothiraldan | ||
Closed | lothiraldan | ||
Closed | lothiraldan | ||
Closed | lothiraldan | ||
Closed | lothiraldan | ||
Closed | lothiraldan | ||
Closed | lothiraldan | ||
Closed | lothiraldan | ||
Closed | lothiraldan | ||
Closed | lothiraldan | ||
Closed | lothiraldan | ||
Closed | lothiraldan | ||
Closed | lothiraldan | ||
Closed | lothiraldan | ||
Closed | lothiraldan | ||
Closed | lothiraldan | ||
Closed | lothiraldan | ||
Closed | lothiraldan | ||
Closed | lothiraldan | ||
Closed | lothiraldan | ||
Closed | lothiraldan | ||
Closed | lothiraldan | ||
Closed | lothiraldan | ||
Closed | lothiraldan | ||
Closed | lothiraldan | ||
Closed | lothiraldan |
'compression engines')) | 'compression engines')) | ||||
# zlib is the historical default and doesn't need an explicit requirement. | # zlib is the historical default and doesn't need an explicit requirement. | ||||
if compengine != 'zlib': | if compengine != 'zlib': | ||||
requirements.add('exp-compression-%s' % compengine) | requirements.add('exp-compression-%s' % compengine) | ||||
if scmutil.gdinitconfig(ui): | if scmutil.gdinitconfig(ui): | ||||
requirements.add('generaldelta') | requirements.add('generaldelta') | ||||
if ui.configbool('experimental', 'treemanifest'): | |||||
requirements.add('treemanifest') | |||||
# experimental config: format.sparse-revlog | # experimental config: format.sparse-revlog | ||||
if ui.configbool('format', 'sparse-revlog'): | if ui.configbool('format', 'sparse-revlog'): | ||||
requirements.add(SPARSEREVLOG_REQUIREMENT) | requirements.add(SPARSEREVLOG_REQUIREMENT) | ||||
if ui.configbool('experimental', 'treemanifest'): | |||||
requirements.add('treemanifest') | |||||
revlogv2 = ui.config('experimental', 'revlogv2') | revlogv2 = ui.config('experimental', 'revlogv2') | ||||
if revlogv2 == 'enable-unstable-format-and-corrupt-my-data': | if revlogv2 == 'enable-unstable-format-and-corrupt-my-data': | ||||
requirements.remove('revlogv1') | requirements.remove('revlogv1') | ||||
# generaldelta is implied by revlogv2. | # generaldelta is implied by revlogv2. | ||||
requirements.discard('generaldelta') | requirements.discard('generaldelta') | ||||
requirements.add(REVLOGV2_REQUIREMENT) | requirements.add(REVLOGV2_REQUIREMENT) | ||||
# experimental config: format.internal-phase | # experimental config: format.internal-phase |
self.ui.progress(self.topic, self.pos, item, self.unit, | self.ui.progress(self.topic, self.pos, item, self.unit, | ||||
self.total) | self.total) | ||||
def gdinitconfig(ui): | def gdinitconfig(ui): | ||||
"""helper function to know if a repo should be created as general delta | """helper function to know if a repo should be created as general delta | ||||
""" | """ | ||||
# experimental config: format.generaldelta | # experimental config: format.generaldelta | ||||
return (ui.configbool('format', 'generaldelta') | return (ui.configbool('format', 'generaldelta') | ||||
or ui.configbool('format', 'usegeneraldelta') | or ui.configbool('format', 'usegeneraldelta')) | ||||
or ui.configbool('format', 'sparse-revlog')) | |||||
def gddeltaconfig(ui): | def gddeltaconfig(ui): | ||||
"""helper function to know if incoming delta should be optimised | """helper function to know if incoming delta should be optimised | ||||
""" | """ | ||||
# experimental config: format.generaldelta | # experimental config: format.generaldelta | ||||
return ui.configbool('format', 'generaldelta') | return ui.configbool('format', 'generaldelta') | ||||
class simplekeyvaluefile(object): | class simplekeyvaluefile(object): |