Commit Graph

53 Commits (main)

Author SHA1 Message Date
Anne Redulla 7c4bd3f94e [win-bootstrap] Update the comments in update_depot_tools.bat
Also adds an echo to win_tools.bat so a user will know when the
bootstrapping script is skipped after a CIPD install error.
This should hopefully help when troubleshooting.

Bug: b/360206460
Change-Id: Ic8bfcbddfe4681a7716ca9f3793d045e0de704cf
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6242904
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Anne Redulla <aredulla@google.com>
3 weeks ago
Anne Redulla 6c81fd0ae3 Revert "[win-bootstrap] Cleanup update_depot_tools.bat for lack of git-for-windows"
This reverts commit 524abbc50e.

Reason for revert: restore calling `bootstrap\win_tools.bat` on git error to fix b/394767578

Original change's description:
> [win-bootstrap] Cleanup update_depot_tools.bat for lack of git-for-windows
>
> Bug: b/360206460
> Change-Id: I1a4d9ac8a4e0f19356e22bc15a664cc838e52cd3
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6205947
> Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
> Commit-Queue: Anne Redulla <aredulla@google.com>

Bug: b/360206460
Change-Id: Ifdec35e6ce594688f461f132f302c5b803640409
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6238906
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Anne Redulla <aredulla@google.com>
3 weeks ago
Anne Redulla 524abbc50e [win-bootstrap] Cleanup update_depot_tools.bat for lack of git-for-windows
Bug: b/360206460
Change-Id: I1a4d9ac8a4e0f19356e22bc15a664cc838e52cd3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6205947
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Anne Redulla <aredulla@google.com>
4 weeks ago
Josip Sokcevic dc2edc59f6 Remove check for canonical depot_tools URL
The check was originally introduced as part of svn -> git migration, and
no longer needed. This can use issues if user runs vendored depot_tools
inside chromium/src.

R=ddoman

Bug: 347356471
Change-Id: I1a082886933f23e1d7c53f2da906d0727c180a75
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6209088
Reviewed-by: Scott Lee <ddoman@chromium.org>
Commit-Queue: Josip Sokcevic <sokcevic@chromium.org>
1 month ago
Takuto Ikuta 495b23b39a remove goma CIPD package
goma is not used by developers now.

Bug: b/304421889
Change-Id: I68ffd73336f2303484dd44bce6c3984b06faa681
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5395370
Reviewed-by: Junji Watanabe <jwata@google.com>
Reviewed-by: Joanna Wang <jojwang@chromium.org>
Commit-Queue: Takuto Ikuta <tikuta@chromium.org>
Reviewed-by: Fumitoshi Ukai <ukai@google.com>
11 months ago
Aleksey Khoroshilov 44c05276d7 Call goma_ctl update_hook only after python3 is bootstrapped.
goma_ctl.bat requires python3 to be available, otherwise we get this:
'"\python3.exe"' is not recognized as an internal or external command.

Change-Id: I60734f8f5fb878eff451de9dad13531ac360480a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4532006
Reviewed-by: Fumitoshi Ukai <ukai@google.com>
Commit-Queue: Gavin Mak <gavinmak@google.com>
Auto-Submit: Aleksey Khoroshilov <akhoroshilov@brave.com>
Reviewed-by: Gavin Mak <gavinmak@google.com>
2 years ago
Fumitoshi Ukai 7879da9e9d run `goma_ctl update_hook` in update_depot_tools
to make sure goma runs the latest version,
run `goma_ctl update_hook` in update_depot_tools

Bug: b/260864926
Change-Id: If8a6bc1b6e3b18339672dc26f609fab2d84aa987
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4160794
Auto-Submit: Fumitoshi Ukai <ukai@google.com>
Reviewed-by: Bruce Dawson <brucedawson@chromium.org>
Reviewed-by: Takuto Ikuta <tikuta@chromium.org>
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Gavin Mak <gavinmak@google.com>
Reviewed-by: Junji Watanabe <jwata@google.com>
2 years ago
Will Cassella 253031197f Allow depot_tools/.git to be a file
This CL relaxes the check for the .git folder on Windows so that it
may be either a file or a folder, as may be the case if depot_tools
is a git submodule or a worktree.

