Standardize error handling for Subversion.
Review Request #13226 — Created Aug. 20, 2023 and submitted
Our Subversion support split the responsibility for error handling up
SVNTool.normalize_error()and into individual backend functions.
SVNToolversion was even checking for backend-specific errors, a
holdover from when backends were first introduced.
In general, error handling for Subversion is iffy, as it depends on
backend internals. libsvn and PySVN may produce error strings that are
all wrapped by a single exception, which may be used for backend errors,
PySVN configuration errors, or repository errors. If operating inside a
callback, we also can't raise our own exceptions (which will come up and
be addressed in a future change).
This change redoes all our error and operation handling. Now,
leaves all error handling up to the client backends. Backends are
expected to invoke operations within a
which will capture any errors and then hand them to the backend to turn
into proper exceptions. This will also give us an avenue to raise our
own exceptions within callbacks later, for SSL.
PySVN backend communication code has been updated to work with
_do_on_path()now better wraps this as a context
manager as well, simplifying various backend implementations and letting
us remove some private callback functions.
All unit tests pass.
accept_ssl_certificatecallback to pass in the client, to avoid an error with a client falling out of scope.
Revision 2 (+498 -394)
Checks run (2 succeeded)