Mercurial > public > mercurial-scm > hg
comparison mercurial/commands.py @ 39929:47cb6750dea3
annotate: rename {line_number} to {lineno} (BC)
I think {lineno} looks more like a common template keyword. It isn't called
a {line} to avoid conflicts with the element name of {lines} and the
{_|splitlines} filter.
https://www.mercurial-scm.org/wiki/GenericTemplatingPlan#Dictionary
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sun, 30 Sep 2018 15:35:17 +0900 |
parents | f07ab9ddc0c0 |
children | 66df1059b7c0 |
comparison
equal
deleted
inserted
replaced
39928:f07ab9ddc0c0 | 39929:47cb6750dea3 |
---|---|
340 opmap = [('user', ' ', lambda x: x.fctx.user(), ui.shortuser), | 340 opmap = [('user', ' ', lambda x: x.fctx.user(), ui.shortuser), |
341 ('rev', ' ', lambda x: scmutil.intrev(x.fctx), formatrev), | 341 ('rev', ' ', lambda x: scmutil.intrev(x.fctx), formatrev), |
342 ('node', ' ', lambda x: hex(scmutil.binnode(x.fctx)), formathex), | 342 ('node', ' ', lambda x: hex(scmutil.binnode(x.fctx)), formathex), |
343 ('date', ' ', lambda x: x.fctx.date(), util.cachefunc(datefunc)), | 343 ('date', ' ', lambda x: x.fctx.date(), util.cachefunc(datefunc)), |
344 ('path', ' ', lambda x: x.fctx.path(), pycompat.bytestr), | 344 ('path', ' ', lambda x: x.fctx.path(), pycompat.bytestr), |
345 ('line_number', ':', lambda x: x.lineno, pycompat.bytestr), | 345 ('lineno', ':', lambda x: x.lineno, pycompat.bytestr), |
346 ] | 346 ] |
347 opnamemap = {'rev': 'number', 'node': 'changeset', 'path': 'file'} | 347 opnamemap = {'rev': 'number', 'node': 'changeset', 'path': 'file', |
348 'lineno': 'line_number'} | |
348 | 349 |
349 if (not opts.get('user') and not opts.get('changeset') | 350 if (not opts.get('user') and not opts.get('changeset') |
350 and not opts.get('date') and not opts.get('file')): | 351 and not opts.get('date') and not opts.get('file')): |
351 opts['number'] = True | 352 opts['number'] = True |
352 | 353 |