##// END OF EJS Templates
lfs: special case the null:// usercache instead of treating it as a url...
Matt Harbison -
r37580:e5cd8d1a default
parent child Browse files
Show More
@@ -174,6 +174,9 b" configitem('experimental', 'lfs.serve',"
174 configitem('experimental', 'lfs.user-agent',
174 configitem('experimental', 'lfs.user-agent',
175 default=None,
175 default=None,
176 )
176 )
177 configitem('experimental', 'lfs.disableusercache',
178 default=False,
179 )
177 configitem('experimental', 'lfs.worker-enable',
180 configitem('experimental', 'lfs.worker-enable',
178 default=False,
181 default=False,
179 )
182 )
@@ -118,14 +118,12 b' class local(object):'
118 def __init__(self, repo):
118 def __init__(self, repo):
119 fullpath = repo.svfs.join('lfs/objects')
119 fullpath = repo.svfs.join('lfs/objects')
120 self.vfs = lfsvfs(fullpath)
120 self.vfs = lfsvfs(fullpath)
121 usercache = util.url(lfutil._usercachedir(repo.ui, 'lfs'))
121
122 if usercache.scheme in (None, 'file'):
122 if repo.ui.configbool('experimental', 'lfs.disableusercache'):
123 self.cachevfs = lfsvfs(usercache.localpath())
124 elif usercache.scheme == 'null':
125 self.cachevfs = nullvfs()
123 self.cachevfs = nullvfs()
126 else:
124 else:
127 raise error.Abort(_('unknown lfs cache scheme: %s')
125 usercache = lfutil._usercachedir(repo.ui, 'lfs')
128 % usercache.scheme)
126 self.cachevfs = lfsvfs(usercache)
129 self.ui = repo.ui
127 self.ui = repo.ui
130
128
131 def open(self, oid):
129 def open(self, oid):
@@ -33,8 +33,9 b' side. If that *is* enabled, the subsequ'
33 for flag '0x2000'!" if the extension is only loaded on one side (possibly also
33 for flag '0x2000'!" if the extension is only loaded on one side (possibly also
34 masked by the Internal Server Error message).
34 masked by the Internal Server Error message).
35 $ cat >> $HGRCPATH <<EOF
35 $ cat >> $HGRCPATH <<EOF
36 > [experimental]
37 > lfs.disableusercache = True
36 > [lfs]
38 > [lfs]
37 > usercache = null://
38 > threshold=10
39 > threshold=10
39 > [web]
40 > [web]
40 > allow_push=*
41 > allow_push=*
General Comments 0
You need to be logged in to leave comments. Login now