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>
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>
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>
We should fail when we fail to update depot_tools instead of continuing
the execution silently. Otherwise, developers might get stuck on a bad
depot_tools revision without knowing.
Change-Id: I0431a24a28a77aca8c66352939a0252c458b3e9d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2208616
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
gsutil.py is cumbersome to use on Windows, unlike on Linux and Mac. This
change adds a batch file like the ones for gclient and other tools.
Bug: https://github.com/dart-lang/sdk/issues/35367
Change-Id: Ib33dc27573de5485ae93b525002f5fbcb3a5f4d1
Reviewed-on: https://chromium-review.googlesource.com/c/1370124
Commit-Queue: Jonas Termansen <sortie@google.com>
Reviewed-by: Ryan Tseng <hinoka@chromium.org>