1. codingtony
  2. RhodeCode

Commits

Marcin Kuzminski  committed 6011513

fixed raw_changeset for git, accidentally it was generated with hg patch headers
- Code garden

  • Participants
  • Parent commits 0e27da0
  • Branches beta

Comments (0)

Files changed (3)

File rhodecode/controllers/changeset.py

View file
                 lim = self.cut_off_limit
                 if cumulative_diff > self.cut_off_limit:
                     lim = -1
-                size, cs1, cs2, diff, st = wrapped_diff(filenode_old=None,
-                                         filenode_new=node,
-                                         cut_off_limit=lim,
-                                         ignore_whitespace=ign_whitespace_lcl,
-                                         line_context=line_context_lcl,
-                                         enable_comments=enable_comments)
+                size, cs1, cs2, diff, st = wrapped_diff(
+                    filenode_old=None,
+                    filenode_new=node,
+                    cut_off_limit=lim,
+                    ignore_whitespace=ign_whitespace_lcl,
+                    line_context=line_context_lcl,
+                    enable_comments=enable_comments
+                )
                 cumulative_diff += size
                 c.lines_added += st[0]
                 c.lines_deleted += st[1]
-                c.changes[changeset.raw_id].append(('added', node, diff,
-                                                    cs1, cs2, st))
+                c.changes[changeset.raw_id].append(
+                    ('added', node, diff, cs1, cs2, st)
+                )
 
             #==================================================================
             # CHANGED FILES
                 lim = self.cut_off_limit
                 if cumulative_diff > self.cut_off_limit:
                     lim = -1
-                size, cs1, cs2, diff, st = wrapped_diff(filenode_old=filenode_old,
-                                         filenode_new=node,
-                                         cut_off_limit=lim,
-                                         ignore_whitespace=ign_whitespace_lcl,
-                                         line_context=line_context_lcl,
-                                         enable_comments=enable_comments)
+                size, cs1, cs2, diff, st = wrapped_diff(
+                    filenode_old=filenode_old,
+                    filenode_new=node,
+                    cut_off_limit=lim,
+                    ignore_whitespace=ign_whitespace_lcl,
+                    line_context=line_context_lcl,
+                    enable_comments=enable_comments
+                )
                 cumulative_diff += size
                 c.lines_added += st[0]
                 c.lines_deleted += st[1]
-                c.changes[changeset.raw_id].append(('changed', node, diff,
-                                                    cs1, cs2, st))
-
+                c.changes[changeset.raw_id].append(
+                    ('changed', node, diff, cs1, cs2, st)
+                )
             #==================================================================
             # REMOVED FILES
             #==================================================================
             for node in changeset.removed:
-                c.changes[changeset.raw_id].append(('removed', node, None,
-                                                    None, None, (0, 0)))
+                c.changes[changeset.raw_id].append(
+                    ('removed', node, None, None, None, (0, 0))
+                )
 
         # count inline comments
         for path, lines in c.inline_comments:
             response.content_disposition = 'attachment; filename=%s.patch' \
                                             % revision
 
-        c.parent_tmpl = ''.join(['# Parent  %s\n' % x.raw_id for x in
-                                                 c.changeset.parents])
+        c.parent_tmpl = ''.join(['# Parent  %s\n' % x.raw_id
+                                 for x in c.changeset.parents])
 
         c.diffs = ''
         for x in c.changes:

File rhodecode/controllers/files.py

View file
 
             diff_name = '%s_vs_%s.diff' % (diff1, diff2)
             response.content_type = 'text/plain'
-            response.content_disposition = 'attachment; filename=%s' \
-                                                    % diff_name
+            response.content_disposition = (
+                'attachment; filename=%s' % diff_name
+            )
             return diff.raw_diff()
 
         elif c.action == 'raw':

File rhodecode/templates/changeset/raw_changeset.html

View file
+%if h.is_hg(c.scm_type):
 # ${c.scm_type.upper()} changeset patch
 # User ${c.changeset.author|n}
 # Date ${c.changeset.date}
 # Node ID ${c.changeset.raw_id}
 ${c.parent_tmpl}
 ${c.changeset.message}
-
+%endif
 ${c.diffs|n}