Bug: 1333997
Change-Id: Ib805912903696fc247f85d15c35b6e3093cd57f9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3736684
Commit-Queue: Will Cassella <cassew@chromium.org>
Reviewed-by: Bruce Dawson <brucedawson@chromium.org>
Reviewed-by: Aravind Vasudevan <aravindvasudev@google.com>
3 years ago
Will Cassella 418f021a0e Print helpful error message when updating depot_tools on Windows
The depot_tools directory may get into a state in which its no longer a
git repo, in which case we can't update it. On Windows this would cause
the update_depot_tools.bat script to fail with a somewhat confusing
error message, this CL fixes that to inform the user what happened and
what they should do about it.

Bug: 1333997
Change-Id: I2c60fc46f1fae7811ff6610e25380d08010d0597
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3718926
Reviewed-by: Bruce Dawson <brucedawson@chromium.org>
Commit-Queue: Will Cassella <cassew@chromium.org>
Reviewed-by: Brian Sheedy <bsheedy@chromium.org>
Reviewed-by: Aravind Vasudevan <aravindvasudev@google.com>
3 years ago
Aleksey Khoroshilov 544594e0b2 Reland "Make depot_tools scripts return exit codes properly on all platforms."
This reverts commit 6754c49e02.

Reason for revert: will be relanded with fixed batch comments that triggered parser error.

Original change's description:
> Revert "Make depot_tools scripts return exit codes properly on all platforms."
>
> This reverts commit 7c4f7ec408.
>
> Reason for revert: bugs reported by users (see comments in Gerrit).
> error: block. was unexpected at this time.
>
> Original change's description:
> > Make depot_tools scripts return exit codes properly on all platforms.
> >
> > Changes:
> > 1. Windows: exit /b %errorlevel% should be used instead of goto :EOF to get valid exit codes during cmd /c <script>.bat invocation.
> > 2. Windows: delayed var expansion is required in update_depot_tools.bat exit code generation.
> > 3. Posix: update_depot_tools returns exit code from update_git_repo function in case of a failure.
> >
> > A rule of thumb on Windows: goto :EOF should not be used if %errorlevel% must be returned for all possible invocations.
> >
> > Test case for update_depot_tools changes:
> > 1. Make a change to depot_tools sources that will conflict with next depot_tools update
> > 2. Run update_depot_tools either directly or via gclient
> > 3. Expect a git error is triggered
> > 4. Inspect %errorlevel% or $? depending on platform
> > 5. Expected 1, but the actual result is 0.
> >
> > Test case for changes in other .bat files:
> > 1. Make a change to depot_tools sources that will conflict with next depot_tools update
> > 2. Run cmd /c gclient
> > 3. Expect a git error is triggered
> > 4. Inspect %errorlevel%
> > 5. Expected 1, but the actual result is 0.
> >
> > Change-Id: I64459982bcd9cc3db1319a9b39224b7a7af8c5aa
> > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3688632
> > Reviewed-by: Josip Sokcevic <sokcevic@google.com>
> > Commit-Queue: Josip Sokcevic <sokcevic@google.com>
> > Auto-Submit: Aleksey Khoroshilov <akhoroshilov@brave.com>
> > Reviewed-by: Bruce Dawson <brucedawson@chromium.org>
>
> Change-Id: I85d598af01d75588cdee77165d6af22270ee031d
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3694139
> Auto-Submit: Josip Sokcevic <sokcevic@google.com>
> Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>

Change-Id: I377f966ea1b1a567de815caca703b5e124a76b64
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3696396
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
Reviewed-by: Bruce Dawson <brucedawson@chromium.org>
Commit-Queue: Josip Sokcevic <sokcevic@google.com>
Auto-Submit: Aleksey Khoroshilov <akhoroshilov@brave.com>
3 years ago
Josip Sokcevic 6754c49e02 Revert "Make depot_tools scripts return exit codes properly on all platforms."
This reverts commit 7c4f7ec408.

Reason for revert: bugs reported by users (see comments in Gerrit).
error: block. was unexpected at this time.

