store: move _plainhybridencode and _dothybridencode higher up in the file
authorAdrian Buehlmann <adrian@cadifra.com>
Wed, 19 Sep 2012 13:58:51 +0200
changeset 17623 448e6ed7c557
parent 17622 57bf86677daa
child 17624 ae103510f6aa
store: move _plainhybridencode and _dothybridencode higher up in the file no functional change
mercurial/store.py
--- 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: