Status: New
Owner: ----
Labels: Type-Enhancement Priority-Medium

New issue 1791 by josh.hamacher: Hide unreasonably large diffs.
http://code.google.com/p/reviewboard/issues/detail?id=1791

*NOTE: If you have a patch, please submit it to
http://reviews.reviewboard.org/


What version are you running?
1.5 RC 1

What's the URL of the page this enhancement relates to, if any?
The diff viewer.

Describe the enhancement and the motivation for it.
We have various tools that generate source code; sometimes these generated files are huge. Sometimes developers submit diffs of those generated files for code review. Sometimes those diffs are small enough that they actually get published (i.e. post-review doesn't time out) but still large enough to be virtually meaningless to a reviewer. We've added a very small change to diffviewer/forms.py (see below) to hide these changes.

What operating system are you using? What browser?
N/A

Please provide any additional information below.
We've modified diffviewer/forms.py as follows, starting at line 155:

    # treat gigantic diffs as binary
    maxDiffSizeK = 255
    diffSizeK = len(f.data) / 1024
    if (diffSizeK > maxDiffSizeK):
        f.binary = True
        f.data = ""

We didn't submit this as a patch because there's probably a better way of doing it, but if it sounds reasonable we can do so.

--
You received this message because you are subscribed to the Google Groups 
"reviewboard-issues" group.
To post to this group, send email to reviewboard-iss...@googlegroups.com.
To unsubscribe from this group, send email to 
reviewboard-issues+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/reviewboard-issues?hl=en.

Reply via email to