hgext/obsolete.py
changeset 160 24346b78cd99
parent 150 f12fd2410a60
child 197 c2d692c8f599
--- a/hgext/obsolete.py	Tue Mar 20 17:53:51 2012 +0100
+++ b/hgext/obsolete.py	Wed Mar 21 11:57:03 2012 +0100
@@ -98,6 +98,14 @@
 from mercurial.node import hex, bin, short, nullid
 from mercurial.lock import release
 
+try:
+    from mercurial.localrepo import storecache
+    storecache('babar') # to trigger import
+except TypeError:
+    def storecache(*args):
+        return scmutil.filecache(*args, instore=True)
+
+
 ### Patch changectx
 #############################
 
@@ -557,7 +565,7 @@
             finally:
                 release(lock, wlock)
 
-        @scmutil.filecache('00changelog.i', True)
+        @storecache('00changelog.i')
         def changelog(self):
             changelog = getattr(super(obsoletingrepo, self), 'changelog')
             old = changelog.__dict__.pop('hiddenrevs', ())