hgext/obsolete.py
changeset 428 1c82147e9395
parent 423 8ae4f8bb24d5
child 429 079b231b8ea4
--- a/hgext/obsolete.py	Mon Aug 06 19:34:24 2012 +0200
+++ b/hgext/obsolete.py	Tue Aug 07 11:35:45 2012 +0200
@@ -72,14 +72,9 @@
 from mercurial import cmdutil
 from mercurial import templatekw
 from mercurial import obsolete
+from mercurial.localrepo import storecache
 obsolete._enabled = True
 
-try:
-    from mercurial.localrepo import storecache
-    storecache('babar') # to trigger import
-except (TypeError, ImportError):
-    def storecache(*args):
-        return scmutil.filecache(*args, instore=True)
 
 
 ### Patch changectx
@@ -600,8 +595,7 @@
 def uisetup(ui):
     extensions.wrapcommand(commands.table, "update", wrapmayobsoletewc)
     extensions.wrapcommand(commands.table, "pull", wrapmayobsoletewc)
-    if util.safehasattr(cmdutil, 'amend'):
-        extensions.wrapfunction(cmdutil, 'amend', wrapcmdutilamend)
+    extensions.wrapfunction(cmdutil, 'amend', wrapcmdutilamend)
     extensions.wrapfunction(discovery, 'checkheads', wrapcheckheads)
     extensions.wrapfunction(phases, 'advanceboundary', wrapclearcache)