• 
      

    Audit RBTools files for unicode correctness.

    Review Request #9644 — Created Feb. 15, 2018 and submitted

    Information

    RBTools
    master
    fe75132...

    Reviewers

    This change is the result of going through the RBTools implementation
    (especially the clients) and checking all string usage to make sure that
    we keep filenames as unicode (encoding/decoding to the filesystem
    encoding when necessary) and diffs as bytes.

    • Ran unit tests on Python 2.7 and 3.6.
    • Smoke tested basic functionality on a few of the more common tools.
    Description From Last Updated

    E501 line too long (81 > 79 characters)

    reviewbotreviewbot

    Do we really want to be encoding using the filesystem encoding? Seems we'd want to keep things sane for Review …

    chipx86chipx86

    This needs to use %. Comma isn't appropriate here. ValueError() will end up with a message of ('%s" is a …

    chipx86chipx86

    F401 'sys' imported but unused

    reviewbotreviewbot
    Checks run (1 failed, 1 succeeded)
    flake8 failed.
    JSHint passed.

    flake8

    david
    solarmist
    1. I've done much of the same work it seems.
      https://reviews.reviewboard.org/r/9643/

    2. 
        
    chipx86
    1. 
        
    2. rbtools/clients/perforce.py (Diff revision 2)
       
       
       
       
       
       
      Show all issues

      Do we really want to be encoding using the filesystem encoding? Seems we'd want to keep things sane for Review Board and ensure we're using UTF-8 wherever possible.

      On a Mac, sys.getfilesystemencoding() is utf-8, so it'd appear to work for us, but if the encoding was something else entirely, I think we'd end up with some badly broken diffs.

      This applies to all diff building.

    3. rbtools/clients/perforce.py (Diff revision 2)
       
       
      Show all issues

      This needs to use %. Comma isn't appropriate here. ValueError() will end up with a message of ('%s" is a symlink, '<depot path here>')

    4. 
        
    david
    Review request changed
    Commit:
    8bd3b65a50adb596c79097069c2764920fa86e66
    06caffb8e8d7223eb8dc2d9ff6d5ed25523dac21

    Checks run (1 failed, 1 succeeded)

    flake8 failed.
    JSHint passed.

    flake8

    david
    chipx86
    1. Ship It!
    2. 
        
    david
    Review request changed
    Status:
    Completed
    Change Summary:
    Pushed to master (4c591b8)