tmannerm/PatchReader — pull request #1 by globau (2012-08-06 06:31:06+00:00)
Title: Fix hg comment support and malformed patches throwing warnings

these changes address the most common issues encountered on bugzilla.mozilla.org.

files which are not patches currently trigger a warning, and the templates have no way of knowing that an error occurred, resulting in empty output. by adding the file_count variable, the footer template can display an error if it's zero.

currently comments in diffs generated by hg generate a malformed unified diff, which in turn breaks interdiff. fixed that by skipping sections which don't contain any lines when outputting as raw unified.