From 216492603a69f543a414402a6b9007738395a9d8 Mon Sep 17 00:00:00 2001 From: "ilevy@chromium.org" Date: Fri, 9 Nov 2012 03:30:05 +0000 Subject: [PATCH] Improve error message when gclient can't update R=maruel@chromium.org Review URL: https://chromiumcodereview.appspot.com/11360150 git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@166846 0039d316-1c4b-4281-b951-d872f2087c98 --- update_depot_tools | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/update_depot_tools b/update_depot_tools index fe36f0b28a..dc58e5211f 100755 --- a/update_depot_tools +++ b/update_depot_tools @@ -69,9 +69,15 @@ function is_git_clone_repo { function update_git_repo { if is_git_clone_repo; then - git fetch -q origin > /dev/null - git rebase -q origin/master > /dev/null - return 0 + git fetch -q origin &> /dev/null + local REBASE_TXT=$(git rebase -q origin/master 2>&1) + local STATUS=$? + if [[ $STATUS != 0 ]]; then + echo "depot_tools update failed. Conflict in $base_dir" >&2 + echo "$REBASE_TXT" >&2 + git rebase --abort 2> /dev/null + fi + return $STATUS fi test_git_svn