##// END OF EJS Templates
store: move _plainhybridencode and _dothybridencode higher up in the file...
Adrian Buehlmann -
r17623:448e6ed7 default
parent child Browse files
Show More
@@ -254,6 +254,20 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)
259
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
257 271 def _calcmode(path):
258 272 try:
259 273 # files in .hg/ will be created using this mode
@@ -419,20 +433,6 b' class _fncacheopener(scmutil.abstractope'
419 433 self.fncache.add(path)
420 434 return self.opener(self.encode(path), mode, *args, **kw)
421 435
422 def _plainhybridencode(f):
423 return _hybridencode(f, False)
424
425 _pathencode = getattr(parsers, 'pathencode', None)
426 if _pathencode:
427 def _dothybridencode(f):
428 ef = _pathencode(f)
429 if ef is None:
430 return _hashencode(encodedir(f), True)
431 return ef
432 else:
433 def _dothybridencode(f):
434 return _hybridencode(f, True)
435
436 436 class fncachestore(basicstore):
437 437 def __init__(self, path, openertype, dotencode):
438 438 if dotencode:
General Comments 0
You need to be logged in to leave comments. Login now