mercurial/extensions.py
changeset 41068 28a4fb793ba1
parent 40996 6f2510b581a0
child 42335 38b7b45627a2
equal deleted inserted replaced
41067:f2601cbce209 41068:28a4fb793ba1
   224             try:
   224             try:
   225                 extsetup(ui)
   225                 extsetup(ui)
   226             except TypeError:
   226             except TypeError:
   227                 if pycompat.getargspec(extsetup).args:
   227                 if pycompat.getargspec(extsetup).args:
   228                     raise
   228                     raise
       
   229                 ui.deprecwarn("extsetup for '%s' must take a ui argument"
       
   230                               % name, "4.9")
   229                 extsetup() # old extsetup with no ui argument
   231                 extsetup() # old extsetup with no ui argument
   230         except Exception as inst:
   232         except Exception as inst:
   231             ui.traceback(force=True)
   233             ui.traceback(force=True)
   232             msg = stringutil.forcebytestr(inst)
   234             msg = stringutil.forcebytestr(inst)
   233             ui.warn(_("*** failed to set up extension %s: %s\n") % (name, msg))
   235             ui.warn(_("*** failed to set up extension %s: %s\n") % (name, msg))