Add dependency checks for Bazaar.
Review Request #12544 — Created Aug. 18, 2022 and submitted
BazaarClientto add formal support for dependency checks.
BazaarClient.check_dependencies()now determines if Breezy or Bazaar
is installed, and sets appropriate flags for the tool to use.
is_breezyattributes have become properties, which will
trigger a dependency check if one is not performed. Similarly,
get_local_path()will also perform a dependency check if needed. This
is all in case of legacy usage where these are accessed before calling
has_dependencies(). In RBTools 5, these will instead
raise an exception.
Unit tests have been updated to include new dependency-related tests.
They also now leverage the dependency checks, rather than duplicating
checks or working around the different names of the tool. Tests that
require a working client will be skipped if missing a dependency.
Unit tests pass on Python 3.7 through 3.11.
Tested with Breezy installed, with Bazaar installed, and with neither
Fixed type annotations for the
bzrproperty and the wrapped attribute.
Revision 2 (+782 -106)
Checks run (2 succeeded)