[PATCH 09 of 11 V1] store: add a version parameter to fncachestore constructor
Adrian Buehlmann
adrian at cadifra.com
Sun Sep 30 16:56:46 CDT 2012
# HG changeset patch
# User Adrian Buehlmann <adrian at cadifra.com>
# Date 1349032928 -7200
# Node ID 3abd7c8d887d8037377e7772000b7f27adacf6a8
# Parent 52aa541f17b64a79a62b1412bfead96d6dd120ff
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
@@ -486,8 +486,8 @@
return self.opener(self.encode(path), mode, *args, **kw)
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
@@ -538,6 +538,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