##usage: ## <%namespace name="diff_block" file="/changeset/diff_block.mako"/> ## ${diff_block.diff_block_changeset_table(change)} ## <%def name="changeset_message()">
${_('The requested commit is too big and content was truncated.')} ${_('Show full diff')}
<%def name="file_message()">
${_('The requested file is too big and its content is not shown.')} ${_('Show full diff')}
<%def name="diff_block_changeset_table(change)">
%for FID,(cs1, cs2, change, filenode_path, diff, stats, file_data) in change.items():
${diff|n} % if file_data["is_limited_diff"]: % if file_data["exceeds_limit"]: ${self.file_message()} % else:
${_('Diff was truncated. File content available only in full diff.')} ${_('Show full diff')}
% endif % endif
%endfor
<%def name="diff_block_simple(change)">
%for op,filenode_path,diff,file_data in change:
${diff|n} % if file_data["is_limited_diff"]: % if file_data["exceeds_limit"]: ${self.file_message()} % else:
${_('Diff was truncated. File content available only in full diff.')} ${_('Show full diff')}
% endif % endif
%endfor
<%def name="diff_summary_text(changed_files, lines_added, lines_deleted, limited_diff=False)"> % if limited_diff: ${_ungettext('%(num)s file changed', '%(num)s files changed', changed_files) % {'num': changed_files}} % else: ${_ungettext('%(num)s file changed: %(linesadd)s inserted, ''%(linesdel)s deleted', '%(num)s files changed: %(linesadd)s inserted, %(linesdel)s deleted', changed_files) % {'num': changed_files, 'linesadd': lines_added, 'linesdel': lines_deleted}} %endif