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

Unified Diff: update_depot_tools.bat

Issue 9751009: Fix git depot_tools update flow. (Closed) Base URL: http://src.chromium.org/svn/trunk/tools/depot_tools
Patch Set: fix to unix endlines 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
new file mode 100644
index 0000000000000000000000000000000000000000..990ea31eea56668ce52e6d7864bd5e7df8eb3fba
--- /dev/null
+++ b/update_depot_tools.bat
@@ -0,0 +1,35 @@
+@echo off
+:: Copyright (c) 2012 The Chromium Authors. All rights reserved.
+:: Use of this source code is governed by a BSD-style license that can be
+:: found in the LICENSE file.
+
+:: This batch file will try to sync the root directory.
+
+setlocal
+
+:: Will download svn and python.
+:: If you don't want to install the depot_tools version of these tools, remove
+:: the 'force' option on the next command. The tools will be installed only if
+:: not already in the PATH environment variable.
+call "%~dp0bootstrap\win\win_tools.bat" force
+if errorlevel 1 goto :EOF
+
+:: Shall skip automatic update?
+IF "%DEPOT_TOOLS_UPDATE%" == "0" GOTO :EOF
+
+:: We need either .\.svn\. or .\.git\. to be able to sync.
+IF EXIST "%~dp0.svn\." GOTO :SVN_UPDATE
+IF EXIST "%~dp0.git\." GOTO :GIT_UPDATE
+echo Error updating depot_tools, no revision tool found.
+goto :EOF
+
+
+:SVN_UPDATE
+call svn up -q "%~dp0."
+goto :EOF
+
+
+:GIT_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