Fix the types and values of connection arguments for Perforce.
Review Request #10135 — Created Aug. 31, 2018 and submitted
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
Nonevalues 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
PerforceClientbased on the
Repositorysettings, and updates the
P4string setting to use the right string type for the right version
Unit tests were added to check that both
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.