store: move _plainhybridencode and _dothybridencode higher up in the file
no functional change
--- a/mercurial/store.py Wed Sep 19 11:39:18 2012 +0200
+++ b/mercurial/store.py Wed Sep 19 13:58:51 2012 +0200
@@ -254,6 +254,20 @@
res = _hashencode(path, dotencode)
return res
+def _plainhybridencode(f):
+ return _hybridencode(f, False)
+
+_pathencode = getattr(parsers, 'pathencode', None)
+if _pathencode:
+ def _dothybridencode(f):
+ ef = _pathencode(f)
+ if ef is None:
+ return _hashencode(encodedir(f), True)
+ return ef
+else:
+ def _dothybridencode(f):
+ return _hybridencode(f, True)
+
def _calcmode(path):
try:
# files in .hg/ will be created using this mode
@@ -419,20 +433,6 @@
self.fncache.add(path)
return self.opener(self.encode(path), mode, *args, **kw)
-def _plainhybridencode(f):
- return _hybridencode(f, False)
-
-_pathencode = getattr(parsers, 'pathencode', None)
-if _pathencode:
- def _dothybridencode(f):
- ef = _pathencode(f)
- if ef is None:
- return _hashencode(encodedir(f), True)
- return ef
-else:
- def _dothybridencode(f):
- return _hybridencode(f, True)
-
class fncachestore(basicstore):
def __init__(self, path, openertype, dotencode):
if dotencode: