• 
      

    Fix the types and values of connection arguments for Perforce.

    Review Request #10135 — Created Aug. 31, 2018 and submitted — Latest diff uploaded

    Information

    Review Board
    release-2.5.x
    2119586...

    Reviewers

    Over the years, the Perforce connection code went through many changes
    designed to normalize strings so that we would ensure the Perforce
    client would receive byte strings, no matter what was being passed in.
    Some of these were no longer necessary, and in fact causing problems, as
    None values were getting converted to 'None' text strings, which
    could cause problems in very specific edge cases on Perforce deployments
    involving clients named 'None' that had restricted client views.

    Along with this, these changes were only compatible with Python 2, as
    modern versions of Perforce on Python 3 use Unicode strings.

    This change removes the unnecessary string conversion when populating
    our PerforceClient based on the Repository settings, and updates the
    P4 string setting to use the right string type for the right version
    of Python.

    Unit tests were added to check that both PerforceClient and P4
    received the proper values and string types.

    Unit tests passed.

    Verified connection against real-world servers.

    Tested on Review Board 2.5 and 3.0.