Fix a compatibility issue with our custom rbssh plugin for Bazaar.

Review Request #11755 — Created July 28, 2021 and submitted

Information

Review Board
release-4.0.x

Reviewers

We bundle a plugin for Bazaar that enables rbssh as a SSH transport.
This plugin has been the source of some frustration around broken unit
tests, and potentially issues in certain production environments.

The plugin made use of a Django import, just to get access to six, for
the sole purpose of six.text_type. The problem was, if Bazaar was
installed system-wide, and Review Board was installed in a virtualenv,
SSH operations would fail. bzr locally would invoke bzr on the other
side of the SSH connection, but outside of the virtualenv, and the
Django import could fail.

This import isn't really useful. It's easy enough to %-format the
number we wanted into a string. This change does that, simplifying the
code and preventing this common problem.

Encountered this frequently with unit tests. They now pass.

Summary ID
Fix a compatibility issue with our custom rbssh plugin for Bazaar.
We bundle a plugin for Bazaar that enables rbssh as a SSH transport. This plugin has been the source of some frustration around broken unit tests, and potentially issues in certain production environments. The plugin made use of a Django import, just to get access to `six`, for the sole purpose of `six.text_type`. The problem was, if Bazaar was installed system-wide, and Review Board was installed in a virtualenv, SSH operations would fail. `bzr` locally would invoke `bzr` on the other side of the SSH connection, but outside of the virtualenv, and the Django import could fail. This import isn't really useful. It's easy enough to `%`-format the number we wanted into a string. This change does that, simplifying the code and preventing this common problem.
2232a1c473cd66d494a407c3c7718542410f0756
david
  1. Ship It!
  2. 
      
chipx86
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-4.0.x (5335572)
Loading...