Add official support for Breezy in the Bazaar SCMTool.
Review Request #12145 — Created March 14, 2022 and submitted
Bazaar is long-abandoned, with no formal Python 3 support. However, it
does have a modern fork called Breezy, which we've previously added some
initial support for in RBTools.Breezy is largely compatible with Bazaar, but does use its own Python
modules, command line tool name, and environment variables. Review Board
mostly worked with Breezy, so long asbzr
was symlinked tobrz
in
the system path, but ourrbssh
plugin could not be invoked due to
changes in environment variables.This half-measure of support caused unit tests in an environment without
bzrlib
to fail, as the tests would seebzr
and would run, but the
rbssh
plugin would fail at import time. This effectively skipped the
plugin, causing Breezy to use default SSH support, which would fail one
of the unit tests dealing with SSH key management.This change introduces official Breezy support. We now check for the
presence ofbrz
. If found, we assume Breezy support, and adjust
settings accordingly. Otherwie, we assumebrz
support, for legacy
purposes.There isn't really a whole lot that has changed, other than using the
proper name and environment variables. However, going forward, there is
an important caveat with the plugin. This needs to remain compatible
with Python 2 and 3, since it's run in either the Bazaar or Breezy
process. It also needs to import the correct module (bzrlib
or
breezy
).
breezy
is now a development dependency when running on Python 3.This change is being introduced for Review Board 5, but is planned to
be backported to 4.0.7.
Unit tests pass with Bazaar and Breezy.
- Change Summary:
-
Added the missing unit test side of this change.
- Commits:
-
Summary ID 2fb2b9cc7ee3b944a8a381cba9eb7fdc12b16acc b13650c5e02e5094105bdf3cec99f938843dd863