Commits

Pierre-Yves David committed 1c82147

obsolete: remove 2.2 compat hack

  • Participants
  • Parent commits b86e062
  • Branches default

Comments (0)

Files changed (1)

hgext/obsolete.py

 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
 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)