Comments
Patch
@@ -174,6 +174,9 @@ configitem('experimental', 'lfs.serve',
configitem('experimental', 'lfs.user-agent',
default=None,
)
+configitem('experimental', 'lfs.disableusercache',
+ default=False,
+)
configitem('experimental', 'lfs.worker-enable',
default=False,
)
@@ -118,14 +118,12 @@ class local(object):
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):
@@ -33,8 +33,9 @@ side. If that *is* enabled, the subsequ
for flag '0x2000'!" if the extension is only loaded on one side (possibly also
masked by the Internal Server Error message).
$ cat >> $HGRCPATH <<EOF
+ > [experimental]
+ > lfs.disableusercache = True
> [lfs]
- > usercache = null://
> threshold=10
> [web]
> allow_push=*