• 
      

    Encode revisions to UTF-8 to pass to Git commands

    Review Request #10696 — Created Sept. 6, 2019 and submitted

    Information

    RBTools
    master

    Reviewers

    The logic that genates the list of commits to submit for a review
    request with commit history was previously attempting to naively convert
    the the revisions (which were text) to bytes. This is fine on Python 2,
    where bytes(s) implies s.encode('ascii') but this is no longer the
    case on Python 3. Instead, str.encode() must be called and it must be
    provided with a codec. This method works on both Python 2 and Python 3.

    Confirmed the following on Python versions 2.7, 3.5, 3.6, and 3.7:

    • With this entire patch stack (/r/10685, /r/10695, and /r/10697),
      rbt post is able to create review requests with commit history.
    Summary ID Author
    Encode revisions to UTF-8 to pass to Git commands
    The logic that genates the list of commits to submit for a review request with commit history was previously attempting to naively convert the the revisions (which were text) to bytes. This is fine on Python 2, where `bytes(s)` implies `s.encode('ascii')` but this is no longer the case on Python 3. Instead, `str.encode()` must be called and it must be provided with a codec. This method works on both Python 2 and Python 3. Testing done: Confirmed the following hold on Python verisons 2.7, 3.5, 3.6, and 3.7: - With this entire patch stack (/r/10685, /r/10695, and /r/10697), `rbt post` is able to create review requests with commit history.
    a6d7df06a9e09d95107845ff8625ef9cffbd0d5e Barret Rennie
    Description From Last Updated

    Testing Done is wrapping wrong here. Also "hold" is here again.

    chipx86chipx86

    This should land on release-1.0.x.

    chipx86chipx86

    In "Testing Done", "Confirmed the following hold true" is still pretty weird phrasing. How about just "Confirmed the following on …

    daviddavid

    Typo in testing done: verisons -> versions.

    daviddavid
    chipx86
    1. 
        
    2. Show all issues

      Testing Done is wrapping wrong here.

      Also "hold" is here again.

    3. Show all issues

      This should land on release-1.0.x.

      1. No, this is DVCS only, which is on master.

    4. 
        
    brennie
    david
    1. 
        
    2. Show all issues

      In "Testing Done", "Confirmed the following hold true" is still pretty weird phrasing. How about just "Confirmed the following on Python versions ..."?

    3. Show all issues

      Typo in testing done: verisons -> versions.

    4. 
        
    brennie
    brennie
    david
    1. Ship It!
    2. 
        
    brennie
    Review request changed
    Status:
    Completed
    Change Summary:
    Pushed to release-2.0.x (7239452)