mercurial/localrepo.py
changeset 33556 22371eabb3b1
parent 33541 b47fef6d2365
child 33649 377e8ddaebef
child 33701 fda0867cfe03
--- a/mercurial/localrepo.py	Mon Jul 17 11:21:23 2017 -0700
+++ b/mercurial/localrepo.py	Mon Jul 17 11:45:38 2017 -0700
@@ -288,6 +288,7 @@
         'shared',
         'relshared',
         'dotencode',
+        'exp-sparse',
     }
     openerreqs = {
         'revlogv1',
@@ -419,6 +420,11 @@
             if inst.errno != errno.ENOENT:
                 raise
 
+        if 'exp-sparse' in self.requirements and not sparse.enabled:
+            raise error.RepoError(_('repository is using sparse feature but '
+                                    'sparse is not enabled; enable the '
+                                    '"sparse" extensions to access'))
+
         self.store = store.store(
                 self.requirements, self.sharedpath, vfsmod.vfs)
         self.spath = self.store.path