mercurial/extensions.py
changeset 48360 e4acdf5d94a2
parent 48359 e4e2ce328599
child 48361 0d0ce2529540
equal deleted inserted replaced
48359:e4e2ce328599 48360:e4acdf5d94a2
   305             try:
   305             try:
   306                 load(ui, name, path, loadingtime)
   306                 load(ui, name, path, loadingtime)
   307             except Exception as inst:
   307             except Exception as inst:
   308                 msg = stringutil.forcebytestr(inst)
   308                 msg = stringutil.forcebytestr(inst)
   309                 if path:
   309                 if path:
   310                     error_msg = _(b"failed to import extension %s from %s: %s")
   310                     error_msg = _(
       
   311                         b'failed to import extension "%s" from %s: %s'
       
   312                     )
   311                     error_msg %= (name, path, msg)
   313                     error_msg %= (name, path, msg)
   312                 else:
   314                 else:
   313                     error_msg = _(b"failed to import extension %s: %s")
   315                     error_msg = _(b'failed to import extension "%s": %s')
   314                     error_msg %= (name, msg)
   316                     error_msg %= (name, msg)
   315                 ui.warn((b"*** %s\n") % error_msg)
   317                 ui.warn((b"*** %s\n") % error_msg)
   316                 if isinstance(inst, error.Hint) and inst.hint:
   318                 if isinstance(inst, error.Hint) and inst.hint:
   317                     ui.warn(_(b"*** (%s)\n") % inst.hint)
   319                     ui.warn(_(b"*** (%s)\n") % inst.hint)
   318                 ui.traceback()
   320                 ui.traceback()