##// END OF EJS Templates
files: pep8 fixes
marcink -
r678:1aa46c57 stable
parent child Browse files
Show More
@@ -46,6 +46,7 b' class OPS(object):'
46 MOD = 'M'
46 MOD = 'M'
47 DEL = 'D'
47 DEL = 'D'
48
48
49
49 def wrap_to_table(str_):
50 def wrap_to_table(str_):
50 return '''<table class="code-difftable">
51 return '''<table class="code-difftable">
51 <tr class="line no-comment">
52 <tr class="line no-comment">
@@ -57,8 +58,8 b' def wrap_to_table(str_):'
57
58
58
59
59 def wrapped_diff(filenode_old, filenode_new, diff_limit=None, file_limit=None,
60 def wrapped_diff(filenode_old, filenode_new, diff_limit=None, file_limit=None,
60 show_full_diff=False, ignore_whitespace=True, line_context=3,
61 show_full_diff=False, ignore_whitespace=True, line_context=3,
61 enable_comments=False):
62 enable_comments=False):
62 """
63 """
63 returns a wrapped diff into a table, checks for cut_off_limit for file and
64 returns a wrapped diff into a table, checks for cut_off_limit for file and
64 whole diff and presents proper message
65 whole diff and presents proper message
@@ -79,8 +80,9 b' def wrapped_diff(filenode_old, filenode_'
79 f_gitdiff = get_gitdiff(filenode_old, filenode_new,
80 f_gitdiff = get_gitdiff(filenode_old, filenode_new,
80 ignore_whitespace=ignore_whitespace,
81 ignore_whitespace=ignore_whitespace,
81 context=line_context)
82 context=line_context)
82 diff_processor = DiffProcessor(f_gitdiff, format='gitdiff', diff_limit=diff_limit,
83 diff_processor = DiffProcessor(
83 file_limit=file_limit, show_full_diff=show_full_diff)
84 f_gitdiff, format='gitdiff', diff_limit=diff_limit,
85 file_limit=file_limit, show_full_diff=show_full_diff)
84 _parsed = diff_processor.prepare()
86 _parsed = diff_processor.prepare()
85
87
86 diff = diff_processor.as_html(enable_comments=enable_comments)
88 diff = diff_processor.as_html(enable_comments=enable_comments)
@@ -190,7 +192,8 b' class DiffProcessor(object):'
190 # used for inline highlighter word split
192 # used for inline highlighter word split
191 _token_re = re.compile(r'()(&gt;|&lt;|&amp;|\W+?)')
193 _token_re = re.compile(r'()(&gt;|&lt;|&amp;|\W+?)')
192
194
193 def __init__(self, diff, format='gitdiff', diff_limit=None, file_limit=None, show_full_diff=True):
195 def __init__(self, diff, format='gitdiff', diff_limit=None,
196 file_limit=None, show_full_diff=True):
194 """
197 """
195 :param diff: A `Diff` object representing a diff from a vcs backend
198 :param diff: A `Diff` object representing a diff from a vcs backend
196 :param format: format of diff passed, `udiff` or `gitdiff`
199 :param format: format of diff passed, `udiff` or `gitdiff`
General Comments 0
You need to be logged in to leave comments. Login now