D5311: sparse-revlog: disable sparse-revlog if config disable general-delta

lothiraldan (Boris Feld) phabricator at mercurial-scm.org
Mon Dec 10 15:31:46 UTC 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rHGa714eee1ac28: sparse-revlog: disable sparse-revlog if config disable general-delta (authored by lothiraldan, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D5311?vs=12620&id=12771

REVISION DETAIL
  https://phab.mercurial-scm.org/D5311

AFFECTED FILES
  mercurial/localrepo.py
  mercurial/scmutil.py

CHANGE DETAILS

diff --git a/mercurial/scmutil.py b/mercurial/scmutil.py
--- a/mercurial/scmutil.py
+++ b/mercurial/scmutil.py
@@ -1450,8 +1450,7 @@
     """
     # experimental config: format.generaldelta
     return (ui.configbool('format', 'generaldelta')
-            or ui.configbool('format', 'usegeneraldelta')
-            or ui.configbool('format', 'sparse-revlog'))
+            or ui.configbool('format', 'usegeneraldelta'))
 
 def gddeltaconfig(ui):
     """helper function to know if incoming delta should be optimised
diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py
--- a/mercurial/localrepo.py
+++ b/mercurial/localrepo.py
@@ -2906,11 +2906,11 @@
 
     if scmutil.gdinitconfig(ui):
         requirements.add('generaldelta')
+        # experimental config: format.sparse-revlog
+        if ui.configbool('format', 'sparse-revlog'):
+            requirements.add(SPARSEREVLOG_REQUIREMENT)
     if ui.configbool('experimental', 'treemanifest'):
         requirements.add('treemanifest')
-    # experimental config: format.sparse-revlog
-    if ui.configbool('format', 'sparse-revlog'):
-        requirements.add(SPARSEREVLOG_REQUIREMENT)
 
     revlogv2 = ui.config('experimental', 'revlogv2')
     if revlogv2 == 'enable-unstable-format-and-corrupt-my-data':



To: lothiraldan, #hg-reviewers
Cc: mercurial-devel


More information about the Mercurial-devel mailing list