Comments
Patch
@@ -256,12 +256,11 @@ class localrepository(object):
self.vfs.append(
"00changelog.i",
'\0\0\0\2' # represents revlogv2
' dummy changelog to prevent using the old repo layout'
)
- # experimental config: format.generaldelta
- if self.ui.configbool('format', 'generaldelta', False):
+ if scmutil.gdconfig(self.ui):
self.requirements.add("generaldelta")
if self.ui.configbool('experimental', 'treemanifest', False):
self.requirements.add("treemanifest")
if self.ui.configbool('experimental', 'manifestv2', False):
self.requirements.add("manifestv2")
@@ -1168,5 +1168,13 @@ def wlocksub(repo, cmd, *args, **kwargs)
This can only be called while the wlock is held. This takes all the
arguments that ui.system does, and returns the exit code of the
subprocess."""
return _locksub(repo, repo.currentwlock(), 'HG_WLOCK_LOCKER', cmd, *args,
**kwargs)
+
+def gdconfig(ui):
+ """helper function to retrieve general delta setting
+
+ The need for such function is triggered by a soon to come third possible
+ value to the config option."""
+ # experimental config: format.generaldelta
+ return ui.configbool('format', 'generaldelta', False)