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