Commit 9f36c389 authored by szager@chromium.org's avatar szager@chromium.org

Add prompt for updating remote URL to git-on-borg.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@175419 0039d316-1c4b-4281-b951-d872f2087c98
parent 6d2d7217
......@@ -22,7 +22,7 @@ fi
OUTPUT="$(uname | grep 'MINGW')"
MINGW=$?
CANONICAL_GIT_URL="https://chromium.googlesource.com/chromium/tools/depot_tools"
CANONICAL_GIT_URL="https://chromium.googlesource.com/chromium/tools/depot_tools.git"
SVN="svn"
if [ -d "$base_dir/svn_bin" -a $MINGW = 0 ]; then
......
......@@ -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
......
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