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

login
register
mail settings
Submitter phabricator
Date Dec. 10, 2018, 3:31 p.m.
Message ID <393bd0e8d19c1e4438ee785a23ca2e6c@localhost.localdomain>
Download mbox | patch
Permalink /patch/37055/
State Not Applicable
Headers show

Comments

phabricator - Dec. 10, 2018, 3:31 p.m.
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




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

Patch

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':