[PATCH V2] help: avoid using "$n" parameter in revsetalias example

Matt Mackall mpm at selenic.com
Mon Apr 18 11:31:00 EDT 2016


On Mon, 2016-04-18 at 09:42 -0400, Augie Fackler wrote:
> > 
> > On Apr 18, 2016, at 09:04, Yuya Nishihara <yuya at tcha.org> wrote:
> > 
> > On Fri, 15 Apr 2016 01:02:24 +0900, Yuya Nishihara wrote:
> > > 
> > > # HG changeset patch
> > > # User Yuya Nishihara <yuya at tcha.org>
> > > # Date 1458985856 -32400
> > > #      Sat Mar 26 18:50:56 2016 +0900
> > > # Node ID ddc554c9197094594d9e5fdb40774f04fa25f3a5
> > > # Parent  08da136a18335f677751512883156d3f246bb3c7
> > > help: avoid using "$n" parameter in revsetalias example
> > > 
> > > Because parsing "$n" requires a crafted tokenizer, it exists only for
> > > backward
> > > compatibility (as documented in revset._tokenizealias.) This patch updates
> > > the
> > > examples so that users are encouraged to use symbolic names instead of
> > > "$n"s.
> > > 
> > > I'm going to implement alias expansion in templater, which won't support
> > > "$n"
> > > parameters to make my life easier. Templater is more complicated than
> > > revset
> > > because tokenizer and parser call each other.
> > > 
> > > diff --git a/mercurial/help/revsets.txt b/mercurial/help/revsets.txt
> > > --- a/mercurial/help/revsets.txt
> > > +++ b/mercurial/help/revsets.txt
> > > @@ -66,7 +66,7 @@ existing predicates or other aliases. An
> > >   <alias> = <definition>
> > > 
> > > in the ``revsetalias`` section of a Mercurial configuration file.
> > > Arguments
> > > -of the form `$1`, `$2`, etc. are substituted from the alias into the
> > > +of the form `a1`, `a2`, etc. are substituted from the alias into the
> > > definition.
> > This seems missed and floating in the committed repo. Should I rebase it to
> > stable or drop it?
> That's really up to mpm for now - I'd say let's just take it, but we could
> also just do it during the start of the 3.9 cycle.

I'll move it to stable. I'm ok with small doc improvements on stable, but I'd
like to avoid a significant amount of churn there.

-- 
Mathematics is the supreme nostalgia of our time.



More information about the Mercurial-devel mailing list