[PATCH 6 of 7 V2 of F2 series] store: implement new fncache2 requirement

Adrian Buehlmann adrian at cadifra.com
Sun Oct 7 05:54:58 CDT 2012


# HG changeset patch
# User Adrian Buehlmann <adrian at cadifra.com>
# Date 1349606405 -7200
# Node ID be414ba19ddce14c9793534f0615df803617b27a
# Parent  f3bebe96e47d23dd59fea0a1ad463653704f6ea8
store: implement new fncache2 requirement

not yet used

diff --git a/mercurial/store.py b/mercurial/store.py
--- a/mercurial/store.py
+++ b/mercurial/store.py
@@ -494,7 +494,9 @@
 
 class fncachestore(basicstore):
     def __init__(self, path, vfstype, version):
-        if version == 1:
+        if version == 2:
+            encode = _hybridencode2
+        elif version == 1:
             encode = _dothybridencode
         else:
             encode = _plainhybridencode
@@ -544,7 +546,9 @@
 
 def store(requirements, path, vfstype):
     if 'store' in requirements:
-        if 'fncache' in requirements:
+        if 'fncache2' in requirements:
+            return fncachestore(path, vfstype, version=2)
+        elif 'fncache' in requirements:
             if 'dotencode' in requirements:
                 version = 1
             else:


More information about the Mercurial-devel mailing list