On Mon, 1 Oct 2018 15:38:36 +0800, Anton Shestakov wrote:
> On Sun, 30 Sep 2018 22:43:46 +0900
> Yuya Nishihara <y...@tcha.org> wrote:
> 
> > # HG changeset patch
> > # User Yuya Nishihara <y...@tcha.org>
> > # Date 1538288821 -32400
> > #      Sun Sep 30 15:27:01 2018 +0900
> > # Node ID 4ee07da344653b4bcfea8214c20e713cfd307d86
> > # Parent  66d94b8a5526475ae523e1cca3bfd8c1cf3ec9ca
> > annotate: rename {lines}/{line} to {texts}/{text} respectively (BC)
> > 
> > Perhaps these were the most unloved names. While the data structure is
> > different from the {texts} in "hg grep", they are more or less a list of
> > text chunks with some metadata attached. Let's call both of them as {texts}
> > since I couldn't come up with a better name.
> > 
> > https://www.mercurial-scm.org/wiki/GenericTemplatingPlan#Dictionary
> > 
> > diff --git a/mercurial/commands.py b/mercurial/commands.py
> > --- a/mercurial/commands.py
> > +++ b/mercurial/commands.py
> > @@ -390,7 +390,7 @@ def annotate(ui, repo, *pats, **opts):
> >                           % ((pats and m.rel(abs)) or abs))
> >              continue
> >  
> > -        fm = rootfm.nested('lines', tmpl='{rev}: {line}')
> > +        fm = rootfm.nested('texts', tmpl='{rev}: {text}')
> 
> I personally would expect the iterable to be named "lines", e.g.:
> 
>     rootfm.nested('lines', tmpl='{rev}: {text}')
> 
> It makes sense in my mind because these are not just randomly cut text
> chunks, they are individual lines, no more no less. We're iterating the
> output of annotate (and grep too) line by line, not text (e.g. a
> paragraph or more) by text.

Okay. Let's not rename the lines/line pair then. I don't have any preference
over lines vs texts, but I don't like the inconsistency of lines[n] -> text.
_______________________________________________
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Reply via email to