[PATCH 0 of 2 ] Small repowidget context menu improvements

18 views
Skip to first unread message

Angel Ezquerra

unread,
Apr 29, 2012, 4:03:29 PM4/29/12
to thg...@googlegroups.com
A couple of small improvements to the repowidget context menu.
I think these are pretty harmless, but they make the menu a little simpler and easier to understand.

Angel Ezquerra

unread,
Apr 29, 2012, 4:03:30 PM4/29/12
to thg...@googlegroups.com
# HG changeset patch
# User Angel Ezquerra <angel.e...@gmail.com>
# Date 1335729447 -7200
# Branch stable
# Node ID 1336fb91040a9a1e1533ca193708c60c8fc02431
# Parent adcb3cf0d5d45b6e730b354ddf4a02045f38c172
repowidget: remove 'Browse at revision...' from context menu

The existing 'Browse at revision...' entry on the revision context menu is
redundant since you can already open the manifest by clicking on the manifest
button on the widget toolbar.

Removing this command simplifies the revision context menu a little, which I
think is a good idea, since it is getting a little too complex.

diff --git a/tortoisehg/hgqt/repowidget.py b/tortoisehg/hgqt/repowidget.py
--- a/tortoisehg/hgqt/repowidget.py
+++ b/tortoisehg/hgqt/repowidget.py
@@ -1215,8 +1215,6 @@
self.visualDiffRevision)
entry(menu, None, isrev, _('Diff to local...'), 'ldiff',
self.visualDiffToLocal)
- entry(menu, None, isctx, _('Browse at rev...'), 'hg-annotate',
- self.manifestRevision)
entry(menu)
entry(menu, None, fixed, _('Merge with local...'), 'hg-merge',
self.mergeWithRevision)
@@ -1681,9 +1679,6 @@
self.syncDemand.forward('push', False,
branch=self.repo[self.rev].branch())

- def manifestRevision(self):
- run.manifest(self.repo.ui, repo=self.repo, rev=self.rev)
-
def mergeWithRevision(self):
dlg = merge.MergeDialog(self.rev, self.repo, self)
dlg.exec_()

Angel Ezquerra

unread,
Apr 29, 2012, 4:03:31 PM4/29/12
to thg...@googlegroups.com
# HG changeset patch
# User Angel Ezquerra <angel.e...@gmail.com>
# Date 1335729705 -7200
# Branch stable
# Node ID 651d2e37744e345bf5edcac645834761fcc0773a
# Parent 1336fb91040a9a1e1533ca193708c60c8fc02431
repowidget: rename 'Visual diff' to 'Diff to parent'

Currently there are two 'diff' entries on the revision context menu:
'Visual diff' and 'Diff to local'.

Both do basically the same, except tha tone diffs to one of the revision parents
while the other diffs to the working directory.

This change makes the context menu entries more consistent and it also makes it
easier to tell which does which.

