##// END OF EJS Templates
churn: deprecate -t option in favour of -T...
Jordi Gutiérrez Hermoso -
r24139:73b3218b default
parent child Browse files
Show More
@@ -46,7 +46,7 b' def countrate(ui, repo, amap, *pats, **o'
46 date = datetime.datetime(*time.gmtime(float(t) - tz)[:6])
46 date = datetime.datetime(*time.gmtime(float(t) - tz)[:6])
47 return date.strftime(opts['dateformat'])
47 return date.strftime(opts['dateformat'])
48 else:
48 else:
49 tmpl = opts.get('template', '{author|email}')
49 tmpl = opts.get('oldtemplate') or opts.get('template')
50 tmpl = maketemplater(ui, repo, tmpl)
50 tmpl = maketemplater(ui, repo, tmpl)
51 def getkey(ctx):
51 def getkey(ctx):
52 ui.pushbuffer()
52 ui.pushbuffer()
@@ -95,7 +95,9 b' def countrate(ui, repo, amap, *pats, **o'
95 _('count rate for the specified revision or revset'), _('REV')),
95 _('count rate for the specified revision or revset'), _('REV')),
96 ('d', 'date', '',
96 ('d', 'date', '',
97 _('count rate for revisions matching date spec'), _('DATE')),
97 _('count rate for revisions matching date spec'), _('DATE')),
98 ('t', 'template', '{author|email}',
98 ('t', 'oldtemplate', '',
99 _('template to group changesets (DEPRECATED)'), _('TEMPLATE')),
100 ('T', 'template', '{author|email}',
99 _('template to group changesets'), _('TEMPLATE')),
101 _('template to group changesets'), _('TEMPLATE')),
100 ('f', 'dateformat', '',
102 ('f', 'dateformat', '',
101 _('strftime-compatible format for grouping by date'), _('FORMAT')),
103 _('strftime-compatible format for grouping by date'), _('FORMAT')),
@@ -171,4 +171,27 b' Test multibyte sequences in names'
171 El Ni\xc3\xb1o 1 *************** (esc)
171 El Ni\xc3\xb1o 1 *************** (esc)
172 with space 1 ***************
172 with space 1 ***************
173
173
174 Test --template argument, with backwards compatiblity
175
176 $ hg churn -t '{author|user}'
177 user1 4 ***************************************************************
178 user3 3 ***********************************************
179 user2 2 ********************************
180 nino 1 ****************
181 with 1 ****************
182 0
183 user4 0
184 $ hg churn -T '{author|user}'
185 user1 4 ***************************************************************
186 user3 3 ***********************************************
187 user2 2 ********************************
188 nino 1 ****************
189 with 1 ****************
190 0
191 user4 0
192 $ hg churn -t 'alltogether'
193 alltogether 11 *********************************************************
194 $ hg churn -T 'alltogether'
195 alltogether 11 *********************************************************
196
174 $ cd ..
197 $ cd ..
General Comments 0
You need to be logged in to leave comments. Login now