Patchwork [STABLE] revset: document the regular expression support for tag(name)

login
register
mail settings
Submitter Matt Harbison
Date March 25, 2014, 1:57 a.m.
Message ID <c57c9cece64514e09a5f.1395712624@Envy>
Download mbox | patch
Permalink /patch/4045/
State Accepted
Commit c57c9cece64514e09a5f58b8803c01a6c420e286
Headers show

Comments

Matt Harbison - March 25, 2014, 1:57 a.m.
# HG changeset patch
# User Matt Harbison <matt_harbison@yahoo.com>
# Date 1395710860 14400
#      Mon Mar 24 21:27:40 2014 -0400
# Branch stable
# Node ID c57c9cece64514e09a5f58b8803c01a6c420e286
# Parent  e5641536e4d509b2dc5fab783344f86ea61b17c2
revset: document the regular expression support for tag(name)

This has been supported since 20f55613fb2a, in 2.3.
David Soria Parra - March 25, 2014, 4:43 a.m.
Matt Harbison <matt_harbison@yahoo.com> writes:

> # HG changeset patch
> # User Matt Harbison <matt_harbison@yahoo.com>
> # Date 1395710860 14400
> #      Mon Mar 24 21:27:40 2014 -0400
> # Branch stable
> # Node ID c57c9cece64514e09a5f58b8803c01a6c420e286
> # Parent  e5641536e4d509b2dc5fab783344f86ea61b17c2
> revset: document the regular expression support for tag(name)
>
> This has been supported since 20f55613fb2a, in 2.3.
>
> diff --git a/mercurial/revset.py b/mercurial/revset.py
> --- a/mercurial/revset.py
> +++ b/mercurial/revset.py
> @@ -1500,6 +1500,10 @@
>  def tag(repo, subset, x):
>      """``tag([name])``
>      The specified tag by name, or all tagged revisions if no name is given.
> +
> +    If `name` starts with `re:`, the remainder of the name is treated as
> +    a regular expression. To match a tag that actually starts with `re:`,
> +    use the prefix `literal:`.

Thank you. Queued to http://hg.netv6.net/hg-fb-reviewers

Patch

diff --git a/mercurial/revset.py b/mercurial/revset.py
--- a/mercurial/revset.py
+++ b/mercurial/revset.py
@@ -1500,6 +1500,10 @@ 
 def tag(repo, subset, x):
     """``tag([name])``
     The specified tag by name, or all tagged revisions if no name is given.
+
+    If `name` starts with `re:`, the remainder of the name is treated as
+    a regular expression. To match a tag that actually starts with `re:`,
+    use the prefix `literal:`.
     """
     # i18n: "tag" is a keyword
     args = getargs(x, 0, 1, _("tag takes one or no arguments"))