diff --git a/rhodecode/controllers/changeset.py b/rhodecode/controllers/changeset.py --- a/rhodecode/controllers/changeset.py +++ b/rhodecode/controllers/changeset.py @@ -46,6 +46,7 @@ from rhodecode.lib import diffs from rhodecode.model.db import ChangesetComment from rhodecode.model.comment import ChangesetCommentsModel from rhodecode.model.meta import Session +from rhodecode.lib.diffs import wrapped_diff log = logging.getLogger(__name__) @@ -145,15 +146,6 @@ def _context_url(fileid=None): return h.link_to(lbl, h.url.current(**params)) -def wrap_to_table(str_): - return '''
- | %s |
-
+ | %s |
+
''' \ - % {'a_id': anchor_old_id, - 'old_lineno_cls': old_lineno_class}) + _html.append('''\t | ''' % { + 'a_id': anchor_old_id, + 'olc': old_lineno_class + }) - _html.append('''%(link)s''' \ - % {'link': - _link_to_if(cond_old, change['old_lineno'], '#%s' \ - % anchor_old)}) + _html.append('''%(link)s''' % { + 'link': _link_to_if(True, change['old_lineno'], + '#%s' % anchor_old) + }) _html.append(''' | \n''') ########################################################### # NEW LINE NUMBER ########################################################### - _html.append('''\t''' \ - % {'a_id': anchor_new_id, - 'new_lineno_cls': new_lineno_class}) + _html.append('''\t | ''' % { + 'a_id': anchor_new_id, + 'nlc': new_lineno_class + }) - _html.append('''%(link)s''' \ - % {'link': - _link_to_if(cond_new, change['new_lineno'], '#%s' \ - % anchor_new)}) + _html.append('''%(link)s''' % { + 'link': _link_to_if(True, change['new_lineno'], + '#%s' % anchor_new) + }) _html.append(''' | \n''') ########################################################### # CODE ########################################################### comments = '' if enable_comments else 'no-comment' - _html.append('''\t''' \
- % {'code_class': code_class,
- 'in-comments': comments})
- _html.append('''\n\t\t%(code)s\n''' \ - % {'code': change['line']}) + _html.append('''\t | ''' % {
+ 'cc': code_class,
+ 'inc': comments
+ })
+ _html.append('''\n\t\t%(code)s\n''' % { + 'code': change['line'] + }) _html.append('''\t | ''')
_html.append('''\n