[PATCH 0 of 2 ] revsets: add keywords that were added in mercurial 2.2

11 views
Skip to first unread message

Angel Ezquerra

unread,
Apr 28, 2012, 2:22:25 PM4/28/12
to thg...@googlegroups.com
Note that these only make sense if the mercurial version is 2.2 or above.

Should we only show these if mercurial is mercurial 2.2 or above? To do so we'd need to push a recent patch that I sent which adds a way to check the mercurial version as if it were an integer.

Angel Ezquerra

unread,
Apr 28, 2012, 2:22:26 PM4/28/12
to thg...@googlegroups.com
# HG changeset patch
# User Angel Ezquerra <angel.e...@gmail.com>
# Date 1335636744 -7200
# Branch stable
# Node ID ce7925c55e3fa39cb0b377a83ae0c45adffb13c1
# Parent c96ac3e0aaeb008fcb72dbd70421e7a36829ae0b
revsets: add 'matching' keyword to the 'Common sets' list

diff --git a/tortoisehg/hgqt/revset.py b/tortoisehg/hgqt/revset.py
--- a/tortoisehg/hgqt/revset.py
+++ b/tortoisehg/hgqt/revset.py
@@ -51,6 +51,15 @@
'mercurial/hg.1.html#dates">help dates</a>')),
('ancestor(single, single)',
_('Greatest common ancestor of the two changesets.')),
+ ('matching(revset [, ''field(s) to match''])',
+ _('Find revisions that "match" one or more fields of the given set of '
+ 'revisions.\n\n'
+ 'A revision matches another if all the selected fields '
+ '(description, author, branch, date, files, phase, parents, '
+ 'substate, user, summary and/or metadata)\nmatch the corresponding'
+ 'values of those fields on the source revision.\n\n'
+ 'Fields must be separated by spaces. '
+ 'If no field is specified, ''metadata'' will be matched by default.')),
)

_filepatterns = (

Angel Ezquerra

unread,
Apr 28, 2012, 2:22:27 PM4/28/12
to thg...@googlegroups.com
# HG changeset patch
# User Angel Ezquerra <angel.e...@gmail.com>
# Date 1335637023 -7200
# Branch stable
# Node ID cb6330ef213ae7671e806692f3dead760d1fb2a3
# Parent ce7925c55e3fa39cb0b377a83ae0c45adffb13c1
revsets: add 'subrepo' keyword to the 'File pattern sets' list

diff --git a/tortoisehg/hgqt/revset.py b/tortoisehg/hgqt/revset.py
--- a/tortoisehg/hgqt/revset.py
+++ b/tortoisehg/hgqt/revset.py
@@ -75,6 +75,8 @@
_('Changesets which remove files matched by pattern.')),
('contains(pattern)',
_('Changesets containing files matched by pattern.')),
+ ('subrepo(pattern)',
+ _('Changesets containing subrepos matched by pattern.')),
)

_ancestry = (

Yuya Nishihara

unread,
May 2, 2012, 5:36:39 AM5/2/12
to thg...@googlegroups.com
This help message must be short enough for status bar.
I've got segfault. :)

Yuya Nishihara

unread,
May 2, 2012, 5:37:56 AM5/2/12
to thg...@googlegroups.com
On 04/29/2012 03:22 AM, Angel Ezquerra wrote:
I cannot find subrepo() function. Isn't it included in 2.2?

Angel Ezquerra

unread,
May 2, 2012, 6:05:55 AM5/2/12
to thg...@googlegroups.com
Umm, I think that I got confused. What was included is the subrepo
_fileset_ function, not the subrepo _revset_ function.

You can drop this patch for now.

Cheers,

Angel

Angel Ezquerra

unread,
May 2, 2012, 6:09:16 AM5/2/12
to thg...@googlegroups.com
That is weird! Which status bar are you referring to? Is it the bottom
part of the "Revision Set Query" dialog, which shows the info of the
selected keyword?

If that is so, when I tested it that "bottom part" of the dialog grew
automatically to fit the help message. I did not get any segfault or
any other problem...

Angel

Yuya Nishihara

unread,
May 2, 2012, 9:44:43 AM5/2/12
to thg...@googlegroups.com
Yes,

> If that is so, when I tested it that "bottom part" of the dialog grew
> automatically to fit the help message. I did not get any segfault or
> any other problem...

It may be platform issue (i use Linux), but isn't it odd if the status bar shows
multi-line text?

Instead of long help text, use hyperlink like 'date(interval)' function.

Regards,

Angel Ezquerra

unread,
May 2, 2012, 10:06:47 AM5/2/12
to thg...@googlegroups.com
I didn't think of it as a proper status bar. To me it was an
expandable label whose size was adjusted to its contents...

> Instead of long help text, use hyperlink like 'date(interval)' function.

I think having the info right there, without having to open a web
browser would be better. In addition the link can only point to the
'revset' section of the help, not to the help of the matching keyword
itself, AFAIK.

However I can add a hyperlink for now, and see if we can do something
else later on. I'll try to resend the patch today.

Cheers,

Angel

Angel Ezquerra

unread,
May 2, 2012, 3:38:13 PM5/2/12
to thg...@googlegroups.com
OK, I just sent an updated version of this patch which limits the
description message to a single line.

Cheers,

Angel

Yuya Nishihara

unread,
May 2, 2012, 9:39:45 PM5/2/12
to thg...@googlegroups.com
To show the detailed help message, maybe it needs multi-line text box or
something, like settings dialog.
Reply all
Reply to author
Forward
0 new messages