mercurial/store.py
changeset 17618 7840d81a80ec
parent 17610 d0afa149e059
child 17621 1a42f19ad958
equal deleted inserted replaced
17617:4038071af82a 17618:7840d81a80ec
   420         return self.opener(self.encode(path), mode, *args, **kw)
   420         return self.opener(self.encode(path), mode, *args, **kw)
   421 
   421 
   422 def _plainhybridencode(f):
   422 def _plainhybridencode(f):
   423     return _hybridencode(f, False)
   423     return _hybridencode(f, False)
   424 
   424 
   425 def _dothybridencode(f):
   425 _pathencode = getattr(parsers, 'pathencode', None)
   426     return _hybridencode(f, True)
   426 if _pathencode:
       
   427     def _dothybridencode(f):
       
   428         ef = _pathencode(f)
       
   429         if ef is None:
       
   430             return _hashencode(dotencode(f), True)
       
   431         return ef
       
   432 else:
       
   433     def _dothybridencode(f):
       
   434         return _hybridencode(f, True)
   427 
   435 
   428 class fncachestore(basicstore):
   436 class fncachestore(basicstore):
   429     def __init__(self, path, openertype, dotencode):
   437     def __init__(self, path, openertype, dotencode):
   430         if dotencode:
   438         if dotencode:
   431             encode = _dothybridencode
   439             encode = _dothybridencode