Commits

Steve Borho committed 09d35f1

wctxactions: htmlui.getdata() outputs unicode already (refs #957)

htmlui is not very unicode safe. It needs to be fixed or removed by 2.2

  • Participants
  • Parent commits 07c169a
  • Branches stable

Comments (0)

Files changed (1)

File tortoisehg/hgqt/wctxactions.py

         files = [wfile for t, wfile in self.selrows if t & action._filetypes]
 
         hu = htmlui.htmlui()
-        name = func.__name__.title()
+        name = hglib.tounicode(func.__name__.title())
         notify = False
         cwd = os.getcwd()
         try:
                 notify = func(parent, hu, repo, files)
                 o, e = hu.getdata()
                 if e:
-                    QMessageBox.warning(parent, name + _(' errors'),
-                                        hglib.tounicode(str(e)))
+                    QMessageBox.warning(parent, name + _(' errors'), e)
                 elif o:
-                    QMessageBox.information(parent, name + _(' output'),
-                                            hglib.tounicode(str(o)))
+                    QMessageBox.information(parent, name + _(' output'), o)
                 elif notify:
                     wfiles = [repo.wjoin(x) for x in files]
                     shlib.shell_notify(wfiles)