Mercurial > public > mercurial-scm > hg
diff mercurial/commands.py @ 34432:2e32c6a31cc7
annotate: introduce attr for storing per-line annotate data
We're going to extend this a bit -- at first by simply adding whether this was
a skipped child. We're well on our way to outgrowing tuples, though -- adding
more and more fields to tuples becomes annoying very quickly.
Differential Revision: https://phab.mercurial-scm.org/D898
author | Siddharth Agarwal <sid0@fb.com> |
---|---|
date | Mon, 02 Oct 2017 02:34:47 -0700 |
parents | fffd3369aa83 |
children | 884b595f5195 |
line wrap: on
line diff
--- a/mercurial/commands.py Mon Oct 02 02:34:47 2017 -0700 +++ b/mercurial/commands.py Mon Oct 02 02:34:47 2017 -0700 @@ -326,12 +326,12 @@ hexfn = rootfm.hexfunc formatrev = formathex = pycompat.bytestr - opmap = [('user', ' ', lambda x: x[0].user(), ui.shortuser), - ('number', ' ', lambda x: x[0].rev(), formatrev), - ('changeset', ' ', lambda x: hexfn(x[0].node()), formathex), - ('date', ' ', lambda x: x[0].date(), util.cachefunc(datefunc)), - ('file', ' ', lambda x: x[0].path(), str), - ('line_number', ':', lambda x: x[1], str), + opmap = [('user', ' ', lambda x: x.fctx.user(), ui.shortuser), + ('number', ' ', lambda x: x.fctx.rev(), formatrev), + ('changeset', ' ', lambda x: hexfn(x.fctx.node()), formathex), + ('date', ' ', lambda x: x.fctx.date(), util.cachefunc(datefunc)), + ('file', ' ', lambda x: x.fctx.path(), str), + ('line_number', ':', lambda x: x.lineno, str), ] fieldnamemap = {'number': 'rev', 'changeset': 'node'}