#!/usr/bin/env bash --login 

if ! which bzr > /dev/null; then
	echo "Could not locate Bazaar. Is it installed on this system?" >&2
	exit 201
fi

if ! bzr alias --remove diff 2>&1; then
	echo "Could not remove the diff alias"
	exit 2
fi

if ! bzr config --scope=bazaar --remove bzr.mergetool.Kaleidoscope 2>&1; then
	echo "Could not remove Kaleidoscope as a merge tool" >&2
	exit 3
fi

if ! bzr config --scope=bazaar --remove bzr.default_mergetool 2>&1; then
	echo "Could not set Kaleidoscope as the default merge tool" >&2
	exit 4
fi