Original change's description:
> Make depot_tools scripts return exit codes properly on all platforms.
>
> Changes:
> 1. Windows: exit /b %errorlevel% should be used instead of goto :EOF to get valid exit codes during cmd /c <script>.bat invocation.
> 2. Windows: delayed var expansion is required in update_depot_tools.bat exit code generation.
> 3. Posix: update_depot_tools returns exit code from update_git_repo function in case of a failure.
>
> A rule of thumb on Windows: goto :EOF should not be used if %errorlevel% must be returned for all possible invocations.
>
> Test case for update_depot_tools changes:
> 1. Make a change to depot_tools sources that will conflict with next depot_tools update
> 2. Run update_depot_tools either directly or via gclient
> 3. Expect a git error is triggered
> 4. Inspect %errorlevel% or $? depending on platform
> 5. Expected 1, but the actual result is 0.
>
> Test case for changes in other .bat files:
> 1. Make a change to depot_tools sources that will conflict with next depot_tools update
> 2. Run cmd /c gclient
> 3. Expect a git error is triggered
> 4. Inspect %errorlevel%
> 5. Expected 1, but the actual result is 0.
>
> Change-Id: I64459982bcd9cc3db1319a9b39224b7a7af8c5aa
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3688632
> Reviewed-by: Josip Sokcevic <sokcevic@google.com>
> Commit-Queue: Josip Sokcevic <sokcevic@google.com>
> Auto-Submit: Aleksey Khoroshilov <akhoroshilov@brave.com>
> Reviewed-by: Bruce Dawson <brucedawson@chromium.org>

Change-Id: I85d598af01d75588cdee77165d6af22270ee031d
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3694139
Auto-Submit: Josip Sokcevic <sokcevic@google.com>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
3 years ago
Aleksey Khoroshilov 7c4f7ec408 Make depot_tools scripts return exit codes properly on all platforms.
Changes:
1. Windows: exit /b %errorlevel% should be used instead of goto :EOF to get valid exit codes during cmd /c <script>.bat invocation.
2. Windows: delayed var expansion is required in update_depot_tools.bat exit code generation.
3. Posix: update_depot_tools returns exit code from update_git_repo function in case of a failure.

A rule of thumb on Windows: goto :EOF should not be used if %errorlevel% must be returned for all possible invocations.

Test case for update_depot_tools changes:
1. Make a change to depot_tools sources that will conflict with next depot_tools update
2. Run update_depot_tools either directly or via gclient
3. Expect a git error is triggered
4. Inspect %errorlevel% or $? depending on platform
5. Expected 1, but the actual result is 0.

Test case for changes in other .bat files:
1. Make a change to depot_tools sources that will conflict with next depot_tools update
2. Run cmd /c gclient
3. Expect a git error is triggered
4. Inspect %errorlevel%
5. Expected 1, but the actual result is 0.

Change-Id: I64459982bcd9cc3db1319a9b39224b7a7af8c5aa
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3688632
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
Commit-Queue: Josip Sokcevic <sokcevic@google.com>
Auto-Submit: Aleksey Khoroshilov <akhoroshilov@brave.com>
Reviewed-by: Bruce Dawson <brucedawson@chromium.org>
3 years ago
Aleksey Khoroshilov df3228656a Set errorlevel in .bat wrappers on exit /b where appropriate.
Fixed goma_auth/ctl return code on Windows which was always zero.
Fixed other places where exit /b was used without %errorlevel%.

Change-Id: Ib0a647818c595f843a95762db023b111a447a66a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3532153
Reviewed-by: Takuto Ikuta <tikuta@chromium.org>
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
Auto-Submit: Aleksey Khoroshilov <akhoroshilov@brave.com>
Commit-Queue: Josip Sokcevic <sokcevic@google.com>
3 years ago
Darshan Sen 0dc69c4e79 Replace all rem comments with :: comments in batch files
Though the Microsoft docs recommend using rem to write comments, it has
a shortcoming - redirection characters (< or >) or pipes (|) aren't
allowed. However, :: though undocumented, is a better alternative as it
allows such characters.

