• 
      

    Fix some unicode-related errors in RBTools SVN parsing.

    Review Request #7044 — Created March 11, 2015 and submitted — Latest diff uploaded

    Information

    RBTools
    release-0.7.x
    672ae8c...

    Reviewers

    There are a few issues that have been cropping up with the diff parsing (and
    other interfacing with output from 'svn' commands) since we moved over to
    unicode_literals. This change fixes three of them.

    First of all, the results from 'svn info' can include non-UTF8 characters
    depending on the locales that are available and the configuration of the
    system. Luckily, all of the information we need from this can be parsed out in
    binary mode.

    Second, when doing diffs of files that contain non-UTF8 characters, we were
    attempting to process the diff as a bunch of unicode objects, rather than as
    bytes. This was happening because we'd format some of the lines into unicode,
    and then join everything together. I've fixed things so that all the processing
    happens as bytes, so that we don't need to care about the encoding, and added a
    new unit test for this behavior.

    Finally, Griffin Myers suggested a third test case, with a non-utf8 filename.
    This has also been fixed, along with a new unit test for that case.

    Testing done:
    Ran unit tests.

    Ran unit tests.