Commit 34db1c55 authored by Yuya Nishihara's avatar Yuya Nishihara
Browse files

annotate: format local tables in less-dense form

I'll move these to a class, where one-extra indent will be needed.
parent cfaf3843491b
......@@ -358,15 +358,20 @@ def annotate(ui, repo, *pats, **opts):
formatrev = b'%d'.__mod__
formathex = shorthex
opmap = [('user', ' ', lambda x: x.fctx.user(), ui.shortuser),
('rev', ' ', lambda x: scmutil.intrev(x.fctx), formatrev),
('node', ' ', lambda x: hex(scmutil.binnode(x.fctx)), formathex),
('date', ' ', lambda x: x.fctx.date(), util.cachefunc(datefunc)),
('path', ' ', lambda x: x.fctx.path(), pycompat.bytestr),
('lineno', ':', lambda x: x.lineno, pycompat.bytestr),
]
opnamemap = {'rev': 'number', 'node': 'changeset', 'path': 'file',
'lineno': 'line_number'}
opmap = [
('user', ' ', lambda x: x.fctx.user(), ui.shortuser),
('rev', ' ', lambda x: scmutil.intrev(x.fctx), formatrev),
('node', ' ', lambda x: hex(scmutil.binnode(x.fctx)), formathex),
('date', ' ', lambda x: x.fctx.date(), util.cachefunc(datefunc)),
('path', ' ', lambda x: x.fctx.path(), pycompat.bytestr),
('lineno', ':', lambda x: x.lineno, pycompat.bytestr),
]
opnamemap = {
'rev': 'number',
'node': 'changeset',
'path': 'file',
'lineno': 'line_number',
}
if (not opts.get('user') and not opts.get('changeset')
and not opts.get('date') and not opts.get('file')):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment