diff --git a/rhodecode/lib/helpers.py b/rhodecode/lib/helpers.py --- a/rhodecode/lib/helpers.py +++ b/rhodecode/lib/helpers.py @@ -644,8 +644,9 @@ def repo_link(groups_and_repos): def fancy_file_stats(stats): a, d, t = stats[0], stats[1], stats[0] + stats[1] + print stats width = 100 - unit = float(width) / t + unit = float(width) / (t or 1) a_p = max(9, unit * a) if a > 0 else 0# needs > 9% to be visible d_p = max(9, unit * d) if d > 0 else 0 # needs > 9% to be visible diff --git a/rhodecode/templates/changeset/changeset_range.html b/rhodecode/templates/changeset/changeset_range.html --- a/rhodecode/templates/changeset/changeset_range.html +++ b/rhodecode/templates/changeset/changeset_range.html @@ -53,7 +53,7 @@
%for cs in c.cs_ranges:
r${cs}
- %for change,filenode,diff,cs1,cs2 in c.changes[cs.raw_id]: + %for change,filenode,diff,cs1,cs2,st in c.changes[cs.raw_id]:
${h.link_to(h.safe_unicode(filenode.path),h.url.current(anchor=h.repo_name_slug('C%s-%s' % (cs.short_id,h.safe_unicode(filenode.path)))))}
%endfor %endfor @@ -62,7 +62,7 @@
%for cs in c.cs_ranges: - %for change,filenode,diff,cs1,cs2 in c.changes[cs.raw_id]: + %for change,filenode,diff,cs1,cs2,st in c.changes[cs.raw_id]: %if change !='removed':