##// END OF EJS Templates
store: add a fallback _pathencode Python function...
Adrian Buehlmann -
r17624:ae103510 default
parent child Browse files
Show More
@@ -254,20 +254,24 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 _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
263
264 _pathencode = getattr(parsers, 'pathencode', _pathencode)
265
266 def _dothybridencode(f):
267 ef = _pathencode(f)
268 if ef is None:
269 return _hashencode(encodedir(f), True)
270 return ef
271
257 def _plainhybridencode(f):
272 def _plainhybridencode(f):
258 return _hybridencode(f, False)
273 return _hybridencode(f, False)
259
274
260 _pathencode = getattr(parsers, 'pathencode', None)
261 if _pathencode:
262 def _dothybridencode(f):
263 ef = _pathencode(f)
264 if ef is None:
265 return _hashencode(encodedir(f), True)
266 return ef
267 else:
268 def _dothybridencode(f):
269 return _hybridencode(f, True)
270
271 def _calcmode(path):
275 def _calcmode(path):
272 try:
276 try:
273 # files in .hg/ will be created using this mode
277 # files in .hg/ will be created using this mode
General Comments 0
You need to be logged in to leave comments. Login now