Show More
@@ -288,10 +288,10 b' def _calcmode(path):' | |||
|
288 | 288 | |
|
289 | 289 | class basicstore(object): |
|
290 | 290 | '''base class for local repository stores''' |
|
291 |
def __init__(self, path, |
|
|
291 | def __init__(self, path, vfstype): | |
|
292 | 292 | self.path = path |
|
293 | 293 | self.createmode = _calcmode(path) |
|
294 |
op = |
|
|
294 | op = vfstype(self.path) | |
|
295 | 295 | op.createmode = self.createmode |
|
296 | 296 | self.opener = scmutil.filteropener(op, encodedir) |
|
297 | 297 | |
@@ -338,10 +338,10 b' class basicstore(object):' | |||
|
338 | 338 | pass |
|
339 | 339 | |
|
340 | 340 | class encodedstore(basicstore): |
|
341 |
def __init__(self, path, |
|
|
341 | def __init__(self, path, vfstype): | |
|
342 | 342 | self.path = path + '/store' |
|
343 | 343 | self.createmode = _calcmode(self.path) |
|
344 |
op = |
|
|
344 | op = vfstype(self.path) | |
|
345 | 345 | op.createmode = self.createmode |
|
346 | 346 | self.opener = scmutil.filteropener(op, encodefilename) |
|
347 | 347 | |
@@ -438,7 +438,7 b' class _fncachevfs(scmutil.abstractvfs):' | |||
|
438 | 438 | return self.opener(self.encode(path), mode, *args, **kw) |
|
439 | 439 | |
|
440 | 440 | class fncachestore(basicstore): |
|
441 |
def __init__(self, path, |
|
|
441 | def __init__(self, path, vfstype, dotencode): | |
|
442 | 442 | if dotencode: |
|
443 | 443 | encode = _dothybridencode |
|
444 | 444 | else: |
@@ -447,7 +447,7 b' class fncachestore(basicstore):' | |||
|
447 | 447 | self.path = path + '/store' |
|
448 | 448 | self.pathsep = self.path + '/' |
|
449 | 449 | self.createmode = _calcmode(self.path) |
|
450 |
op = |
|
|
450 | op = vfstype(self.path) | |
|
451 | 451 | op.createmode = self.createmode |
|
452 | 452 | fnc = fncache(op) |
|
453 | 453 | self.fncache = fnc |
@@ -486,9 +486,9 b' class fncachestore(basicstore):' | |||
|
486 | 486 | def write(self): |
|
487 | 487 | self.fncache.write() |
|
488 | 488 | |
|
489 |
def store(requirements, path, |
|
|
489 | def store(requirements, path, vfstype): | |
|
490 | 490 | if 'store' in requirements: |
|
491 | 491 | if 'fncache' in requirements: |
|
492 |
return fncachestore(path, |
|
|
493 |
return encodedstore(path, |
|
|
494 |
return basicstore(path, |
|
|
492 | return fncachestore(path, vfstype, 'dotencode' in requirements) | |
|
493 | return encodedstore(path, vfstype) | |
|
494 | return basicstore(path, vfstype) |
General Comments 0
You need to be logged in to leave comments.
Login now