[PATCH 2 of 2 STABLE V2] revsets: add docs for '%' operator

timeless timeless at gmail.com
Wed Apr 27 20:45:29 EDT 2016


We currently have:

"not x"
  Changesets not in x. Short form is "! x".

"author(string)"
  Alias for "user(string)".

"first(set, [n])"
  An alias for limit().

"follow([pattern])"
  An alias for "::." (ancestors of the working directory's first parent).
  If pattern is specified, the histories of files matching given pattern
  is followed, including copies.

"x::y"
  A DAG range, meaning all changesets that are descendants of x and
  ancestors of y, including x and y themselves. If the first endpoint is
  left out, this is equivalent to "ancestors(y)", if the second is left
  out it is equivalent to "descendants(x)".

  An alternative syntax is "x..y".

"x or y"
  The union of changesets in x and y. There are two alternative short
  forms: "x | y" and "x + y".

"x^"
  Equivalent to "x^1", the first parent of each changeset in x.

They aren't entirely consistent. But, Most start with "Alias"/"An
alias" or use "short form" as opposed to "shorthand"

On Wed, Apr 27, 2016 at 5:16 PM, Sean Farley <sean at farley.io> wrote:
> # HG changeset patch
> # User Sean Farley <sean at farley.io>
> # Date 1461790938 25200
> #      Wed Apr 27 14:02:18 2016 -0700
> # Branch stable
> # Node ID afb8cf4736582dfbab2a19624c859a2f7855fb44
> # Parent  c94d5bcf19875b7b1b04ade9ad2bfb04f80ef1ae
> # EXP-Topic doc-only-revset
> revsets: add docs for '%' operator
>
> diff --git a/mercurial/help/revsets.txt b/mercurial/help/revsets.txt
> --- a/mercurial/help/revsets.txt
> +++ b/mercurial/help/revsets.txt
> @@ -40,10 +40,15 @@ These are the supported infix operators:
>    forms: ``x | y`` and ``x + y``.
>
>  ``x - y``
>    Changesets in x but not in y.
>
> +``x % y``
> +  Changesets that are ancestors of x but not ancestors of y (i.e. ::x - ::y).
> +  This is shorthand notation for ``only(x, y)`` (see below). The second
> +  argument is optional and, if left out, is equivalent to ``only(x)``.
> +
>  ``x^n``
>    The nth parent of x, n == 0, 1, or 2.
>    For n == 0, x; for n == 1, the first parent of each changeset in x;
>    for n == 2, the second parent of changeset in x.
>
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


More information about the Mercurial-devel mailing list