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

Unified Diff: update_depot_tools.bat

Issue 12755033: Execute a temp copy of update_depot_tools.bat (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Created 7 years, 9 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
« .gitignore ('K') | « .gitignore ('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 f880d9b895a384c616915c6d1f4ce5bc7c063319..340c0147831415df6a4f773ff9d61b845024027f 100644
--- a/update_depot_tools.bat
+++ b/update_depot_tools.bat
@@ -7,6 +7,15 @@
setlocal
+:: Windows sometimes freaks out if a file is overwritten while it's being
iannucci 2013/03/20 21:06:14 'sometimes'?
szager1 2013/03/20 21:19:10 I haven't explored every nuance of this behavior (
iannucci 2013/03/20 21:33:14 I was meaning that the 'sometimes' can just be omi
M-A Ruel 2013/03/20 21:51:22 Exact, cmd.exe keeps a byte offset and re-reads th
szager1 2013/03/20 21:53:52 OK, I removed 'sometimes'. Why give false hope?
+:: executed. Copy this script off to a temporary location and reinvoke from
+:: there before running any svn or git commands.
+IF %~nx0==update_depot_tools.bat (
+ COPY /Y %~dp0update_depot_tools.bat %~dp0update_depot_tools_tmp.bat >nul
iannucci 2013/03/20 21:06:14 is %~dp guaranteed to end with a r'\' ?
M-A Ruel 2013/03/20 21:06:37 Please use %TEMP%\update_depot_tools_%RANDOM%.bat,
szager1 2013/03/20 21:19:10 That means that I have to fix every occurence of %
M-A Ruel 2013/03/20 21:51:22 I don't mind about not using random but you should
szager1 2013/03/20 21:53:52 Hmmm... I've never seen it any other way.
szager1 2013/03/20 21:53:52 Hmmm... I've never seen it any other way. Theoret
szager1 2013/03/20 22:03:44 Done.
+ if errorlevel 1 goto :EOF
+ %~dp0update_depot_tools_tmp.bat %*
iannucci 2013/03/20 21:06:14 Should we goto :EOF after this? I forget how batch
szager1 2013/03/20 21:19:10 Empirical evidence suggests that it's not necessar
M-A Ruel 2013/03/20 21:51:22 No it's not necessary. As long as there is not 'ca
+)
+
set GIT_URL=https://chromium.googlesource.com/chromium/tools/depot_tools.git
:: Will download svn and python.
« .gitignore ('K') | « .gitignore ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698