Fix string types in the Subversion backends.

Review Request #10534 — Created April 15, 2019 and submitted — Latest diff uploaded

Information

Review Board
release-4.0.x

Reviewers

We had a lot of legacy cruft involving string types in our Subversion
code (the backends in particular). Some of this was due to some
guesswork in string handling, and some due to just being legacy and
Subvertpy having changed over time.

Our Subvertpy code in particular had some old methods of coercing string
types (the B() wrapper), which stood out from the rest of our codebase
and wasn't very compatible with Python 3 (and could potentially cause
problems when encountering some Unicode characters). Subvertpy itself
these days is fairly flexible in terms of string types on all supported
Python versions, which means that some of the coercing work we were
doing wasn't even necessary.

For Subvertpy, we're no longer using B() wrapper, and we're not
worrying about string types for parameters that are flexible. For the
results of some operations, though, we're now converting to the correct
types.

PySVN was mostly fine, but there were some Python 2-isms that didn't
work in Python 3, causing crashes or tripping other string checks that
have recently been introduced. These have been updated to use/convert to
the right string types.

All Subversion unit tests pass on PySVN and Subvertpy on Python 2.7
and 3.7.

Commits

Files