localrepo: add a cache with stat info for files under .hg/
authorIdan Kamara <idankk86@gmail.com>
Mon, 25 Jul 2011 15:08:37 +0300
changeset 14929 4bf9493e7b07
parent 14928 dca59d5be12d
child 14930 372d9d8b1da4
localrepo: add a cache with stat info for files under .hg/
mercurial/localrepo.py
mercurial/statichttprepo.py
--- a/mercurial/localrepo.py	Sat Jul 09 19:06:59 2011 +0300
+++ b/mercurial/localrepo.py	Mon Jul 25 15:08:37 2011 +0300
@@ -111,6 +111,12 @@
         self._datafilters = {}
         self._transref = self._lockref = self._wlockref = None
 
+        # A cache for various files under .hg/ that tracks file changes,
+        # (used by the filecache decorator)
+        #
+        # Maps a property name to its util.filecacheentry
+        self._filecache = {}
+
     def _applyrequirements(self, requirements):
         self.requirements = requirements
         openerreqs = set(('revlogv1', 'generaldelta'))
--- a/mercurial/statichttprepo.py	Sat Jul 09 19:06:59 2011 +0300
+++ b/mercurial/statichttprepo.py	Mon Jul 25 15:08:37 2011 +0300
@@ -125,6 +125,7 @@
         self.encodepats = None
         self.decodepats = None
         self.capabilities.difference_update(["pushkey"])
+        self._filecache = {}
 
     def url(self):
         return self._url