Mercurial > hg
diff mercurial/context.py @ 37066:b33b91ca2ec2
annotate: pack line content into annotateline object (API)
Just for code readability. We can do that since the annotateline type is
no longer used while computing the history.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sun, 18 Mar 2018 12:28:19 +0900 |
parents | b235bde38a83 |
children | f0b6fbea00cf |
line wrap: on
line diff
--- a/mercurial/context.py Tue Mar 13 22:18:06 2018 +0900 +++ b/mercurial/context.py Sun Mar 18 12:28:19 2018 +0900 @@ -968,11 +968,12 @@ return filectx(self._repo, self._path, fileid=-1, filelog=self._filelog) def annotate(self, follow=False, skiprevs=None, diffopts=None): - """Returns a list of tuples of (attr, line) for each line in the file - - - attr.fctx is the filectx of the node where that line was last changed - - attr.lineno is the line number at the first appearance in the managed + """Returns a list of annotateline objects for each line in the file + + - line.fctx is the filectx of the node where that line was last changed + - line.lineno is the line number at the first appearance in the managed file + - line.text is the data on that line (including newline character) """ getlog = util.lrucachefunc(lambda x: self._repo.file(x))