[PATCH 11 of 11] localrepo: decorate _tagscache() with filecache

Idan Kamara idankk86 at gmail.com
Sat Jul 16 09:34:42 CDT 2011


# HG changeset patch
# User Idan Kamara <idankk86 at gmail.com>
# Date 1310826866 -10800
# Node ID 1dfec3fe7839e255e3ccd95208f4a5f31eb722c0
# Parent  2e71f52c1a2da98c3a0ecf8ed2437af442e830b6
localrepo: decorate _tagscache() with filecache

diff -r 2e71f52c1a2d -r 1dfec3fe7839 mercurial/localrepo.py
--- a/mercurial/localrepo.py	Sat Jul 16 17:34:26 2011 +0300
+++ b/mercurial/localrepo.py	Sat Jul 16 17:34:26 2011 +0300
@@ -323,7 +323,7 @@
         self.tags() # instantiate the cache
         self._tag(names, node, message, local, user, date)
 
-    @propertycache
+    @filecache('00changelog.i', True)
     def _tagscache(self):
         '''Returns a tagscache object that contains various tags related caches.'''
 
@@ -792,11 +792,6 @@
             release(lock, wlock)
 
     def invalidatecaches(self):
-        try:
-            delattr(self, '_tagscache')
-        except AttributeError:
-            pass
-
         self._branchcache = None # in UTF-8
         self._branchcachetip = None
 


More information about the Mercurial-devel mailing list