Commits

Anonymous committed 07dfd8c

Ported [4131] to 0.10-stable (''Fix for #4063 max_diff_...'')

Comments (0)

Files changed (2)

trac/versioncontrol/api.py

     EDIT = 'edit'
     MOVE = 'move'
 
+    # change types which can have diff associated to them
+    DIFF_CHANGES = (EDIT, COPY, MOVE) # MERGE
+
     def __init__(self, rev, message, author, date):
         self.rev = rev
         self.message = message

trac/versioncontrol/web_ui/changeset.py

             diff_bytes = diff_files = 0
             if self.max_diff_bytes or self.max_diff_files:
                 for old_node, new_node, kind, change in get_changes():
-                    if change == Changeset.EDIT and kind == Node.FILE:
+                    if change in Changeset.DIFF_CHANGES and kind == Node.FILE:
                         diff_files += 1
                         diff_bytes += _estimate_changes(old_node, new_node)
             show_diffs = (not self.max_diff_files or \
         idx = 0
         for old_node, new_node, kind, change in get_changes():
             show_entry = change != Changeset.EDIT
-            if change in (Changeset.EDIT, Changeset.COPY, Changeset.MOVE) and \
+            if change in Changeset.DIFF_CHANGES and \
                    req.perm.has_permission('FILE_VIEW'):
                 assert old_node and new_node
                 props = _prop_changes(old_node, new_node)