diff mercurial/statichttprepo.py @ 18189:b9026ba002f6

branchmap: enable caching for filtered version too The `_branchcache` attribute is turned into a dictionary. Key are filter name and value is a `branchcache` object. Unfiltered version is cached as `None` filter. The attribute is renamed to `_branchcaches` to avoid confusion with the previous one. Both old and new contents are dictionary even if their contents are different. I prefer possible extension code to crash right away instead of just messing the wrong dictionary. As all different caches work isolated to each other, this code keeps the previous behavior of using the unfiltered cache we nothing is filtered. This is a cheap way to have cache collaborate and nullify potential impact in the default case.
author Pierre-Yves David <pierre-yves.david@ens-lyon.org>
date Mon, 24 Dec 2012 03:21:15 +0100
parents ad194a8ab5c1
children 169030d9255e
line wrap: on
line diff
--- a/mercurial/statichttprepo.py	Tue Jan 01 21:27:13 2013 +0100
+++ b/mercurial/statichttprepo.py	Mon Dec 24 03:21:15 2012 +0100
@@ -134,7 +134,7 @@
         self.changelog = changelog.changelog(self.sopener)
         self._tags = None
         self.nodetagscache = None
-        self._branchcache = None
+        self._branchcaches = {}
         self.encodepats = None
         self.decodepats = None