##// END OF EJS Templates
store: add a fallback _pathencode Python function...
Adrian Buehlmann -
r17624:ae103510 default
parent child Browse files
Show More
@@ -254,19 +254,23 b' def _hybridencode(path, dotencode):'
254 254 res = _hashencode(path, dotencode)
255 255 return res
256 256
257 def _plainhybridencode(f):
258 return _hybridencode(f, False)
257 def _pathencode(path):
258 ef = _encodefname(encodedir(path)).split('/')
259 res = '/'.join(_auxencode(ef, True))
260 if len(res) > _maxstorepathlen:
261 return None
262 return res
259 263
260 _pathencode = getattr(parsers, 'pathencode', None)
261 if _pathencode:
264 _pathencode = getattr(parsers, 'pathencode', _pathencode)
265
262 266 def _dothybridencode(f):
263 267 ef = _pathencode(f)
264 268 if ef is None:
265 269 return _hashencode(encodedir(f), True)
266 270 return ef
267 else:
268 def _dothybridencode(f):
269 return _hybridencode(f, True)
271
272 def _plainhybridencode(f):
273 return _hybridencode(f, False)
270 274
271 275 def _calcmode(path):
272 276 try:
General Comments 0
You need to be logged in to leave comments. Login now