# HG changeset patch
# User Sune Foldager <c...@cyanite.org>
# Date 1321524634 -3600
# Node ID af5661455dc53e9345d11b0955d005ce7317523b
# Parent  7c77449be71d072e2ab468abf92c28a5b2695836
workbench: add "Goto revision" command

A simple text field for now. Entering an unknown revision will display an error
in the status bar.

The Qt.WindowTitleHint is used to prevent displaying a help link on Windows.

diff -r 7c77449be71d -r af5661455dc5 tortoisehg/hgqt/workbench.py
--- a/tortoisehg/hgqt/workbench.py      Wed Nov 09 22:26:06 2011 -0600
+++ b/tortoisehg/hgqt/workbench.py      Thu Nov 17 11:10:34 2011 +0100
@@ -300,6 +300,9 @@
         newaction(_("Load all revisions"), self.loadall,
                   enabled='repoopen', menu='view', shortcut='Shift+Ctrl+A',
                   tooltip=_('Load all revisions into graph'))
+        newaction(_("&Goto revision..."), self.gotorev,
+                  enabled='repoopen', menu='view', shortcut='Ctrl+Shift+G',
+                  tooltip=_('Go to a specific revision'))
 
         newaction(_("Web Server..."), self.serve, enabled='repoopen',
                   menu='repository')
@@ -724,6 +727,14 @@
         if w:
             w.repoview.model().loadall()
 
+    def gotorev(self):
+        rev, ok = QInputDialog.getText(self, "Goto revision",
+                                       "Enter revision identifier",
+                                       flags=Qt.WindowTitleHint)
+        w = self.repoTabsWidget.currentWidget()
+        if ok and w:
+            w.repoview.goto(rev)
+
     def newRepository(self):
         """ Run init dialog """
         from tortoisehg.hgqt.hginit import InitDialog

------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure 
contains a definitive record of customers, application performance, 
security threats, fraudulent activity, and more. Splunk takes this 
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
_______________________________________________
Tortoisehg-develop mailing list
Tortoisehg-develop@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tortoisehg-develop

Reply via email to