# HG changeset patch # User Pierre-Yves David # Date 1332327423 -3600 # Node ID 24346b78cd99e4cbbbda64054ac574348356870f # Parent 6ff373346dd4b6142e2f99a15636deeec956ade8 mercurial 2.1.2 compat diff -r 6ff373346dd4 -r 24346b78cd99 hgext/obsolete.py --- 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', ())