From 326fd8a230286e9ddac2c0611f71ae54149d2b20 Mon Sep 17 00:00:00 2001 From: Joshua Hesketh Date: Fri, 5 Jun 2015 12:37:44 +1000 Subject: Make git more verbose for debugging Change-Id: I05ebe9e58bacc324dbe4430ef9627dd81c14f023 --- turbo_hipster/lib/gerrit-git-prep.sh | 14 +++++++------- turbo_hipster/lib/models.py | 1 + 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/turbo_hipster/lib/gerrit-git-prep.sh b/turbo_hipster/lib/gerrit-git-prep.sh index 5636241..a0b1349 100755 --- a/turbo_hipster/lib/gerrit-git-prep.sh +++ b/turbo_hipster/lib/gerrit-git-prep.sh @@ -50,19 +50,19 @@ then rm -fr .[^.]* * if [ -d /opt/git/$ZUUL_PROJECT/.git ] then - git clone file:///opt/git/$ZUUL_PROJECT . + git clone -vvvvvv file:///opt/git/$ZUUL_PROJECT . else - git clone $GIT_ORIGIN/$ZUUL_PROJECT . + git clone -vvvvvv $GIT_ORIGIN/$ZUUL_PROJECT . fi fi -git remote set-url origin $GIT_ORIGIN/$ZUUL_PROJECT +git remote -vvvvvv set-url origin $GIT_ORIGIN/$ZUUL_PROJECT # attempt to work around bugs 925790 and 1229352 -if ! git remote update +if ! git remote -vvvvvv update then echo "The remote update failed, so garbage collecting before trying again." git gc - git remote update + git remote -vvvvvv update fi git reset --hard @@ -73,12 +73,12 @@ fi if echo "$ZUUL_REF" | grep -q ^refs/tags/ then - git fetch --tags $ZUUL_URL/$ZUUL_PROJECT + git fetch -vvvvvv --tags $ZUUL_URL/$ZUUL_PROJECT git checkout $ZUUL_REF git reset --hard $ZUUL_REF elif [ -z "$ZUUL_NEWREV" ] then - git fetch $ZUUL_URL/$ZUUL_PROJECT $ZUUL_REF + git fetch -vvvvvv $ZUUL_URL/$ZUUL_PROJECT $ZUUL_REF git checkout FETCH_HEAD git reset --hard FETCH_HEAD else diff --git a/turbo_hipster/lib/models.py b/turbo_hipster/lib/models.py index c64bf63..39d8b89 100644 --- a/turbo_hipster/lib/models.py +++ b/turbo_hipster/lib/models.py @@ -320,6 +320,7 @@ class ShellTask(Task): return_code = 1 while return_code != 0: tries += 1 + env.update({'GIT_CURL_VERBOSE': 1, 'GIT_TRACE': 1}) return_code = utils.execute_to_log(cmd, self.git_prep_log, env=env, cwd=local_path) if tries == 2: -- cgit v1.2.1