diff mercurial/localrepo.py @ 45355:a1f51c7dce0f

repository: introduce constant for sparse repo requirement and use it In future we will like to much cleaner logic around which requirement is for working copy and which can go in store. To start with that, we first need to de-clutter the requirement values spread around and replace them with constants. Differential Revision: https://phab.mercurial-scm.org/D8911
author Pulkit Goyal <7895pulkit@gmail.com>
date Sat, 08 Aug 2020 10:06:32 -0700
parents c4fe2262435e
children f025b97f3758
line wrap: on
line diff
--- a/mercurial/localrepo.py	Fri Aug 07 16:02:13 2020 +0530
+++ b/mercurial/localrepo.py	Sat Aug 08 10:06:32 2020 -0700
@@ -816,7 +816,7 @@
 
     ``error.RepoError`` should be raised on failure.
     """
-    if b'exp-sparse' in requirements and not sparse.enabled:
+    if repository.SPARSE_REQUIREMENT in requirements and not sparse.enabled:
         raise error.RepoError(
             _(
                 b'repository is using sparse feature but '
@@ -1067,7 +1067,7 @@
         b'shared',
         b'relshared',
         b'dotencode',
-        b'exp-sparse',
+        repository.SPARSE_REQUIREMENT,
         b'internal-phase',
     }