[PATCH 4 of 7 V3 of F2 series] store: add a version parameter to fncachestore constructor

Adrian Buehlmann adrian at cadifra.com
Mon Oct 8 16:49:49 CDT 2012


# HG changeset patch
# User Adrian Buehlmann <adrian at cadifra.com>
# Date 1349732273 -7200
# Node ID b994283cdc11f50ce8ce756596c0a1265d9373f5
# Parent  bae8e052bd15205f3bda9768a1bceca569dd5245
store: add a version parameter to fncachestore constructor

diff --git a/mercurial/store.py b/mercurial/store.py
--- a/mercurial/store.py
+++ b/mercurial/store.py
@@ -494,8 +494,8 @@
             return self.vfs.join(path)
 
 class fncachestore(basicstore):
-    def __init__(self, path, vfstype, dotencode):
-        if dotencode:
+    def __init__(self, path, vfstype, version):
+        if version == 1:
             encode = _dothybridencode
         else:
             encode = _plainhybridencode
@@ -545,6 +545,10 @@
 def store(requirements, path, vfstype):
     if 'store' in requirements:
         if 'fncache' in requirements:
-            return fncachestore(path, vfstype, 'dotencode' in requirements)
+            if 'dotencode' in requirements:
+                version = 1
+            else:
+                version = 0
+            return fncachestore(path, vfstype, version)
         return encodedstore(path, vfstype)
     return basicstore(path, vfstype)


More information about the Mercurial-devel mailing list