Mercurial > public > mercurial-scm > hg
comparison mercurial/dagop.py @ 36935:ec46b0ee2e3c
annotate: correct parameter name of decorate() function
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Mon, 12 Mar 2018 20:37:08 +0900 |
parents | 8fba319750c2 |
children | 434e520adb8c |
comparison
equal
deleted
inserted
replaced
36934:dbae581010ea | 36935:ec46b0ee2e3c |
---|---|
440 | 440 |
441 `parents(fctx)` is a function returning a list of parent filectxs. | 441 `parents(fctx)` is a function returning a list of parent filectxs. |
442 """ | 442 """ |
443 | 443 |
444 if linenumber: | 444 if linenumber: |
445 def decorate(text, rev): | 445 def decorate(text, fctx): |
446 return ([annotateline(fctx=rev, lineno=i) | 446 return ([annotateline(fctx=fctx, lineno=i) |
447 for i in xrange(1, _countlines(text) + 1)], text) | 447 for i in xrange(1, _countlines(text) + 1)], text) |
448 else: | 448 else: |
449 def decorate(text, rev): | 449 def decorate(text, fctx): |
450 return ([annotateline(fctx=rev)] * _countlines(text), text) | 450 return ([annotateline(fctx=fctx)] * _countlines(text), text) |
451 | 451 |
452 # This algorithm would prefer to be recursive, but Python is a | 452 # This algorithm would prefer to be recursive, but Python is a |
453 # bit recursion-hostile. Instead we do an iterative | 453 # bit recursion-hostile. Instead we do an iterative |
454 # depth-first search. | 454 # depth-first search. |
455 | 455 |