diff hgext/obsolete.py @ 160:24346b78cd99

mercurial 2.1.2 compat
author Pierre-Yves David <pierre-yves.david@logilab.fr>
date Wed, 21 Mar 2012 11:57:03 +0100
parents f12fd2410a60
children c2d692c8f599
line wrap: on
line diff
--- 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', ())