changeset 14929:4bf9493e7b07

localrepo: add a cache with stat info for files under .hg/
author Idan Kamara <idankk86@gmail.com>
date Mon, 25 Jul 2011 15:08:37 +0300
parents dca59d5be12d
children 372d9d8b1da4
files mercurial/localrepo.py mercurial/statichttprepo.py
diffstat 2 files changed, 7 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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