On Mon, Nov 14, 2011 at 9:24 AM, Sune Foldager <[email protected]> wrote:
> # HG changeset patch
> # User Sune Foldager <[email protected]>
> # Date 1321283240 -3600
> # Node ID 114a7eb847ea544fdfd8d5c218b72be0b07804ee
> # Parent 7c77449be71d072e2ab468abf92c28a5b2695836
> workbench: add "Goto revision" command
For a minute there I thought you were re-implementing QGoto.
There's a somewhat long story about this feature that is at this point
probably uninteresting. I see two down-sides with this patch:
1. CTRL+G is reserved by Qt for some platforms
2. As soon as this feature exists, people are going to want a
QCompleter with tags, branches, and bookmarks.
> diff --git a/tortoisehg/hgqt/workbench.py b/tortoisehg/hgqt/workbench.py
> --- a/tortoisehg/hgqt/workbench.py
> +++ b/tortoisehg/hgqt/workbench.py
> @@ -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+G',
> + tooltip=_('Go to a specific revision'))
>
> newaction(_("Web Server..."), self.serve, enabled='repoopen',
> menu='repository')
> @@ -724,6 +727,13 @@
> if w:
> w.repoview.model().loadall()
>
> + def gotorev(self):
> + rev, ok = QInputDialog.getText(self, "Goto revision",
> + "Enter revision identifier")
> + w = self.repoTabsWidget.currentWidget()
> + if ok and w:
> + w.repoview.goto(rev)
> +
> def newRepository(self):
> """ Run init dialog """
> from tortoisehg.hgqt.hginit import InitDialog
>
> ------------------------------------------------------------------------------
> RSA(R) Conference 2012
> Save $700 by Nov 18
> Register now
> http://p.sf.net/sfu/rsa-sfdev2dev1
> _______________________________________________
> Tortoisehg-develop mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/tortoisehg-develop
>
--
Steve Borho
------------------------------------------------------------------------------
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1
_______________________________________________
Tortoisehg-develop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tortoisehg-develop