Show More
@@ -396,8 +396,18 class _fncacheopener(scmutil.abstractope | |||||
396 | self.fncache.add(path) |
|
396 | self.fncache.add(path) | |
397 | return self.opener(self.encode(path), mode, *args, **kw) |
|
397 | return self.opener(self.encode(path), mode, *args, **kw) | |
398 |
|
398 | |||
|
399 | def _plainhybridencode(f): | |||
|
400 | return _hybridencode(f, False) | |||
|
401 | ||||
|
402 | def _dothybridencode(f): | |||
|
403 | return _hybridencode(f, True) | |||
|
404 | ||||
399 | class fncachestore(basicstore): |
|
405 | class fncachestore(basicstore): | |
400 | def __init__(self, path, openertype, encode): |
|
406 | def __init__(self, path, openertype, dotencode): | |
|
407 | if dotencode: | |||
|
408 | encode = _dothybridencode | |||
|
409 | else: | |||
|
410 | encode = _plainhybridencode | |||
401 | self.encode = encode |
|
411 | self.encode = encode | |
402 | self.path = path + '/store' |
|
412 | self.path = path + '/store' | |
403 | self.pathsep = self.path + '/' |
|
413 | self.pathsep = self.path + '/' | |
@@ -444,8 +454,6 class fncachestore(basicstore): | |||||
444 | def store(requirements, path, openertype): |
|
454 | def store(requirements, path, openertype): | |
445 | if 'store' in requirements: |
|
455 | if 'store' in requirements: | |
446 | if 'fncache' in requirements: |
|
456 | if 'fncache' in requirements: | |
447 |
|
|
457 | return fncachestore(path, openertype, 'dotencode' in requirements) | |
448 | encode = lambda f: _hybridencode(f, de) |
|
|||
449 | return fncachestore(path, openertype, encode) |
|
|||
450 | return encodedstore(path, openertype) |
|
458 | return encodedstore(path, openertype) | |
451 | return basicstore(path, openertype) |
|
459 | return basicstore(path, openertype) |
General Comments 0
You need to be logged in to leave comments.
Login now