Fix a Unicode issue when normalizing diffs for Bitbucket.

Review Request #8663 — Created Jan. 24, 2017 and submitted — Latest diff uploaded

Information

Review Board
release-2.5.x
d8d9741...

Reviewers

We attempt to append a trailing newline to diffs on Bitbucket, if one
doesn't exist. However, we were doing that by comparing against Unicode
strings, which results in UnicodeDecodeErrors. We now properly use byte
strings instead.

The new unit test failed prior to this fix with the reported error. It
succeeded after the fix.