##// END OF EJS Templates
annotate: correct parameter name of decorate() function
Yuya Nishihara -
r36953:ec46b0ee default
parent child Browse files
Show More
@@ -442,12 +442,12 b' def annotate(base, parents, linenumber=F'
442 442 """
443 443
444 444 if linenumber:
445 def decorate(text, rev):
446 return ([annotateline(fctx=rev, lineno=i)
445 def decorate(text, fctx):
446 return ([annotateline(fctx=fctx, lineno=i)
447 447 for i in xrange(1, _countlines(text) + 1)], text)
448 448 else:
449 def decorate(text, rev):
450 return ([annotateline(fctx=rev)] * _countlines(text), text)
449 def decorate(text, fctx):
450 return ([annotateline(fctx=fctx)] * _countlines(text), text)
451 451
452 452 # This algorithm would prefer to be recursive, but Python is a
453 453 # bit recursion-hostile. Instead we do an iterative
@@ -25,8 +25,8 b' class AnnotateTests(unittest.TestCase):'
25 25 childdata = b'a\nb2\nc\nc2\nd\n'
26 26 diffopts = mdiff.diffopts()
27 27
28 def decorate(text, rev):
29 return ([annotateline(fctx=rev, lineno=i)
28 def decorate(text, fctx):
29 return ([annotateline(fctx=fctx, lineno=i)
30 30 for i in range(1, text.count(b'\n') + 1)],
31 31 text)
32 32
General Comments 0
You need to be logged in to leave comments. Login now