From 0478d63bccdd8a233cd40ceabbfae01805726f7a Mon Sep 17 00:00:00 2001 From: "iannucci@chromium.org" Date: Thu, 31 Mar 2016 01:09:09 +0000 Subject: [PATCH] Achieve feature pairity with pre 2.7.4 XCopy the docs from depot_tools. It's pretty fast and doesn't require reinventing the world right now. CIPD will be a better long-term strategy anyway. R=dnj@google.com, dnj@chromium.org BUG=598959 Review URL: https://codereview.chromium.org/1844043004 . git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@299577 0039d316-1c4b-4281-b951-d872f2087c98 --- bootstrap/win/win_tools.bat | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/bootstrap/win/win_tools.bat b/bootstrap/win/win_tools.bat index f6f8df54b..46383be32 100644 --- a/bootstrap/win/win_tools.bat +++ b/bootstrap/win/win_tools.bat @@ -108,7 +108,7 @@ if exist "%GIT_EXE_PATH%" ( rem batch script to make sure it points to the desired version. find "%GIT_BIN_DIR%" "%WIN_TOOLS_ROOT_DIR%\git.bat" 2>nul 1>nul if errorlevel 1 goto :GIT_MAKE_BATCH_FILES - goto :SVN_CHECK + goto :SYNC_GIT_HELP_FILES ) goto :GIT_INSTALL @@ -164,8 +164,20 @@ call "%WIN_TOOLS_ROOT_DIR%\git.bat" config --system core.autocrlf false call "%WIN_TOOLS_ROOT_DIR%\git.bat" config --system core.filemode false call "%WIN_TOOLS_ROOT_DIR%\git.bat" config --system core.preloadindex true call "%WIN_TOOLS_ROOT_DIR%\git.bat" config --system core.fscache true -goto :SVN_CHECK +:SYNC_GIT_HELP_FILES +:: Copy all the depot_tools docs into the mingw64 git docs root. +:: /i : Make sure xcopy knows that the destination names a folder, not a file +:: /q : Make xcopy quiet (though it still prints a `X File(s) copied` message +:: which is why we have the > NUL) +:: /d : Copy source files that are newer than the corresponding destination +:: files only. This prevents excessive copying when none of the docs +:: actually changed. +:: /y : Don't prompt for overwrites (yes) +if defined GIT_PORTABLE_FLOW ( + xcopy /i /q /d /y "%WIN_TOOLS_ROOT_DIR%\man\html\*" "%GIT_INST_DIR%\mingw64\share\doc\git-doc" > NUL +) +goto :SVN_CHECK :GIT_FAIL echo ... Failed to checkout git automatically.