Show More
@@ -767,22 +767,16 b' class basefilectx(object):' | |||
|
767 | 767 | this returns fixed value(False is used) as linenumber, |
|
768 | 768 | if "linenumber" parameter is "False".''' |
|
769 | 769 | |
|
770 | def decorate_compat(text, rev): | |
|
771 | return ([rev] * len(text.splitlines()), text) | |
|
772 | ||
|
773 | def without_linenumber(text, rev): | |
|
774 | return ([(rev, False)] * len(text.splitlines()), text) | |
|
775 | ||
|
776 | def with_linenumber(text, rev): | |
|
777 | size = len(text.splitlines()) | |
|
778 | return ([(rev, i) for i in xrange(1, size + 1)], text) | |
|
779 | ||
|
780 | 770 | if linenumber is None: |
|
781 |
decorate |
|
|
771 | def decorate(text, rev): | |
|
772 | return ([rev] * len(text.splitlines()), text) | |
|
782 | 773 | elif linenumber: |
|
783 | decorate = with_linenumber | |
|
774 | def decorate(text, rev): | |
|
775 | size = len(text.splitlines()) | |
|
776 | return ([(rev, i) for i in xrange(1, size + 1)], text) | |
|
784 | 777 | else: |
|
785 | decorate = without_linenumber | |
|
778 | def decorate(text, rev): | |
|
779 | return ([(rev, False)] * len(text.splitlines()), text) | |
|
786 | 780 | |
|
787 | 781 | def pair(parent, child): |
|
788 | 782 | blocks = mdiff.allblocks(parent[1], child[1], opts=diffopts, |
General Comments 0
You need to be logged in to leave comments.
Login now