Add dependency checks for Bazaar.
Review Request #12544 — Created Aug. 18, 2022 and submitted
This updates
BazaarClient
to 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.The
bzr
andis_breezy
attributes 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
setup()
orhas_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
installed.