Commits

Yuya Nishihara committed 909c9cf

repoview: fix unicode handling of error message at goto(rev) (fixes #1822)

- 'rev' may be arbitrary non-ascii string
- fromunicode(str(e)) is a typo of tounicode(...)

  • Participants
  • Parent commits c52933e
  • Branches stable

Comments (0)

Files changed (1)

tortoisehg/hgqt/repoview.py

         try:
             rev = self.repo.changectx(rev).rev()
         except error.RepoError:
-            self.showMessage.emit(_("Can't find revision '%s'") % rev)
+            self.showMessage.emit(_("Can't find revision '%s'")
+                                  % hglib.tounicode(str(rev)))
         except LookupError, e:
-            self.showMessage.emit(hglib.fromunicode(str(e)))
+            self.showMessage.emit(hglib.tounicode(str(e)))
         else:
             idx = self.model().indexFromRev(rev)
             if idx is not None: