Commits

Yuya Nishihara committed 9238543

fin

Comments (0)

Files changed (15)

-urltoolbarcombo.patch
-wb-urlcombo-move.diff
-wb-urlcombo-unicode.diff
-sync-curchange.diff
-sync-seturlrename.diff
-sync-seturluni.diff
-sync-dropuni.diff
-sync-seletcapi.diff
-sync-selectapiuse.diff
-wb-synchandler.diff
-wb-urlcombo-tuple.diff
-wb-synchandler-url.diff
-wb-refresh.diff
-sync-urlaftersave.diff
 thread-dup-repoerror.diff
 close-self-by-wb.diff
 wb-closedestroy-trace.diff

sync-curchange.diff

-# HG changeset patch
-# Date 1366460217 -32400
-# Parent 435eee99d7c7f8988642de33480e488f1a393095
-sync: update URL when current selection changed by keyboard or programmatically
-
-diff --git a/tortoisehg/hgqt/sync.py b/tortoisehg/hgqt/sync.py
---- a/tortoisehg/hgqt/sync.py
-+++ b/tortoisehg/hgqt/sync.py
-@@ -190,6 +190,10 @@ class SyncWidget(QWidget, qtlib.TaskWidg
-         self.urlentry.textChanged.connect(self.urlChanged)
-         tbar.addWidget(self.urlentry)
- 
-+        # even though currentRowChanged fires pathSelected, clicked signal is
-+        # also connected to it. otherwise urlentry won't be updated when the
-+        # selection moves between hgrctv and reltv.
-+
-         hbox = QHBoxLayout()
-         hbox.setContentsMargins(0, 0, 0, 0)
-         self.hgrctv = PathsTree(self, True)
-@@ -319,6 +323,8 @@ class SyncWidget(QWidget, qtlib.TaskWidg
-                 self.paths[ alias ] = cfg['paths'][ alias ]
-         tm = PathsModel(self.paths.items(), self)
-         self.hgrctv.setModel(tm)
-+        sm = self.hgrctv.selectionModel()
-+        sm.currentRowChanged.connect(self.pathSelected)
- 
-         # Refresh post-pull
-         self.cachedpp = self.repo.postpull
-@@ -363,6 +369,8 @@ class SyncWidget(QWidget, qtlib.TaskWidg
-         pairs = [(alias, path) for path, alias in related.items()]
-         tm = PathsModel(pairs, self)
-         self.reltv.setModel(tm)
-+        sm = self.reltv.selectionModel()
-+        sm.currentRowChanged.connect(self.pathSelected)
- 
-     def currentUrl(self):
-         return unicode(self.urlentry.text())

sync-dropuni.diff

-# HG changeset patch
-# Date 1366460820 -32400
-# Parent 83f202d00ca3bea7c44aa6f31883d5f7dfabeed5
-sync: remove extra unicode-localstr conversion from dropEvent()
-
-diff --git a/tortoisehg/hgqt/sync.py b/tortoisehg/hgqt/sync.py
---- a/tortoisehg/hgqt/sync.py
-+++ b/tortoisehg/hgqt/sync.py
-@@ -413,20 +413,18 @@ class SyncWidget(QWidget, qtlib.TaskWidg
-     def dropEvent(self, event):
-         data = event.mimeData()
-         if data.hasUrls():
--            url = data.urls()[0]
--            lurl = hglib.fromunicode(url.toString())
-+            url = unicode(data.urls()[0].toString())
-             event.setDropAction(Qt.CopyAction)
-             event.accept()
-         elif data.hasText():
--            text = data.text()
--            lurl = hglib.fromunicode(text)
-+            url = unicode(data.text())
-             event.setDropAction(Qt.CopyAction)
-             event.accept()
-         else:
-             return
--        if lurl.startswith('file:///'):
--            lurl = lurl[8:]
--        self.setEditUrl(hglib.tounicode(lurl))
-+        if url.startswith('file:///'):
-+            url = url[8:]
-+        self.setEditUrl(url)
- 
-     def canExit(self):
-         return not self.cmd.core.running()

sync-selectapiuse.diff

-# HG changeset patch
-# Date 1366461537 -32400
-# Parent cbf33369116610341a73fb0deb62a889e5026d16
-sync: use setUrl() instead of setEditUrl() where appropriate
-
-diff --git a/tortoisehg/hgqt/sync.py b/tortoisehg/hgqt/sync.py
---- a/tortoisehg/hgqt/sync.py
-+++ b/tortoisehg/hgqt/sync.py
-@@ -243,11 +243,10 @@ class SyncWidget(QWidget, qtlib.TaskWidg
-         self.cmd = cmd
- 
-         self.reload()
-+        self.curalias = None
-         if 'default' in self.paths:
--            self.curalias = 'default'
--            self.setEditUrl(hglib.tounicode(self.paths['default']))
-+            self.setUrl('default')
-         else:
--            self.curalias = None
-             self.setEditUrl('')
- 
-     def canswitch(self):
-@@ -436,7 +435,7 @@ class SyncWidget(QWidget, qtlib.TaskWidg
-             return
-         if url.startswith('file:///'):
-             url = url[8:]
--        self.setEditUrl(url)
-+        self.setUrl(url)
- 
-     def canExit(self):
-         return not self.cmd.core.running()

sync-seletcapi.diff

-# HG changeset patch
-# Date 1366461158 -32400
-# Parent ccdc22202afd244678cf5238c9b3b18423438ba3
-sync: add method to change current url
-
-To test the method, this also adds optional `PEER` parameter to `thg sync`
-command. It may be usable for third-party front-end of TortoiseHg.
-
-diff --git a/tortoisehg/hgqt/run.py b/tortoisehg/hgqt/run.py
---- a/tortoisehg/hgqt/run.py
-+++ b/tortoisehg/hgqt/run.py
-@@ -1146,7 +1146,7 @@ table = {
-           ('', 'webdir-conf', '',
-            _('name of the hgweb config file (DEPRECATED)'))],
-          _('thg serve [--web-conf FILE]')),
--    "^sync|synchronize": (sync, [], _('thg sync')),
-+    "^sync|synchronize": (sync, [], _('thg sync [PEER]')),
-     "^status|st": (status,
-          [('c', 'clean', False, _('show files without changes')),
-           ('i', 'ignored', False, _('show ignored files'))],
-diff --git a/tortoisehg/hgqt/sync.py b/tortoisehg/hgqt/sync.py
---- a/tortoisehg/hgqt/sync.py
-+++ b/tortoisehg/hgqt/sync.py
-@@ -404,6 +404,19 @@ class SyncWidget(QWidget, qtlib.TaskWidg
-         self.urlentry.setText(newurl)
-         self.refreshUrl()
- 
-+    def setUrl(self, newurl):
-+        'Set the current URL to the given alias or URL [unicode]'
-+        model = self.hgrctv.model()
-+        for col in (0, 1):  # search known (alias, url)
-+            ixs = model.match(model.index(0, col), Qt.DisplayRole, newurl, 1,
-+                              Qt.MatchFixedString | Qt.MatchCaseSensitive)
-+            if ixs:
-+                self.hgrctv.setCurrentIndex(ixs[0])
-+                self.pathSelected(ixs[0])  # in case of row not changed
-+                return
-+
-+        self.setEditUrl(newurl)
-+
-     def dragEnterEvent(self, event):
-         data = event.mimeData()
-         if data.hasUrls() or data.hasText():
-@@ -1576,4 +1589,7 @@ class OptionsDialog(QDialog):
- 
- def run(ui, *pats, **opts):
-     repo = thgrepo.repository(ui, path=paths.find_root())
--    return SyncWidget(repo, None, **opts)
-+    w = SyncWidget(repo, None, **opts)
-+    if pats:
-+        w.setUrl(hglib.tounicode(pats[0]))
-+    return w

sync-seturlrename.diff

-# HG changeset patch
-# Date 1366460380 -32400
-# Parent 15fab673a2c305bc86a1aac4483cab7a3f96a6b5
-sync: rename setUrl() to setEditUrl() after QComboBox' method
-
-I'll add setUrl() which also changes the current index of the list.
-
-diff --git a/tortoisehg/hgqt/sync.py b/tortoisehg/hgqt/sync.py
---- a/tortoisehg/hgqt/sync.py
-+++ b/tortoisehg/hgqt/sync.py
-@@ -245,10 +245,10 @@ class SyncWidget(QWidget, qtlib.TaskWidg
-         self.reload()
-         if 'default' in self.paths:
-             self.curalias = 'default'
--            self.setUrl(self.paths['default'])
-+            self.setEditUrl(self.paths['default'])
-         else:
-             self.curalias = None
--            self.setUrl('')
-+            self.setEditUrl('')
- 
-     def canswitch(self):
-         return not self.targetcheckbox.isChecked()
-@@ -391,9 +391,9 @@ class SyncWidget(QWidget, qtlib.TaskWidg
-         alias = aliasindex.data(Qt.DisplayRole).toString()
-         self.curalias = hglib.fromunicode(alias)
-         path = index.model().realUrl(index)
--        self.setUrl(path)
-+        self.setEditUrl(path)
- 
--    def setUrl(self, newurl):
-+    def setEditUrl(self, newurl):
-         'User has selected a new URL: newurl is expected in local encoding'
-         self.urlentry.setText(newurl)
-         self.refreshUrl()
-@@ -426,7 +426,7 @@ class SyncWidget(QWidget, qtlib.TaskWidg
-             return
-         if lurl.startswith('file:///'):
-             lurl = lurl[8:]
--        self.setUrl(lurl)
-+        self.setEditUrl(lurl)
- 
-     def canExit(self):
-         return not self.cmd.core.running()
-@@ -488,7 +488,7 @@ class SyncWidget(QWidget, qtlib.TaskWidg
-         dlg.setWindowModality(Qt.WindowModal)
-         if dlg.exec_() == QDialog.Accepted:
-             self.curalias = hglib.fromunicode(dlg.aliasentry.text())
--            self.setUrl(hglib.fromunicode(dlg.urlentry.text()))
-+            self.setEditUrl(hglib.fromunicode(dlg.urlentry.text()))
-             self.reload()
- 
-     def removeurl(self):
-@@ -620,7 +620,7 @@ class SyncWidget(QWidget, qtlib.TaskWidg
-                               'this host and inside this URL.  Remove '
-                               'authentication info from this URL?'),
-                             parent=self):
--                            self.setUrl(cleanurl)
-+                            self.setEditUrl(cleanurl)
-                             self.saveclicked()
- 
-         safeurl = util.hidepassword(lurl)
-@@ -669,11 +669,11 @@ class SyncWidget(QWidget, qtlib.TaskWidg
-             return
-         save = self.currentUrl()
-         orev = self.opts.get('rev')
--        self.setUrl(bundle)
-+        self.setEditUrl(bundle)
-         if rev is not None:
-             self.opts['rev'] = str(rev)
-         self.pullclicked(bsource)
--        self.setUrl(save)
-+        self.setEditUrl(save)
-         self.opts['rev'] = orev
- 
-     ##

sync-seturluni.diff

-# HG changeset patch
-# Date 1366460642 -32400
-# Parent 19da3065876fa1f7c344870c20eaf77610019815
-sync: fix unicode handling of setEditUrl()
-
-Unlike the original docstring, it expects unicode or QString.
-
-diff --git a/tortoisehg/hgqt/sync.py b/tortoisehg/hgqt/sync.py
---- a/tortoisehg/hgqt/sync.py
-+++ b/tortoisehg/hgqt/sync.py
-@@ -245,7 +245,7 @@ class SyncWidget(QWidget, qtlib.TaskWidg
-         self.reload()
-         if 'default' in self.paths:
-             self.curalias = 'default'
--            self.setEditUrl(self.paths['default'])
-+            self.setEditUrl(hglib.tounicode(self.paths['default']))
-         else:
-             self.curalias = None
-             self.setEditUrl('')
-@@ -391,10 +391,10 @@ class SyncWidget(QWidget, qtlib.TaskWidg
-         alias = aliasindex.data(Qt.DisplayRole).toString()
-         self.curalias = hglib.fromunicode(alias)
-         path = index.model().realUrl(index)
--        self.setEditUrl(path)
-+        self.setEditUrl(hglib.tounicode(path))
- 
-     def setEditUrl(self, newurl):
--        'User has selected a new URL: newurl is expected in local encoding'
-+        'Set the current URL without changing the alias [unicode]'
-         self.urlentry.setText(newurl)
-         self.refreshUrl()
- 
-@@ -426,7 +426,7 @@ class SyncWidget(QWidget, qtlib.TaskWidg
-             return
-         if lurl.startswith('file:///'):
-             lurl = lurl[8:]
--        self.setEditUrl(lurl)
-+        self.setEditUrl(hglib.tounicode(lurl))
- 
-     def canExit(self):
-         return not self.cmd.core.running()
-@@ -488,7 +488,7 @@ class SyncWidget(QWidget, qtlib.TaskWidg
-         dlg.setWindowModality(Qt.WindowModal)
-         if dlg.exec_() == QDialog.Accepted:
-             self.curalias = hglib.fromunicode(dlg.aliasentry.text())
--            self.setEditUrl(hglib.fromunicode(dlg.urlentry.text()))
-+            self.setEditUrl(dlg.urlentry.text())
-             self.reload()
- 
-     def removeurl(self):
-@@ -620,7 +620,7 @@ class SyncWidget(QWidget, qtlib.TaskWidg
-                               'this host and inside this URL.  Remove '
-                               'authentication info from this URL?'),
-                             parent=self):
--                            self.setEditUrl(cleanurl)
-+                            self.setEditUrl(hglib.tounicode(cleanurl))
-                             self.saveclicked()
- 
-         safeurl = util.hidepassword(lurl)
-@@ -669,7 +669,7 @@ class SyncWidget(QWidget, qtlib.TaskWidg
-             return
-         save = self.currentUrl()
-         orev = self.opts.get('rev')
--        self.setEditUrl(bundle)
-+        self.setEditUrl(hglib.tounicode(bundle))
-         if rev is not None:
-             self.opts['rev'] = str(rev)
-         self.pullclicked(bsource)

sync-urlaftersave.diff

-# HG changeset patch
-# Date 1366524612 -32400
-# Parent 6c4a26ff71af90627aaa92b68b453d17db656283
-sync: restore current row after reload
-
-reload() will recreate the paths model, so the current row is reset to -1.
-
-With this change, reload() will also updates the urlentry, so editurl()
-does not need to call setEditUrl().
-
-diff --git a/tortoisehg/hgqt/sync.py b/tortoisehg/hgqt/sync.py
---- a/tortoisehg/hgqt/sync.py
-+++ b/tortoisehg/hgqt/sync.py
-@@ -242,8 +242,8 @@ class SyncWidget(QWidget, qtlib.TaskWidg
-         cmd.setVisible(False)
-         self.cmd = cmd
- 
-+        self.curalias = None
-         self.reload()
--        self.curalias = None
-         if 'default' in self.paths:
-             self.setUrl('default')
-         else:
-@@ -365,6 +365,10 @@ class SyncWidget(QWidget, qtlib.TaskWidg
-         sm = self.reltv.selectionModel()
-         sm.currentRowChanged.connect(self.pathSelected)
- 
-+        # restore the current alias and its url
-+        if self.curalias in self.paths:
-+            self.setUrl(hglib.tounicode(self.curalias))
-+
-     def currentUrl(self):
-         return unicode(self.urlentry.text())
- 
-@@ -497,7 +501,6 @@ class SyncWidget(QWidget, qtlib.TaskWidg
-         dlg.setWindowModality(Qt.WindowModal)
-         if dlg.exec_() == QDialog.Accepted:
-             self.curalias = hglib.fromunicode(dlg.aliasentry.text())
--            self.setEditUrl(dlg.urlentry.text())
-             self.reload()
- 
-     def removeurl(self):

urltoolbarcombo.patch

-# HG changeset patch
-# User Steve Borho <steve@borho.org>
-# Date 1363486759 18000
-#      Sat Mar 16 21:19:19 2013 -0500
-# Node ID a463c310f95e0f25424d1fa13445dc5b86cc203f
-# Parent a9df15d891bf2a3368e4bf44f6fb1e384bc3c561
-workbench: add an URL combo (incomplete)
-
-The toolbar buttons do not use the combo URLs, and it isn't remembering the
-URL you had selected when you switch to another repo and back.  I just want
-feedback on the user interface
-
-diff --git a/tortoisehg/hgqt/workbench.py b/tortoisehg/hgqt/workbench.py
---- a/tortoisehg/hgqt/workbench.py
-+++ b/tortoisehg/hgqt/workbench.py
-@@ -363,6 +363,8 @@ class Workbench(QMainWindow):
-         newaction(_('Pull'), self._repofwd('pull'), icon='hg-pull',
-                   tooltip=_('Pull incoming changes from selected URL'),
-                   enabled='repoopen', toolbar='sync')
-+        self.urlCombo = QComboBox(self)
-+        self.synctbar.addWidget(self.urlCombo)
-         newaction(_('Outgoing'), self._repofwd('outgoing'), icon='hg-outgoing',
-                   tooltip=_('Detect outgoing changes to selected URL'),
-                   enabled='repoopen', toolbar='sync')
-@@ -372,6 +374,24 @@ class Workbench(QMainWindow):
- 
-         self.updateMenu()
- 
-+    def _setupUrlCombo(self, repo):
-+        'repository has been switched, fill urlCombo with URLs'
-+        aliases = [alias for alias, path in repo.ui.configitems('paths')]
-+        if 'default' in aliases:
-+            aliases.remove('default')
-+            aliases.insert(0, 'default')
-+        for a in aliases[:]:
-+            if a + '-push' in aliases:
-+                # add foo,foo-push entry to top of menu
-+                aliases.insert(0, u'\u2193 %s | %s-push \u2191' % (a,a))
-+                # move foo,foo-push individual entries to bottom
-+                aliases.remove(a)
-+                aliases.remove(a + '-push')
-+                aliases.append(a)
-+                aliases.append(a + '-push')
-+        self.urlCombo.clear()
-+        self.urlCombo.addItems(aliases)
-+
-     def _setupCustomTools(self, ui):
-         tools, toollist = hglib.tortoisehgtools(ui,
-             selectedlocation='workbench.custom-toolbar')
-@@ -746,6 +766,7 @@ class Workbench(QMainWindow):
-                 root = w.repo.root
-                 self.activeRepoChanged.emit(hglib.tounicode(root))
-                 self._setupCustomTools(w.repo.ui)
-+                self._setupUrlCombo(w.repo)
-         else:
-             self.activeRepoChanged.emit("")
-         repo = w and w.repo or None

wb-refresh.diff

-# HG changeset patch
-# Date 1366529471 -32400
-# Parent 5df95c08b19aa2d8cffd7b85fd234c5af847dac1
-workbench: rebuild URL combo by refresh action
-
-This provides the last option to keep the url combo sync with the sync widget.
-
-Tested compatibility with PyQt 4.6.2 (CentOS 6).
-
-diff --git a/tortoisehg/hgqt/workbench.py b/tortoisehg/hgqt/workbench.py
---- a/tortoisehg/hgqt/workbench.py
-+++ b/tortoisehg/hgqt/workbench.py
-@@ -265,7 +265,7 @@ class Workbench(QMainWindow):
- 
-         newseparator(menu='view')
- 
--        newaction(_("&Refresh"), self._repofwd('reload'), icon='view-refresh',
-+        newaction(_("&Refresh"), self.refresh, icon='view-refresh',
-                   shortcut='Refresh', enabled='repoopen',
-                   menu='view', toolbar='edit',
-                   tooltip=_('Refresh current repository'))
-@@ -884,6 +884,15 @@ class Workbench(QMainWindow):
- 
-         return forwarder
- 
-+    # no @pyqtSlot(); as of PyQt 4.9.3, it makes self.sender() wrong through
-+    # the following path: reload -> titleChanged -> _updateRepoTabTitle,
-+    # if _updateRepoTabTitle is not decorated as @pyqtSlot.
-+    def refresh(self):
-+        w = self.repoTabsWidget.currentWidget()
-+        if w:
-+            getattr(w, 'reload')()
-+            self._setupUrlCombo(w.repo)
-+
-     @pyqtSlot(QAction)
-     def _runSyncAction(self, action):
-         w = self.repoTabsWidget.currentWidget()

wb-synchandler-url.diff

-# HG changeset patch
-# Date 1366462238 -32400
-# Parent 1596772bf9c6f52e74546bafd206fa9c89bd1702
-workbench: apply selected url before running sync operation from toolbar
-
-diff --git a/tortoisehg/hgqt/repowidget.py b/tortoisehg/hgqt/repowidget.py
---- a/tortoisehg/hgqt/repowidget.py
-+++ b/tortoisehg/hgqt/repowidget.py
-@@ -1208,6 +1208,11 @@ class RepoWidget(QWidget):
-         self.repoview.saveSettings(s)
-         return True
- 
-+    def setSyncUrl(self, url):
-+        """Change the current peer-repo url of the sync widget; url may be
-+        a symbolic name defined in [paths] section"""
-+        self.syncDemand.get().setUrl(url)
-+
-     def incoming(self):
-         self.syncDemand.get().incoming()
- 
-diff --git a/tortoisehg/hgqt/workbench.py b/tortoisehg/hgqt/workbench.py
---- a/tortoisehg/hgqt/workbench.py
-+++ b/tortoisehg/hgqt/workbench.py
-@@ -400,6 +400,14 @@ class Workbench(QMainWindow):
-             else:
-                 self.urlCombo.addItem(a, (a, a))
- 
-+    def _syncUrlFor(self, op):
-+        """Current URL alias for the given sync operation"""
-+        urlindex = self.urlCombo.currentIndex()
-+        if urlindex < 0:
-+            return
-+        opindex = {'incoming': 0, 'pull': 0, 'outgoing': 1, 'push': 1}[op]
-+        return self.urlCombo.itemData(urlindex).toPyObject()[opindex]
-+
-     def _setupCustomTools(self, ui):
-         tools, toollist = hglib.tortoisehgtools(ui,
-             selectedlocation='workbench.custom-toolbar')
-@@ -881,6 +889,7 @@ class Workbench(QMainWindow):
-         w = self.repoTabsWidget.currentWidget()
-         if w:
-             op = str(action.data().toString())
-+            w.setSyncUrl(self._syncUrlFor(op) or '')
-             getattr(w, op)()
- 
-     def serve(self):

wb-synchandler.diff

-# HG changeset patch
-# Date 1366461843 -32400
-# Parent c45303ca97a9ad0144060216fe419d85b2d263e5
-workbench: add stub to switch peer URL before sync operation
-
-diff --git a/tortoisehg/hgqt/workbench.py b/tortoisehg/hgqt/workbench.py
---- a/tortoisehg/hgqt/workbench.py
-+++ b/tortoisehg/hgqt/workbench.py
-@@ -357,20 +357,21 @@ class Workbench(QMainWindow):
-         menu.addAction(self.customtbar.toggleViewAction())
-         self.menuView.addMenu(menu)
- 
--        newaction(_('Incoming'), self._repofwd('incoming'), icon='hg-incoming',
-+        newaction(_('Incoming'), data='incoming', icon='hg-incoming',
-                   tooltip=_('Check for incoming changes from selected URL'),
-                   enabled='repoopen', toolbar='sync')
--        newaction(_('Pull'), self._repofwd('pull'), icon='hg-pull',
-+        newaction(_('Pull'), data='pull', icon='hg-pull',
-                   tooltip=_('Pull incoming changes from selected URL'),
-                   enabled='repoopen', toolbar='sync')
--        newaction(_('Outgoing'), self._repofwd('outgoing'), icon='hg-outgoing',
-+        newaction(_('Outgoing'), data='outgoing', icon='hg-outgoing',
-                   tooltip=_('Detect outgoing changes to selected URL'),
-                   enabled='repoopen', toolbar='sync')
--        newaction(_('Push'), self._repofwd('push'), icon='hg-push',
-+        newaction(_('Push'), data='push', icon='hg-push',
-                   tooltip=_('Push outgoing changes to selected URL'),
-                   enabled='repoopen', toolbar='sync')
-         self.urlCombo = QComboBox(self)
-         self.synctbar.addWidget(self.urlCombo)
-+        self.synctbar.actionTriggered.connect(self._runSyncAction)
- 
-         self.updateMenu()
- 
-@@ -869,6 +870,13 @@ class Workbench(QMainWindow):
- 
-         return forwarder
- 
-+    @pyqtSlot(QAction)
-+    def _runSyncAction(self, action):
-+        w = self.repoTabsWidget.currentWidget()
-+        if w:
-+            op = str(action.data().toString())
-+            getattr(w, op)()
-+
-     def serve(self):
-         w = self.repoTabsWidget.currentWidget()
-         if w:

wb-urlcombo-move.diff

-# HG changeset patch
-# Date 1366460041 -32400
-# Parent a351f59c0a1676652470f46fe2fb03a902bf0432
-workbench: move URL combo to right side for better look and feel
-
-diff --git a/tortoisehg/hgqt/workbench.py b/tortoisehg/hgqt/workbench.py
---- a/tortoisehg/hgqt/workbench.py
-+++ b/tortoisehg/hgqt/workbench.py
-@@ -363,14 +363,14 @@ class Workbench(QMainWindow):
-         newaction(_('Pull'), self._repofwd('pull'), icon='hg-pull',
-                   tooltip=_('Pull incoming changes from selected URL'),
-                   enabled='repoopen', toolbar='sync')
--        self.urlCombo = QComboBox(self)
--        self.synctbar.addWidget(self.urlCombo)
-         newaction(_('Outgoing'), self._repofwd('outgoing'), icon='hg-outgoing',
-                   tooltip=_('Detect outgoing changes to selected URL'),
-                   enabled='repoopen', toolbar='sync')
-         newaction(_('Push'), self._repofwd('push'), icon='hg-push',
-                   tooltip=_('Push outgoing changes to selected URL'),
-                   enabled='repoopen', toolbar='sync')
-+        self.urlCombo = QComboBox(self)
-+        self.synctbar.addWidget(self.urlCombo)
- 
-         self.updateMenu()
- 

wb-urlcombo-tuple.diff

-# HG changeset patch
-# Date 1366462087 -32400
-# Parent dbc31e5c0d6c6ea203464c8603d5e47978f68d2d
-workbench: keep pair of push/pull aliases in url combo
-
-diff --git a/tortoisehg/hgqt/workbench.py b/tortoisehg/hgqt/workbench.py
---- a/tortoisehg/hgqt/workbench.py
-+++ b/tortoisehg/hgqt/workbench.py
-@@ -385,14 +385,20 @@ class Workbench(QMainWindow):
-         for a in aliases[:]:
-             if a + '-push' in aliases:
-                 # add foo,foo-push entry to top of menu
--                aliases.insert(0, u'\u2193 %s | %s-push \u2191' % (a,a))
-+                aliases.insert(0, (a, a + '-push'))
-                 # move foo,foo-push individual entries to bottom
-                 aliases.remove(a)
-                 aliases.remove(a + '-push')
-                 aliases.append(a)
-                 aliases.append(a + '-push')
-+
-         self.urlCombo.clear()
--        self.urlCombo.addItems(aliases)
-+        for a in aliases:
-+            # text, (pull-alias, push-alias)
-+            if isinstance(a, tuple):
-+                self.urlCombo.addItem(u'\u2193 %s | %s \u2191' % a, a)
-+            else:
-+                self.urlCombo.addItem(a, (a, a))
- 
-     def _setupCustomTools(self, ui):
-         tools, toollist = hglib.tortoisehgtools(ui,

wb-urlcombo-unicode.diff

-# HG changeset patch
-# Date 1366460045 -32400
-# Parent 5415bc641679a1a01e0948b84b52e7eff3840c63
-workbench: make aliases of URL combo unicode-safe
-
-diff --git a/tortoisehg/hgqt/workbench.py b/tortoisehg/hgqt/workbench.py
---- a/tortoisehg/hgqt/workbench.py
-+++ b/tortoisehg/hgqt/workbench.py
-@@ -376,7 +376,8 @@ class Workbench(QMainWindow):
- 
-     def _setupUrlCombo(self, repo):
-         'repository has been switched, fill urlCombo with URLs'
--        aliases = [alias for alias, path in repo.ui.configitems('paths')]
-+        aliases = [hglib.tounicode(alias)
-+                   for alias, path in repo.ui.configitems('paths')]
-         if 'default' in aliases:
-             aliases.remove('default')
-             aliases.insert(0, 'default')