launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #29056
[Merge] ~cjwatson/launchpad:rocketfuel-setup-no-bzr into launchpad:master
Colin Watson has proposed merging ~cjwatson/launchpad:rocketfuel-setup-no-bzr into launchpad:master.
Commit message:
Simplify rocketfuel-setup to avoid relying on bzr
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/+git/launchpad/+merge/428845
The only remaining use of `bzr` here was to find out whether the user has any SSH keys registered with Launchpad, which we can instead do with a simple `curl`.
--
Your team Launchpad code reviewers is requested to review the proposed merge of ~cjwatson/launchpad:rocketfuel-setup-no-bzr into launchpad:master.
diff --git a/utilities/rocketfuel-setup b/utilities/rocketfuel-setup
index e4e1237..06e5d2c 100755
--- a/utilities/rocketfuel-setup
+++ b/utilities/rocketfuel-setup
@@ -233,22 +233,10 @@ fi
mkdir -p "$LP_PROJECT_ROOT"
cd "$LP_PROJECT_ROOT" || exit 1
-echo "Logging bzr into Launchpad (it's okay if this errors)..."
-if ! bzr launchpad-login "$lpusername"; then
- echo ""
- echo "You can ignore any error above about not registering an SSH key"
- echo "with Launchpad. Registering an SSH key is only important if you"
- echo "are writing data to Launchpad, or trying to access private data."
- echo ""
-fi
-
-# Make sure "git clone lp:..." works. Yes, it's pretty odd to use bzr to
-# help configure git, but it knows how to check whether the user has SSH
-# keys. If we eventually want to drop our dependency on bzr then we can
-# write this out longhand in Python.
+# Make sure "git clone lp:..." works.
echo "Configuring git..."
if [ "$(git ls-remote --get-url lp:launchpad)" = lp:launchpad ]; then
- if bzr launchpad-login --verbose 2>/dev/null | grep -q 'has SSH keys'; then
+ if [ "$(curl --fail --silent "https://launchpad.net/~$lpusername/+sshkeys")" ]; then
git config --global url.git+ssh://git.launchpad.net/.insteadof lp:
else
git config --global url.https://git.launchpad.net/.insteadof lp: