obsolete: remove 2.2 compat hack
authorPierre-Yves David <pierre-yves.david@ens-lyon.org>
Tue, 07 Aug 2012 11:35:45 +0200
changeset 428 1c82147e9395
parent 427 b86e062f2335
child 429 079b231b8ea4
obsolete: remove 2.2 compat hack
hgext/obsolete.py
--- 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)