diff --git a/tortoisehg/hgqt/repowidget.py b/tortoisehg/hgqt/repowidget.py
--- a/tortoisehg/hgqt/repowidget.py
+++ b/tortoisehg/hgqt/repowidget.py
@@ -1211,7 +1211,7 @@
entry(menu, None, isrev, _('Update...'), 'hg-update',
self.updateToRevision)
entry(menu)
- entry(menu, None, isctx, _('Visual diff...'), 'visualdiff',
+ entry(menu, None, isctx, _('Diff to parent...'), 'visualdiff',

Yuya Nishihara

unread,
May 2, 2012, 5:09:29 AM5/2/12
to thg...@googlegroups.com
On 04/30/2012 05:03 AM, Angel Ezquerra wrote:
> # HG changeset patch
> # User Angel Ezquerra<angel.e...@gmail.com>
> # Date 1335729447 -7200
> # Branch stable
> # Node ID 1336fb91040a9a1e1533ca193708c60c8fc02431
> # Parent adcb3cf0d5d45b6e730b354ddf4a02045f38c172
> repowidget: remove 'Browse at revision...' from context menu
>
> The existing 'Browse at revision...' entry on the revision context menu is
> redundant since you can already open the manifest by clicking on the manifest
> button on the widget toolbar.
>
> Removing this command simplifies the revision context menu a little, which I
> think is a good idea, since it is getting a little too complex.
>
> diff --git a/tortoisehg/hgqt/repowidget.py b/tortoisehg/hgqt/repowidget.py
> --- a/tortoisehg/hgqt/repowidget.py
> +++ b/tortoisehg/hgqt/repowidget.py
> @@ -1215,8 +1215,6 @@
> self.visualDiffRevision)
> entry(menu, None, isrev, _('Diff to local...'), 'ldiff',
> self.visualDiffToLocal)
> - entry(menu, None, isctx, _('Browse at rev...'), 'hg-annotate',
> - self.manifestRevision)

+1

I think 'Browse at rev...' isn't necessary here, too.
Any opinions?

Yuya Nishihara

unread,
May 2, 2012, 5:10:54 AM5/2/12
to thg...@googlegroups.com
On 04/30/2012 05:03 AM, Angel Ezquerra wrote:
There are several 'Visual diff...' or 'Visual Diff...'. They should be updated
at one time.

Also, even though we don't have strict string freeze, I want to postpone this
change because it will affect many non-English users.

Regards,

Angel Ezquerra

unread,
May 2, 2012, 6:09:55 AM5/2/12
to thg...@googlegroups.com
OK, I agree. I'll resend a patch with all references changed, and it
can be applied after the release.

Angel

Angel Ezquerra

unread,
May 3, 2012, 11:19:27 AM5/3/12
to thg...@googlegroups.com
Steve,

are you ok with this one?

Cheers,

Angel

Steve Borho

unread,
May 3, 2012, 11:27:50 AM5/3/12
to thg...@googlegroups.com
Yes, go ahead and push it.

BTW: I uploaded new packages built from last evening's stable tip

--
Steve Borho

Angel Ezquerra

unread,
May 3, 2012, 12:06:30 PM5/3/12
to thg...@googlegroups.com
Cool. I've just pushed it as 2346bb55d022120da05cb3435a157ce219dbac6f.

> BTW: I uploaded new packages built from last evening's stable tip

Nice! I'll give them a try.

Cheers,

Angel

Yuya Nishihara

unread,
Jun 20, 2012, 12:00:09 PM6/20/12
to thg...@googlegroups.com
On Sun, 29 Apr 2012 22:03:30 +0200, Angel Ezquerra wrote:
> # HG changeset patch
> # User Angel Ezquerra <angel.e...@gmail.com>
> # Date 1335729447 -7200
> # Branch stable
> # Node ID 1336fb91040a9a1e1533ca193708c60c8fc02431
> # Parent adcb3cf0d5d45b6e730b354ddf4a02045f38c172
> repowidget: remove 'Browse at revision...' from context menu
>
> The existing 'Browse at revision...' entry on the revision context
> menu is redundant since you can already open the manifest by clicking
> on the manifest button on the widget toolbar.

Hi, I'm thinking to backout this change, because it appears to break
some use case [1].

[1]: https://bitbucket.org/tortoisehg/thg/issue/1920/

IMO, 'Browse at revision' (i.e. open manifest dialog) should be
implemented differently [2], but for now, the easiest way is to restore
this context menu action.

[2]: https://bitbucket.org/tortoisehg/thg/issue/1944/ for example

Any thoughts?

Steve Borho

unread,
Jun 20, 2012, 12:20:16 PM6/20/12
to thg...@googlegroups.com
Sure

--
Steve

Angel Ezquerra

unread,
Jun 20, 2012, 3:08:24 PM6/20/12
to thg...@googlegroups.com

As you said I also think that the context menu, particularly the revision details one is not the right place for this command.

Mauve we should add an "open in dialog" button that was shown both on the manifest and the revision details widgets, which would open the corresponding stand alone dialog?

Angel

Yuya Nishihara

unread,
Jun 21, 2012, 10:10:01 AM6/21/12
to thg...@googlegroups.com
I thought about it, and it is a possible approach, but it feels like
a bit different. When I want to open manifest dialog, I'll just want to
open it directly, not via manifest tab.

I'll restore 'Browse at revision' action for now. And when we get a
good alternative, we can remove it with no hesitation.

Regards,
Reply all
Reply to author
Forward
0 new messages