Commit 69b67588 authored by agable@chromium.org's avatar agable@chromium.org

Run "svn revert" in update_depot_tools --force

R=iannucci@chromium.org, szager@chromium.org, pdr@chromium.org
BUG=435729

Review URL: https://codereview.chromium.org/756233003

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@293112 0039d316-1c4b-4281-b951-d872f2087c98
parent 5bde64ed
......@@ -6,7 +6,7 @@
base_dir=$(dirname "$0")
if [[ "#grep#fetch#cleanup#diff#" != *"#$1#"* ]]; then
"$base_dir"/update_depot_tools
"$base_dir"/update_depot_tools "$@"
fi
PYTHONDONTWRITEBYTECODE=1 exec python "$base_dir/gclient.py" "$@"
......@@ -8,7 +8,7 @@ setlocal
PATH=%~dp0;%PATH%
:: Synchronize the root directory before deferring control back to gclient.py.
call "%~dp0\update_depot_tools.bat"
call "%~dp0\update_depot_tools.bat" %*
:: Defer control.
%~dp0python "%~dp0\gclient.py" %*
......@@ -140,6 +140,9 @@ if [ "X$DEPOT_TOOLS_UPDATE" != "X0" -a -e "$base_dir/.svn" ]
then
# Update the root directory to stay up-to-date with the latest depot_tools.
BEFORE_REVISION=$(get_svn_revision)
if [[ $* =~ '--force' ]]; then
"$SVN" -q revert -R "$base_dir"
fi
"$SVN" -q up "$base_dir"
AFTER_REVISION=$(get_svn_revision)
if [[ "$BEFORE_REVISION" != "$AFTER_REVISION" ]]; then
......
......@@ -38,7 +38,12 @@ goto :EOF
:SVN_UPDATE
call svn up -q "%DEPOT_TOOLS_DIR%."
FOR %%A IN (%*) DO (
IF "%%A" == "--force" (
call svn -q revert -R "%DEPOT_TOOLS_DIR%."
)
)
call svn -q up "%DEPOT_TOOLS_DIR%."
goto :EOF
......@@ -58,9 +63,9 @@ for /F %%x in ('git config --get remote.origin.url') DO (
call git fetch -q origin > NUL
call git rebase -q origin/master > NUL
if errorlevel 1 echo Failed to update depot_tools.
goto :EOF
:GIT_SVN_UPDATE
cd /d "%DEPOT_TOOLS_DIR%."
call git svn rebase -q -q
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment