changeset 17623:448e6ed7c557

store: move _plainhybridencode and _dothybridencode higher up in the file no functional change
author Adrian Buehlmann <adrian@cadifra.com>
date Wed, 19 Sep 2012 13:58:51 +0200
parents 57bf86677daa
children ae103510f6aa
files mercurial/store.py
diffstat 1 files changed, 14 insertions(+), 14 deletions(-) [+]
line wrap: on
line diff
--- 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: