Commits

Yuya Nishihara committed 22371b2

workbench: keep url instead of alias as item data of urlCombo

setSyncUrl() can accept both URL and alias, so this shouldn't change the
behavior.

Comments (0)

Files changed (1)

tortoisehg/hgqt/workbench.py

             # text, (pull-alias, push-alias)
             if isinstance(a, tuple):
                 itemtext = u'\u2193 %s | %s \u2191' % a
-                itemdata = a
-                tooltip = _('pull: %s\npush: %s') % tuple(pathdict[alias]
-                    for alias in itemdata)
+                itemdata = tuple(pathdict[alias] for alias in a)
+                tooltip = _('pull: %s\npush: %s') % itemdata
             else:
                 itemtext = a
-                itemdata = (a, a)
+                itemdata = (pathdict[a], pathdict[a])
                 tooltip = pathdict[a]
             self.urlCombo.addItem(itemtext, itemdata)
             self.urlCombo.setItemData(n, tooltip, Qt.ToolTipRole)
             self._setupUrlCombo(w.repo)
 
     def _syncUrlFor(self, op):
-        """Current URL alias for the given sync operation"""
+        """Current URL for the given sync operation"""
         urlindex = self.urlCombo.currentIndex()
         if urlindex < 0:
             return