hgext/lfs/blobstore.py
changeset 37562 e5cd8d1a094d
parent 37518 092eff6833a7
child 37563 be1cc65bdb1c
--- a/hgext/lfs/blobstore.py	Wed Apr 04 17:37:35 2018 +0530
+++ b/hgext/lfs/blobstore.py	Wed Apr 11 17:29:55 2018 -0400
@@ -118,14 +118,12 @@
     def __init__(self, repo):
         fullpath = repo.svfs.join('lfs/objects')
         self.vfs = lfsvfs(fullpath)
-        usercache = util.url(lfutil._usercachedir(repo.ui, 'lfs'))
-        if usercache.scheme in (None, 'file'):
-            self.cachevfs = lfsvfs(usercache.localpath())
-        elif usercache.scheme == 'null':
+
+        if repo.ui.configbool('experimental', 'lfs.disableusercache'):
             self.cachevfs = nullvfs()
         else:
-            raise error.Abort(_('unknown lfs cache scheme: %s')
-                              % usercache.scheme)
+            usercache = lfutil._usercachedir(repo.ui, 'lfs')
+            self.cachevfs = lfsvfs(usercache)
         self.ui = repo.ui
 
     def open(self, oid):