From 31ced09fa673d02bfbf84df6184dbb5b2628b905 Mon Sep 17 00:00:00 2001 From: "mhm@chromium.org" Date: Mon, 14 Mar 2011 01:37:35 +0000 Subject: [PATCH] Add a message to the screen when depot tools have been updated. BUG=none TEST=message appears only when new revision changes. Review URL: http://codereview.chromium.org/6691001 git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@77997 0039d316-1c4b-4281-b951-d872f2087c98 --- update_depot_tools | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/update_depot_tools b/update_depot_tools index eec15e518..95cd4c6a9 100755 --- a/update_depot_tools +++ b/update_depot_tools @@ -38,6 +38,10 @@ function test_git_svn { fi } +# Get the current SVN revision. +get_svn_revision() { + echo `svn info | awk '{ if ($1 == "Revision:") { print $2 }}'` +} # Update git checkouts prior the cygwin check, we don't want to use msysgit. if [ "X$DEPOT_TOOLS_UPDATE" != "X0" -a -e "$base_dir/.git" ] @@ -57,5 +61,10 @@ if [ "X$DEPOT_TOOLS_UPDATE" != "X0" -a -e "$base_dir/.svn" ] then # Update the bootstrap directory to stay up-to-date with the latest # depot_tools. + BEFORE_REVISION=$(get_svn_revision) svn -q up "$base_dir" + AFTER_REVISION=$(get_svn_revision) + if [[ "$BEFORE_REVISION" != "$AFTER_REVISION" ]]; then + echo "Depot Tools has been updated to revision $AFTER_REVISION." + fi fi