Mercurial > public > mercurial-scm > hg-stable
diff hgext/churn.py @ 24139:73b3218bb078
churn: deprecate -t option in favour of -T
We use -T consistently elsewhere to refer to the --template option.
The old -t option is now renamed to --oldtemplate so that -t still
works. This has the benign side effect of introducing and immediately
deprecating a new long option.
We also test with both -t and -T options.
author | Jordi Guti?rrez Hermoso <jordigh@octave.org> |
---|---|
date | Tue, 24 Feb 2015 11:37:07 -0500 |
parents | 8d43c6bb38c0 |
children | fd7287f0b43c |
line wrap: on
line diff
--- a/hgext/churn.py Tue Feb 24 10:55:24 2015 +0100 +++ b/hgext/churn.py Tue Feb 24 11:37:07 2015 -0500 @@ -46,7 +46,7 @@ date = datetime.datetime(*time.gmtime(float(t) - tz)[:6]) return date.strftime(opts['dateformat']) else: - tmpl = opts.get('template', '{author|email}') + tmpl = opts.get('oldtemplate') or opts.get('template') tmpl = maketemplater(ui, repo, tmpl) def getkey(ctx): ui.pushbuffer() @@ -95,7 +95,9 @@ _('count rate for the specified revision or revset'), _('REV')), ('d', 'date', '', _('count rate for revisions matching date spec'), _('DATE')), - ('t', 'template', '{author|email}', + ('t', 'oldtemplate', '', + _('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')),