Commits

Yuya Nishihara committed 2309217

manifestdialog: fix possible unicode error at cset link handler (fixes #2289)

If 'unknown branch' message is translated, UnicodeDecodeError occurs.

Also changed to call ManifestWidget.setRev() with integer revision or None,
because it looks to be designed as such.

Comments (0)

Files changed (1)

tortoisehg/hgqt/manifestdialog.py

     def _linkHandler(self, link):
         ulink = unicode(link)
         if ulink.startswith('cset:'):
-            rev = ulink[len('cset:'):]
+            changeid = hglib.fromunicode(ulink[len('cset:'):])
+            rev = self._repo[changeid].rev()
             self._manifest_widget.setRev(rev)
         else:
             self.linkActivated.emit(link)