• 
      

    Add official support for Breezy in the Bazaar SCMTool.

    Review Request #12145 — Created March 14, 2022 and submitted

    Information

    Review Board
    release-5.0.x

    Reviewers

    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 as bzr was symlinked to brz in
    the system path, but our rbssh 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 see bzr 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 of brz. If found, we assume Breezy support, and adjust
    settings accordingly. Otherwie, we assume brz 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.

    Summary ID
    Add official support for Breezy in the Bazaar SCMTool.
    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 as `bzr` was symlinked to `brz` in the system path, but our `rbssh` 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 see `bzr` 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 of `brz`. If found, we assume Breezy support, and adjust settings accordingly. Otherwie, we assume `brz` 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.
    370fec10069ebfdbd191f0d6d6f25ac088910e36
    Description From Last Updated

    Shouldn't this be, "then brz will be returned"?

    david david

    Typo: returend -> returned

    david david

    You say 4.0.7 but this change is on release-5.0.x?

    david david

    Want to update this to say bzr/brz?

    david david
    chipx86
    david
    1. 
        
    2. reviewboard/scmtools/bzr/__init__.py (Diff revision 2)
       
       
      Show all issues

      Shouldn't this be, "then brz will be returned"?

    3. reviewboard/scmtools/bzr/__init__.py (Diff revision 2)
       
       
      Show all issues

      Typo: returend -> returned

    4. reviewboard/scmtools/bzr/__init__.py (Diff revision 2)
       
       
      Show all issues

      You say 4.0.7 but this change is on release-5.0.x?

      1. For now. I want to test it here (since it's most broken in a non-2.7 environment), verify some stuff with CI, backport closer to 4.0.7 release.

    5. Show all issues

      Want to update this to say bzr/brz?

    6. 
        
    chipx86
    david
    1. Ship It!
    2. 
        
    chipx86
    Review request changed
    Status:
    Completed
    Change Summary:
    Pushed to release-5.0.x (7df4ccb)