Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(201)

Unified Diff: update_depot_tools.bat

Issue 10263004: Handle updating depot_tools repos that are git cloned. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: redirect output to null Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « update_depot_tools ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: update_depot_tools.bat
diff --git a/update_depot_tools.bat b/update_depot_tools.bat
index 990ea31eea56668ce52e6d7864bd5e7df8eb3fba..d44fba63f9ed62d99e669063414782a171be0147 100644
--- a/update_depot_tools.bat
+++ b/update_depot_tools.bat
@@ -13,6 +13,8 @@ setlocal
:: not already in the PATH environment variable.
call "%~dp0bootstrap\win\win_tools.bat" force
if errorlevel 1 goto :EOF
+:: Now clear errorlevel so it can be set by other programs later.
+set errorlevel=
:: Shall skip automatic update?
IF "%DEPOT_TOOLS_UPDATE%" == "0" GOTO :EOF
@@ -31,5 +33,13 @@ goto :EOF
:GIT_UPDATE
cd /d "%~dp0."
+call git config remote.origin.fetch > NUL
+if errorlevel 1 goto :GIT_SVN_UPDATE
+call git fetch -q origin > NUL
+call git rebase -q origin > NUL
+goto :EOF
+
+:GIT_SVN_UPDATE
+cd /d "%~dp0."
call git svn rebase -q -q
goto :EOF
« no previous file with comments | « update_depot_tools ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698