1. Graham Helliwell
  2. thg


Graham Helliwell  committed 575c4a2

Temporary changes for demo

  • Participants
  • Parent commits e786c4b
  • Branches default

Comments (0)

Files changed (1)

File tortoisehg/hgqt/workbench.py

View file
 import os
 import sys
 import getpass # used to get the username on the workbench server
-from mercurial import ui, util
+from mercurial import ui, util, dispatch
+from mercurial.dispatch import request
 from mercurial.error import RepoError
 from tortoisehg.util import paths, hglib
                   tooltip=_('Push outgoing changes to selected URL'),
                   enabled='repoopen', toolbar='sync')
+        #Todo: Make this conditional/general
+        newaction(_('Sync'), self._sync, icon='hg-sync',
+                tooltip=_('Sync changes to selected URL'),
+                enabled='repoopen', toolbar='sync')
+    def _sync(self):
+        req = request(['sync'], ui=self.ui, repo=self.repoTabsWidget.currentWidget().repo)
+        dispatch.dispatch(req)
     def _setupCustomTools(self, ui):
         tools, toollist = hglib.tortoisehgtools(ui,