equal
deleted
inserted
replaced
116 """ |
116 """ |
117 |
117 |
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): |
132 """Open a read-only file descriptor to the named blob, in either the |
130 """Open a read-only file descriptor to the named blob, in either the |
133 usercache or the local store.""" |
131 usercache or the local store.""" |