Patchwork [3,of,5] localrepo: add a second auditor without file system check

login
register
mail settings
Submitter Pierre-Yves David
Date Dec. 3, 2015, 10:01 p.m.
Message ID <64a5cdedfc87c8c3d47d.1449180087@marginatus.alto.octopoid.net>
Download mbox | patch
Permalink /patch/11795/
State Accepted
Headers show

Comments

Pierre-Yves David - Dec. 3, 2015, 10:01 p.m.
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david@fb.com>
# Date 1449177756 28800
#      Thu Dec 03 13:22:36 2015 -0800
# Node ID 64a5cdedfc87c8c3d47d8147612e62186a5228c4
# Parent  5af761d2a50a28adf385a842f8bbcf8d6d7e1a4e
# EXP-Topic symlink.issue4749
# Available At http://hg.netv6.net/marmoute-wip/mercurial/
#              hg pull http://hg.netv6.net/marmoute-wip/mercurial/ -r 64a5cdedfc87
localrepo: add a second auditor without file system check

Auditors keeps a cache of audited paths. Therefore we cannot use the same
auditor for working copy and history operation. We create a new one without
file system check for this purposes.

Patch

diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py
--- a/mercurial/localrepo.py
+++ b/mercurial/localrepo.py
@@ -212,10 +212,12 @@  class localrepository(object):
         self.wopener = self.wvfs
         self.root = self.wvfs.base
         self.path = self.wvfs.join(".hg")
         self.origroot = path
         self.auditor = pathutil.pathauditor(self.root, self._checknested)
+        self.nofsauditor = pathutil.pathauditor(self.root, self._checknested,
+                                                realfs=False)
         self.vfs = scmutil.vfs(self.path)
         self.opener = self.vfs
         self.baseui = baseui
         self.ui = baseui.copy()
         self.ui.copy = baseui.copy # prevent copying repo configuration