mercurial/extensions.py
changeset 31447 067add650129
parent 31303 90f439823b99
child 31448 6419cd243017
equal deleted inserted replaced
31446:9a94239e4f12 31447:067add650129
   107 
   107 
   108 def _forbytes(inst):
   108 def _forbytes(inst):
   109     """Portably format an import error into a form suitable for
   109     """Portably format an import error into a form suitable for
   110     %-formatting into bytestrings."""
   110     %-formatting into bytestrings."""
   111     if pycompat.ispy3:
   111     if pycompat.ispy3:
   112         return encoding.tolocal(str(inst).encode('utf-8'))
   112         return encoding.unitolocal(str(inst))
   113     return inst
   113     return inst
   114 
   114 
   115 def _reportimporterror(ui, err, failed, next):
   115 def _reportimporterror(ui, err, failed, next):
   116     # note: this ui.debug happens before --debug is processed,
   116     # note: this ui.debug happens before --debug is processed,
   117     #       Use --config ui.debug=1 to see them.
   117     #       Use --config ui.debug=1 to see them.