Signed-off-by: Darshan Sen <raisinten@gmail.com>
Change-Id: I95a0445168527ab5087246238f0216d5f6177046
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3400399
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
Reviewed-by: Marc-Antoine Ruel <maruel@chromium.org>
Commit-Queue: Marc-Antoine Ruel <maruel@chromium.org>
3 years ago
Josip Sokcevic 593a6b575b Fetch all refs/heads/* on depot_tools update
If user downloaded depot_tools.zip before 2021-03-11, it contained only
fetch for refs/heads/master. As main branch is a new default branch,
users need to update fetch ref in order to fetch chanes from main
branch.

R=ehmaldonado@google.com

Bug: 1187238
Change-Id: I78041fc74f1bb505db375b9c1dced38cdfc9b144
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2753834
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Commit-Queue: Josip Sokcevic <sokcevic@google.com>
4 years ago
Josip Sokcevic 89d2cc1ec4 Revert "Update depot_tools using main branch"
This reverts commit c2c576e940.

Reason for revert: windows zip archived linked in documentation
only fetches master branch, so that needs to resolved first.

Original change's description:
> Update depot_tools using main branch
>
> R=​ehmaldonado@chromium.org
>
> Change-Id: Ie8d00331d649fa33158bb78d0bb64eacd121f044
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2748935
> Commit-Queue: Josip Sokcevic <sokcevic@google.com>
> Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>

Change-Id: I873f84f8fbe3a6cde60955ca63eb81e6976dd1f8
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2748946
Auto-Submit: Josip Sokcevic <sokcevic@google.com>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
4 years ago
Josip Sokcevic c2c576e940 Update depot_tools using main branch
R=ehmaldonado@chromium.org

Change-Id: Ie8d00331d649fa33158bb78d0bb64eacd121f044
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2748935
Commit-Queue: Josip Sokcevic <sokcevic@google.com>
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
4 years ago
Bruce Dawson 3fb1d569de Fix command prompt title after update_depot_tools
Windows has a bug where it sometimes doesn't reset the command prompt
title when a batch file finishes executing. A simple repro is shown
here:

b1.bat:
echo In b1
if 1 == 1 (
  b2.bat
)

b2.bat:
echo In b2

If you run b1.bat then "b1" will stay as the title when the batch files
finish running. The solution is to use "call" followed by "exit".

This bug is particularly annoying when using tabs in the new Windows
Terminal. By working around the bug this makes it so that the tab titles
return to being useful indicators of when a batch file is completed.

A previous fix of this bug (in a different batch file) can be seen in
crrev.com/c/2133303.

Change-Id: Id563f3102751a91f46c5b25ce610af9ec7ab240a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2225340
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
5 years ago
Edward Lesmes 942c97d626 update_depot_tools: Pull changes first before updating tools on Win.
Update git checkout before updating the tools.
If the scripts to update the tools are broken in the current revision,
this will allow us to get a new, hopefully working, revision instead of
leaving us stuck on a broken one.

We already do this for Linux.

Change-Id: I31856ebbd659d5360ad705dc39e5856b4140a19f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2208625
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
5 years ago
Edward Lemur 24995256ee Reland "depot_tools: Bootstrap Python 3 on Linux/Mac"
Don't call ensure_bootstrap from update_depot_tools.
ensure_bootstrap also updates gsutil and all versions of pylint
which is slow, particularly on MinGW.

Original change's description:
> depot_tools: Bootstrap Python 3 on Linux/Mac
>
> This will make it possible for developers to execute depot_tools
> scripts using Python 3 in a known environment.
>
> Bug: 1002153
> Change-Id: I5ff492a49d227c1b5876f49adba020f51a575bdd
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1762664
> Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
> Reviewed-by: Dirk Pranke <dpranke@chromium.org>
> Reviewed-by: Andrii Shyshkalov <tandrii@google.com>

Bug: 1002153
Change-Id: Ia7579e440438897ba4a7c65a8b228dcfe7f28c86
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1810040
Auto-Submit: Edward Lesmes <ehmaldonado@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
6 years ago
Edward Lemur f73f0f401a Revert "Reland "depot_tools: Bootstrap Python 3 on Linux/Mac""
This reverts commits 0e85f633c7 and 9d25ad4192.

Reason for revert:

Causes problems for MinGW users.

Original change's description:
> Reland "depot_tools: Bootstrap Python 3 on Linux/Mac"
>
> This is a reland of dbca865e55
>
> Original change's description:
> > depot_tools: Bootstrap Python 3 on Linux/Mac
> >
> > This will make it possible for developers to execute depot_tools
> > scripts using Python 3 in a known environment.
> >
> > Bug: 1002153
> > Change-Id: I5ff492a49d227c1b5876f49adba020f51a575bdd
> > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1762664
> > Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
> > Reviewed-by: Dirk Pranke <dpranke@chromium.org>
> > Reviewed-by: Andrii Shyshkalov <tandrii@google.com>
>
> Bug: 1002153
> Change-Id: I6938a76ffa05366c21f7c56aed3d07ecb2b84443
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1798845
> Reviewed-by: Dirk Pranke <dpranke@chromium.org>
> Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>

TBR=iannucci@chromium.org,dpranke@chromium.org,tandrii@google.com,ehmaldonado@chromium.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: 1002153
Change-Id: I3ee87b95b2532ec694d7f4f87cce8cde8ccf86eb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1808137
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
6 years ago
Edward Lemur 0e85f633c7 Reland "depot_tools: Bootstrap Python 3 on Linux/Mac"
This is a reland of dbca865e55

Original change's description:
> depot_tools: Bootstrap Python 3 on Linux/Mac
> 
> This will make it possible for developers to execute depot_tools
> scripts using Python 3 in a known environment.
> 
> Bug: 1002153
> Change-Id: I5ff492a49d227c1b5876f49adba020f51a575bdd
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1762664
> Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
> Reviewed-by: Dirk Pranke <dpranke@chromium.org>
> Reviewed-by: Andrii Shyshkalov <tandrii@google.com>

Bug: 1002153
Change-Id: I6938a76ffa05366c21f7c56aed3d07ecb2b84443
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1798845
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
6 years ago
Edward Lesmes cc6f585f05 Revert "depot_tools: Bootstrap Python 3 on Linux/Mac"
This reverts commit dbca865e55.

Reason for revert:

Fails on Mac

$ gclient sync --with_branch_heads
awk: syntax error at source line 1
 context is
	match($0, >>>  /cpython3\/.*version:([.0-9a-zA-Z]+)/, <<<
awk: bailing out at source line 1
Could not extract Python 3 version from manifest.


Original change's description:
> depot_tools: Bootstrap Python 3 on Linux/Mac
> 
> This will make it possible for developers to execute depot_tools
> scripts using Python 3 in a known environment.
> 
> Bug: 1002153
> Change-Id: I5ff492a49d227c1b5876f49adba020f51a575bdd
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1762664
> Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
> Reviewed-by: Dirk Pranke <dpranke@chromium.org>
> Reviewed-by: Andrii Shyshkalov <tandrii@google.com>

TBR=iannucci@chromium.org,dpranke@chromium.org,tandrii@google.com,ehmaldonado@chromium.org

Change-Id: I8e03a9e22655491d0f8e8d214d04ba749c2ab8ab
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 1002153
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1797197
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
6 years ago
Edward Lemur dbca865e55 depot_tools: Bootstrap Python 3 on Linux/Mac
This will make it possible for developers to execute depot_tools
scripts using Python 3 in a known environment.

Bug: 1002153
Change-Id: I5ff492a49d227c1b5876f49adba020f51a575bdd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1762664
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Reviewed-by: Andrii Shyshkalov <tandrii@google.com>
6 years ago
Edward Lemur fedbb7dc89 update_depot_tools: Use git checkout -q origin/master
Bug: 996359
Change-Id: I7c87fd824103c91c1dd5b9b8975354732e5eb0a7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1765839
Auto-Submit: Edward Lesmes <ehmaldonado@chromium.org>
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Commit-Queue: Robbie Iannucci <iannucci@chromium.org>
6 years ago
Edward Lemur 7f90416c08 depot_tools: Use git-checkout instead of git-rebase.
Changes like crrev.com/c/1752507, where a file that was previously in
.gitignore becomes part of the repo, makes update_depot_tools fail
to rebase.

Use git checkout origin/master instead.

Bug: 996359
Change-Id: Ib1a43b8842cebce96ab1fabaedc8e5653b9a708e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1764708
Auto-Submit: Edward Lesmes <ehmaldonado@chromium.org>
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Commit-Queue: Robbie Iannucci <iannucci@chromium.org>
6 years ago
Dan Jacques 5aeeb72c33 [bootstraps] Sync at gclient, suppress output (#2)
Have the "update_depot_tools" script also do a CIPD tool sync. This will
ensure that users and systems have access to tooling at sync-time rather
than just-in-time loading them at execution time.

Update the tool boostraps to suppress any sort of syncing logs, if it
does happen. This will ensure that users who execute the tools don't see
unexpected output.

BUG=chromium:748651
TEST=local
  - Tested on Mac and Windows.

Change-Id: I1aad897d885a07beeac40a372a658681720efd2a
Reviewed-on: https://chromium-review.googlesource.com/591229
Commit-Queue: Daniel Jacques <dnj@chromium.org>
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
8 years ago
Dirk Pranke 44855b9498 Revert "[bootstraps] Sync at gclient, suppress output."
This reverts commit 4d92fe4300.

Reason for revert: This moved the logging from invoking `led` or `vpython` to whenever someone would run something that would end up invoking `update_depot_tools`. It's good that we are calling this when we run update_depot_tools, but we probably should've suppressed the logging there in at least the success case, because now things are even more confusing. See crbug.com/748651.

Original change's description:
> [bootstraps] Sync at gclient, suppress output.
> 
> Have the "update_depot_tools" script also do a CIPD tool sync. This will
> ensure that users and systems have access to tooling at sync-time rather
> than just-in-time loading them at execution time.
> 
> Update the tool boostraps to suppress any sort of syncing logic, if it
> does happen. This will ensure that users who execute the tools don't se
> unexpected output.
> 
> BUG=None
> TEST=local
>   - Tested on Mac and Windows.
> 
> R=​dpranke@chromium.org, iannucci@chromium.org
> 
> Change-Id: I8efce8c73cc4e82ffdf5067ba9b917119a81e843
> Reviewed-on: https://chromium-review.googlesource.com/581494
> Commit-Queue: Daniel Jacques <dnj@chromium.org>
> Reviewed-by: Robbie Iannucci <iannucci@chromium.org>

TBR=iannucci@chromium.org,dpranke@chromium.org,dnj@chromium.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: None
Change-Id: I2485c9dd2e48a8dbdeebfff5da9d4c708e0edcb7
Reviewed-on: https://chromium-review.googlesource.com/585867
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Dirk Pranke <dpranke@chromium.org>
8 years ago
Dan Jacques 4d92fe4300 [bootstraps] Sync at gclient, suppress output.
Have the "update_depot_tools" script also do a CIPD tool sync. This will
ensure that users and systems have access to tooling at sync-time rather
than just-in-time loading them at execution time.

Update the tool boostraps to suppress any sort of syncing logic, if it
does happen. This will ensure that users who execute the tools don't se
unexpected output.

BUG=None
TEST=local
  - Tested on Mac and Windows.

R=dpranke@chromium.org, iannucci@chromium.org

Change-Id: I8efce8c73cc4e82ffdf5067ba9b917119a81e843
Reviewed-on: https://chromium-review.googlesource.com/581494
Commit-Queue: Daniel Jacques <dnj@chromium.org>
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
8 years ago
Dan Jacques 13f258bf05 Remove SVN bootstrapping and some tooling.
Remove Windows SVN bootstrapping and some SVN tooling. Since
"depot_tools" is no longer sync'd to SVN, and we have been committed to
Git for years now, this is obsolete. Any transition code will never
reach SVN users, and any remaining code should not be used by Chromium
developers.

BUG=chromium:630904
TEST=unit

Change-Id: Ie984e8400a748702b125eaeed8157719ef4b88cc
Reviewed-on: https://chromium-review.googlesource.com/562748
Commit-Queue: Daniel Jacques <dnj@chromium.org>
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Reviewed-by: Aaron Gable <agable@chromium.org>
8 years ago
Dan Jacques 74d7e13315 [auto_update] Add control script, allow disable.
Enable a sentinel file to enable/disable "depot_tools" auto-updating.
This file, if present, indicates that automatic updating should not
occur.

Add a simple control script to enable/disable automatic updating.

BUG=chromium:727917
TEST=local
  - Ran locally, --enable, --disable.

R=iannucci@chromium.org, maruel@chromium.org, nodir@chromium.org

Change-Id: Id30a17586248228849d046f79d7e0bc445d97f97
Reviewed-on: https://chromium-review.googlesource.com/521884
Commit-Queue: Daniel Jacques <dnj@chromium.org>
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Reviewed-by: Marc-Antoine Ruel <maruel@chromium.org>
8 years ago
Aaron Gable a0e5cc40f0 Remove SVN code from update_depot_tools
R=maruel@chromium.org
BUG=600446

Review URL: https://codereview.chromium.org/2088653003 .
9 years ago
agable@chromium.org 17c4771ea6 Add warnings to SVN update_depot_tools
R=iannucci@chromium.org
BUG=600446

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@300660 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
sergiyb@chromium.org 150aa7b955 Re-land: Removed virtualenv from depot_tools
Original CL: https://codereview.chromium.org/1437483002/.

R=dnj@google.com, tandrii@chromium.org, dnj@chromium.org, pgervais@chromium.org
BUG=542922, 503067

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@297494 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
dnj@google.com 16ab651b2d Revert of Removed virtualenv from depot_tools (patchset #1 id:1 of https://codereview.chromium.org/1437483002/ )
Reason for revert:
This CL over-aggressively removed the Windows bootstrap code used by /gclient.bat, which in turn downloads/installs the Windows toolchain, including Python. Labs can no longer provision Windows bots because of this.

update_depot_tools.bat did more than initialize the virtualenv. It also downloaded and installed Python, Git, and Subversion on Windows systems.

I'm reverting to restore the toolchain so we can create new Windows bots.

Original issue's description:
> Removed virtualenv from depot_tools
>
> This effectively reverts http://crrev.com/1195423002 and
> http://crrev.com/1205873002.
>
> R=pgervais@chromium.org, tandrii@chromium.org
> TBR=pgervais@chromium.org  # i wanna get my Fixit credit today :-)
> BUG=542922,503067
>
> Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=297491

TBR=pgervais@chromium.org,tandrii@chromium.org,sergiyb@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=542922,503067

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@297493 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
sergiyb@chromium.org 9ca2fc13f9 Removed virtualenv from depot_tools
This effectively reverts http://crrev.com/1195423002 and
http://crrev.com/1205873002.

R=pgervais@chromium.org, tandrii@chromium.org
TBR=pgervais@chromium.org  # i wanna get my Fixit credit today :-)
BUG=542922,503067

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@297491 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
maruel@chromium.org 851c8291a3 Fix gclient to work on a path containing space characters
Patch contributed by Leung Wing Chung <lwchkg@gmail.com>.
Committed on his behalf due to Commit Queue's mishandling of
CRLF files.

Here is my procedure for testing for a new install

1. Download and unzip
   https://src.chromium.org/svn/trunk/tools/depot_tools.zip
   Note that the path should include a space character,
   e.g. "with a space"

2. Copy the three modified files to the unzipped folder

3. Convert the unzipped files into Windows CRLF.

4. REMOVE the following lines from update_depot_tools.bat
   (Should I file a separate bug for this?)

:: Initialize/update virtualenv.
cd /d "%DEPOT_TOOLS_DIR%."
python -u bootstrap\bootstrap.py --deps_file bootstrap\deps.pyl --quiet ENV
if errorlevel 1 goto :EOF

5. Run gclient. Installation should be okay until
   "git rebase" is run.

R=maruel@chromium.org
BUG=507301

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@296275 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
sergiyb@chromium.org af0b79e758 Restore depot_tools autoupdate in Windows.
Original CL: https://codereview.chromium.org/1242013003/

Executing a bat file from another bat file will replace
that first bat file with the second one. To call the
second one and then return and execute the rest of the
first one, you have to do "call second.bat"

"python" is really "python.bat" so that this happened
was not obvious. More obvious now.

R=bratell@opera.com
TBR=pgervais@chromium.org
BUG=511926

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@296063 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
sergiyb@chromium.org 568dbd8440 Re-land: Added virtualenv for depot_tools
Original CL: https://chromiumcodereview.appspot.com/1200843003/

R=pgervais@chromium.org
BUG=503067
TEST=tested on Mac, Windows and Linux bots

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@295842 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
akuegel@chromium.org 39a23508dc Revert of Added virtualenv for depot_tools (patchset #10 id:180001 of https://chromiumcodereview.appspot.com/1200843003/)
Reason for revert:
Doesn't work, virtualenv is missing in depot_tools checkout.

Original issue's description:
> Added virtualenv for depot_tools
>
> R=pgervais@chromium.org
> BUG=503067
> TEST=tested on Mac, Windows and Linux bots
>
> Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=295811

TBR=pgervais@chromium.org,sergiyb@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=503067

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@295813 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
sergiyb@chromium.org b3bae3748a Added virtualenv for depot_tools
R=pgervais@chromium.org
BUG=503067
TEST=tested on Mac, Windows and Linux bots

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@295811 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
agable@chromium.org 69b67588c4 Run "svn revert" in update_depot_tools --force
R=iannucci@chromium.org, szager@chromium.org, pdr@chromium.org
BUG=435729

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@293112 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
szager@chromium.org 83f4767a60 Update to git-1.9.0.
Also, allow multiple git installations to exist side-by-side.
This makes it easier to revert back to an old version quickly.

BUG=
R=maruel@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@258058 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
scottmg@chromium.org 5d17b921db Move toolchain update control into src, but keep download logic in depot_tools
Moves the update functionality out of update_depot_tools into src/ in https://codereview.chromium.org/175573004 .

get_toolchain_if_required.py now expects a list of hashes on the
command line, and makes sure that it gets one of those.

toolchain2013.py saves a .json which contains information relevant to the
interests of the caller, so that it can set up the parent environment. This
is returned via the --output-json command line argument to get_...py

R=iannucci@chromium.org
BUG=323300

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@252725 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
scottmg@chromium.org 805133df83 Revert 252633 "Switch to opt-out for toolchain"
> Switch to opt-out for toolchain
> 
> R=maruel@chromium.org
> BUG=323300
> 
> Review URL: https://codereview.chromium.org/174663005

TBR=scottmg@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@252634 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
scottmg@chromium.org e604eafd83 Switch to opt-out for toolchain
R=maruel@chromium.org
BUG=323300

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@252633 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
scottmg@chromium.org 7cc7a1c5dc Automatic Windows toolchain
Per comments in linked bug, this is simply moved from chromium. The
only new thing is hooking it into update_depot_tools.bat, and
updating a few paths in the scripts.

This is currently opt-in via "set DEPOT_TOOLS_WIN_TOOLCHAIN=1" but
that will be removed once it's ready for deployment.

R=iannucci@chromium.org, maruel@chromium.org
BUG=323300

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@244983 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
szager@chromium.org 86c497d8db Indicate when depot_tools can't be updated on Windows.
When depot_tools fail to update right now all you get is
    Cannot rebase: You have unstaged changes.
    Please commit or stash them.
As that is typically in a call to gclient it's far from obvious what
could not be updated so add a line saying
    Failed to update depot_tools.
to that. Linux and Mac already have a similar error message in their
script file.

BUG=
R=szager@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@226002 0039d316-1c4b-4281-b951-d872f2087c98
12 years ago
szager@chromium.org aa574c6a22 Execute a temp copy of update_depot_tools.bat
Windows will sometimes freak out if a file is rewritten while
it's being executed.  That can happen when update_depot_tools.bat
runs.

R=iannucci@chromium.org,maruel@chromium.org
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@189429 0039d316-1c4b-4281-b951-d872f2087c98
12 years ago
szager@chromium.org 9f36c3891b 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
12 years ago