##// 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 res = _hashencode(path, dotencode)
254 res = _hashencode(path, dotencode)
255 return res
255 return res
256
256
257 def _plainhybridencode(f):
257 def _pathencode(path):
258 return _hybridencode(f, False)
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)
264 _pathencode = getattr(parsers, 'pathencode', _pathencode)
261 if _pathencode:
265
262 def _dothybridencode(f):
266 def _dothybridencode(f):
263 ef = _pathencode(f)
267 ef = _pathencode(f)
264 if ef is None:
268 if ef is None:
265 return _hashencode(encodedir(f), True)
269 return _hashencode(encodedir(f), True)
266 return ef
270 return ef
267 else:
271
268 def _dothybridencode(f):
272 def _plainhybridencode(f):
269 return _hybridencode(f, True)
273 return _hybridencode(f, False)
270
274
271 def _calcmode(path):
275 def _calcmode(path):
272 try:
276 try:
General Comments 0
You need to be logged in to leave comments. Login now