Commits

Yuya Nishihara committed 97e646b

get display name from repoagent on TortoiseHg 2.11 or later

repo.displayname was removed by thg 73e6c857b274.

Comments (0)

Files changed (1)

         self._qui.setupUi(self)
 
         # window
-        self.setWindowTitle(_('CodeReview - %s') % repo.displayname)
+        try:
+            displayname = repoagent.displayName()
+        except AttributeError:
+            # TortoiseHg<2.11
+            displayname = repo.displayname
+        self.setWindowTitle(_('CodeReview - %s') % displayname)
         # TODO: choose appropriate icon
         self.setWindowIcon(qtlib.geticon('hg-tag'))