[PATCH 3 of 3 v3] store: enable native fncache encoding by default
Bryan O'Sullivan
bos at serpentine.com
Thu Sep 6 16:00:38 CDT 2012
# HG changeset patch
# User Bryan O'Sullivan <bryano at fb.com>
# Date 1346965231 25200
# Node ID 7795559c60415e3f4d9c27e446ca889adb6abba7
# Parent a6895cd98f21e69523f54c547b6d7d57207b73c3
store: enable native fncache encoding by default
diff --git a/mercurial/store.py b/mercurial/store.py
--- a/mercurial/store.py
+++ b/mercurial/store.py
@@ -6,7 +6,7 @@
# GNU General Public License version 2 or any later version.
from i18n import _
-import osutil, scmutil, util
+import osutil, scmutil, util, parsers
import os, stat, errno
_sha = util.sha1
@@ -425,8 +425,11 @@
def store(requirements, path, openertype):
if 'store' in requirements:
if 'fncache' in requirements:
- auxencode = lambda f: _auxencode(f, 'dotencode' in requirements)
- encode = lambda f: _hybridencode(f, auxencode)
+ dotreq = 'dotencode' in requirements
+ encode = dotreq and getattr(parsers, 'pathencode')
+ if not encode:
+ auxencode = lambda f: _auxencode(f, dotreq)
+ encode = lambda f: _hybridencode(f, auxencode)
return fncachestore(path, openertype, encode)
return encodedstore(path, openertype)
return basicstore(path, openertype)
More information about the Mercurial-devel
mailing list