Patchwork churn: deprecate -t option in favour of -T

login
register
mail settings
Submitter Jordi Gutiérrez Hermoso
Date Feb. 24, 2015, 4:38 p.m.
Message ID <cc4639fe9a82241193e1.1424795906@Iris>
Download mbox | patch
Permalink /patch/7827/
State Superseded
Headers show

Comments

Jordi Gutiérrez Hermoso - Feb. 24, 2015, 4:38 p.m.
# HG changeset patch
# User Jordi Gutiérrez Hermoso <jordigh@octave.org>
# Date 1424795827 18000
#      Tue Feb 24 11:37:07 2015 -0500
# Node ID cc4639fe9a82241193e10d626ec22550260ca819
# Parent  ff5caa8dfd993680d9602ca6ebb14da9de10d5f4
churn: deprecate -t option in favour of -T

We use -T consistently elsewhere to refer to the --template option.
Ryan McElroy - Feb. 24, 2015, 5:48 p.m.
On 2/24/2015 8:38 AM, Jordi Gutiérrez Hermoso wrote:
> # HG changeset patch
> # User Jordi Gutiérrez Hermoso <jordigh@octave.org>
> # Date 1424795827 18000
> #      Tue Feb 24 11:37:07 2015 -0500
> # Node ID cc4639fe9a82241193e10d626ec22550260ca819
> # Parent  ff5caa8dfd993680d9602ca6ebb14da9de10d5f4
> churn: deprecate -t option in favour of -T
>
> We use -T consistently elsewhere to refer to the --template option.
>
> diff --git a/hgext/churn.py b/hgext/churn.py
> --- a/hgext/churn.py
> +++ b/hgext/churn.py
> @@ -96,6 +96,8 @@ def countrate(ui, repo, amap, *pats, **o
>       ('d', 'date', '',
>        _('count rate for revisions matching date spec'), _('DATE')),
>       ('t', 'template', '{author|email}',
How does mercurial resolve the conflict when two things claim to be 
--template? Should re remove the 'template' long name from the line above?
> +     _('template to group changesets (DEPRECATED)'), _('TEMPLATE')),
> +    ('T', 'template', '{author|email}',
>        _('template to group changesets'), _('TEMPLATE')),
>       ('f', 'dateformat', '',
>        _('strftime-compatible format for grouping by date'), _('FORMAT')),
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel@selenic.com
> http://selenic.com/mailman/listinfo/mercurial-devel
Jordi Gutiérrez Hermoso - Feb. 24, 2015, 8:06 p.m.
On Tue, 2015-02-24 at 09:48 -0800, Ryan McElroy wrote:
> On 2/24/2015 8:38 AM, Jordi Gutiérrez Hermoso wrote:
> > # HG changeset patch
> > # User Jordi Gutiérrez Hermoso <jordigh@octave.org>
> > # Date 1424795827 18000
> > #      Tue Feb 24 11:37:07 2015 -0500
> > # Node ID cc4639fe9a82241193e10d626ec22550260ca819
> > # Parent  ff5caa8dfd993680d9602ca6ebb14da9de10d5f4
> > churn: deprecate -t option in favour of -T
> >
> > We use -T consistently elsewhere to refer to the --template option.
> >
> > diff --git a/hgext/churn.py b/hgext/churn.py
> > --- a/hgext/churn.py
> > +++ b/hgext/churn.py
> > @@ -96,6 +96,8 @@ def countrate(ui, repo, amap, *pats, **o
> >       ('d', 'date', '',
> >        _('count rate for revisions matching date spec'), _('DATE')),
> >       ('t', 'template', '{author|email}',

> How does mercurial resolve the conflict when two things claim to be 
> --template? Should re remove the 'template' long name from the line above?

Oops, yeah, you're right, the second one overwrites the first and now
it's impossible to pass the option by -t, breaking backwards
compatibility.

I'm preparing V2.

Patch

diff --git a/hgext/churn.py b/hgext/churn.py
--- a/hgext/churn.py
+++ b/hgext/churn.py
@@ -96,6 +96,8 @@  def countrate(ui, repo, amap, *pats, **o
     ('d', 'date', '',
      _('count rate for revisions matching date spec'), _('DATE')),
     ('t', 'template', '{author|email}',
+     _('template to group changesets (DEPRECATED)'), _('TEMPLATE')),
+    ('T', 'template', '{author|email}',
      _('template to group changesets'), _('TEMPLATE')),
     ('f', 'dateformat', '',
      _('strftime-compatible format for grouping by date'), _('FORMAT')),