mercurial/ui.py
changeset 35897 4b1c04082cdc
parent 35889 e49c39ffeac2
child 35900 72de5c504833
equal deleted inserted replaced
35896:ed3a7300b7b5 35897:4b1c04082cdc
  1506                                ''.join(exctb[:-1]),
  1506                                ''.join(exctb[:-1]),
  1507                                ''.join(causetb),
  1507                                ''.join(causetb),
  1508                                ''.join(exconly))
  1508                                ''.join(exconly))
  1509             else:
  1509             else:
  1510                 output = traceback.format_exception(exc[0], exc[1], exc[2])
  1510                 output = traceback.format_exception(exc[0], exc[1], exc[2])
  1511                 data = r''.join(output)
  1511                 self.write_err(encoding.strtolocal(r''.join(output)))
  1512                 if pycompat.ispy3:
       
  1513                     enc = pycompat.sysstr(encoding.encoding)
       
  1514                     data = data.encode(enc, errors=r'replace')
       
  1515                 self.write_err(data)
       
  1516         return self.tracebackflag or force
  1512         return self.tracebackflag or force
  1517 
  1513 
  1518     def geteditor(self):
  1514     def geteditor(self):
  1519         '''return editor to use'''
  1515         '''return editor to use'''
  1520         if pycompat.sysplatform == 'plan9':
  1516         if pycompat.sysplatform == 'plan9':