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

Unified Diff: update_depot_tools.bat

Issue 11778024: Add prompt for updating remote URL to git-on-borg. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools@master
Patch Set: nits scratched Created 7 years, 11 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 10b35fb909d19d07d5ed799d8393289a715a9217..f880d9b895a384c616915c6d1f4ce5bc7c063319 100644
--- a/update_depot_tools.bat
+++ b/update_depot_tools.bat
@@ -7,6 +7,8 @@
setlocal
+set GIT_URL=https://chromium.googlesource.com/chromium/tools/depot_tools.git
+
:: 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
@@ -35,6 +37,15 @@ goto :EOF
cd /d "%~dp0."
call git config remote.origin.fetch > NUL
if errorlevel 1 goto :GIT_SVN_UPDATE
+for /F %%x in ('git config --get remote.origin.url') DO (
+ IF not "%%x" == "%GIT_URL%" (
+ echo Your depot_tools checkout is configured to fetch from an obsolete URL
+ choice /N /T 60 /D N /M "Would you like to update it? [y/N]: "
+ IF not errorlevel 2 (
+ call git config remote.origin.url "%GIT_URL%"
+ )
+ )
+)
call git fetch -q origin > NUL
call git rebase -q origin/master > NUL
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