mercurial/localrepo.py
changeset 33277 4470508eb6f2
parent 33260 85d1ac011582
child 33278 87bca10a06ed
--- a/mercurial/localrepo.py	Mon Jul 03 11:22:00 2017 +0200
+++ b/mercurial/localrepo.py	Tue Jul 04 23:13:46 2017 +0900
@@ -66,6 +66,11 @@
 urlerr = util.urlerr
 urlreq = util.urlreq
 
+# set of (path, vfs-location) tuples. vfs-location is:
+# - 'plain for vfs relative paths
+# - '' for svfs relative paths
+_cachedfiles = set()
+
 class _basefilecache(scmutil.filecache):
     """All filecache usage on repo are done for logic that should be unfiltered
     """
@@ -80,11 +85,21 @@
 
 class repofilecache(_basefilecache):
     """filecache for files in .hg but outside of .hg/store"""
+    def __init__(self, *paths):
+        super(repofilecache, self).__init__(*paths)
+        for path in paths:
+            _cachedfiles.add((path, 'plain'))
+
     def join(self, obj, fname):
         return obj.vfs.join(fname)
 
 class storecache(_basefilecache):
     """filecache for files in the store"""
+    def __init__(self, *paths):
+        super(storecache, self).__init__(*paths)
+        for path in paths:
+            _cachedfiles.add((path, ''))
+
     def join(self, obj, fname):
         return obj.sjoin(fname)