diff options
author | Ben Hutchings <ben.hutchings@codethink.co.uk> | 2020-07-09 19:49:36 +0100 |
---|---|---|
committer | Ben Hutchings <ben.hutchings@codethink.co.uk> | 2020-07-09 23:20:25 +0100 |
commit | 4fe8ec373ec8005fe34eb584e53fc8215e9bb995 (patch) | |
tree | c218e446b011baa637c068a4bd2f7d3042079b0d /tests | |
parent | 63ecde7b965ccb19c5cbec15a2bae2e54a0de9d5 (diff) | |
download | lorry-4fe8ec373ec8005fe34eb584e53fc8215e9bb995.tar.gz |
Add support for Breezy (brz) as alternative Bazaar implementation
The original Bazaar implementation (bzr) only runs on Python 2, but
there is a fork known as Breezy (brz) that has been ported to Python 3.
To support environments without Python 2, allow using Breezy:
* Add a setting 'bazaar-command' that specifies which command to run
* Set the default based on a path search, preferring 'bzr' but using
'brz' if only 'brz' is found
* Implement a similar fallback in the test setup for Bazaar import
* Update README to mention Breezy as an alternative. The
'fastimport' extension is included in it rather than being a
separate package.
Closes #3.
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/bzr-single-commit.setup | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/bzr-single-commit.setup b/tests/bzr-single-commit.setup index dcd70cf..0c28df2 100755 --- a/tests/bzr-single-commit.setup +++ b/tests/bzr-single-commit.setup @@ -20,6 +20,11 @@ set -e +# If bzr is not available and brz is, use brz instead +if ! command -v bzr >/dev/null && command -v brz >/dev/null; then + bzr() { brz "$@"; } +fi + # create the repository repo="$DATADIR/bzr-test-repo" mkdir "$repo" |