This reverts commit e8acd40a11.
Reason for revert: broke windows builds :(
Original change's description:
> bot_update: pin depot_tools
>
> gclient runhooks often calls scripts that depend on scripts in depot_tools.
> Currently bot_update only ensures that depot_tools is present in $PATH, but
> otherwise uses whatever depot_tools already specified in $PATH. We don't pin
> depot_tools before running a recipe, so using whatever depot_tools in $PATH
> is not hermetic.
>
> Insert the path to the pinned depot_tools to the beginning of $PATH
>
> R=iannucci@chromium.org
>
> Bug:
>
> Change-Id: I31d04ba2ec7c409f89d58a51502ce3565e3a02a1
> Reviewed-on: https://chromium-review.googlesource.com/481072
> Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
> Commit-Queue: Nodir Turakulov <nodir@chromium.org>
>
TBR=iannucci@chromium.org,nodir@chromium.org,phajdan.jr@chromium.org,chromium-reviews@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Change-Id: I1a70f0f54e9b9cea7fc2f9897e62f558204a4684
Reviewed-on: https://chromium-review.googlesource.com/481440
Reviewed-by: Nodir Turakulov <nodir@chromium.org>
Commit-Queue: Nodir Turakulov <nodir@chromium.org>
gclient runhooks often calls scripts that depend on scripts in depot_tools.
Currently bot_update only ensures that depot_tools is present in $PATH, but
otherwise uses whatever depot_tools already specified in $PATH. We don't pin
depot_tools before running a recipe, so using whatever depot_tools in $PATH
is not hermetic.
Insert the path to the pinned depot_tools to the beginning of $PATH
R=iannucci@chromium.org
Bug:
Change-Id: I31d04ba2ec7c409f89d58a51502ce3565e3a02a1
Reviewed-on: https://chromium-review.googlesource.com/481072
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Commit-Queue: Nodir Turakulov <nodir@chromium.org>
This makes the library behave more like what we'd expect,
while still allowing certain function to specify that
returning 204 or 404 is expected/acceptable behavior.
Change-Id: If3ce5598d1603819ee97aaeab0072a9e786ed96d
Reviewed-on: https://chromium-review.googlesource.com/481043
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Commit-Queue: Aaron Gable <agable@chromium.org>
Gerrit sometimes returns a full response json object at
the same time as returning a non-200 status code. This
refactor makes it easier for calling code to request
access to that object and handle error cases on its own.
The original version of this commit had a bug where
ReadHttpResponse properly set the default value for
accept_statuses, but all calls which came through
ReadHttpJsonResponse were setting None instead.
Bug: 710028
Change-Id: I8cee435d8acd487fb777b3fd69b5e48e19d2e5a3
Reviewed-on: https://chromium-review.googlesource.com/481060
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Commit-Queue: Aaron Gable <agable@chromium.org>
We want to assert that if add_owners_to is provided, change is also
provided.
Bug:
Change-Id: I0b9674dcd1cdd5e42a8ab92583570ecc02ba1dcd
Reviewed-on: https://chromium-review.googlesource.com/481040
Reviewed-by: Daniel Jacques <dnj@chromium.org>
Commit-Queue: Robbie Iannucci <iannucci@chromium.org>
This reverts commit 6d7ab1bfe5.
Reason for revert: Stacktrace:
File "/s/depot_tools/gerrit_util.py", line 816, in GetAccountDetails
return ReadHttpJsonResponse(conn)
File "/s/depot_tools/gerrit_util.py", line 376, in ReadHttpJsonResponse
fh = ReadHttpResponse(conn, accept_statuses)
File "/s/depot_tools/gerrit_util.py", line 365, in ReadHttpResponse
if response.status not in accept_statuses:
TypeError: argument of type 'NoneType' is not iterable
Original change's description:
> Refactor ReadHttpResponse to be error-friendlier
>
> Gerrit sometimes returns a full response json object at
> the same time as returning a non-200 status code. This
> refactor makes it easier for calling code to request
> access to that object and handle error cases on its own.
>
> Bug: 710028
> Change-Id: Id1017d580d2fb843d5ca6287efcfed8775c52cd6
> Reviewed-on: https://chromium-review.googlesource.com/479450
> Commit-Queue: Aaron Gable <agable@chromium.org>
> Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
>
TBR=agable@chromium.org,tandrii@chromium.org,chromium-reviews@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Change-Id: Ia9d9ce835e207a32e7cc8ee35c0cf40c823c7b78
Reviewed-on: https://chromium-review.googlesource.com/481059
Reviewed-by: Aaron Gable <agable@chromium.org>
Commit-Queue: Aaron Gable <agable@chromium.org>
Gerrit sometimes returns a full response json object at
the same time as returning a non-200 status code. This
refactor makes it easier for calling code to request
access to that object and handle error cases on its own.
Bug: 710028
Change-Id: Id1017d580d2fb843d5ca6287efcfed8775c52cd6
Reviewed-on: https://chromium-review.googlesource.com/479450
Commit-Queue: Aaron Gable <agable@chromium.org>
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
This will be useful for tools like the recipe autoroller to
semi-intelligently choose a collection of reviewers.
Bug:
Change-Id: I7a238127e126340c033fc8e80523ef2408ebf970
Reviewed-on: https://chromium-review.googlesource.com/479679
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
This CL propagates <diff_base> all the way to become parent commit
of the syntentic commit generated by squashing the current branch.
BUG=649846
R=agable@chromium.org
Change-Id: Ided7ebbb5c3a1114cac18adb62b3a9c27610018c
Reviewed-on: https://chromium-review.googlesource.com/475229
Reviewed-by: Aaron Gable <agable@chromium.org>
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
Previously, the <link lines in HTML are allowed to have longer than 80 characters.
This CL adds <g and <path to the HTML lines that may have unlimited characters.
(These g and path tags are used in svg image data).
These HTML exemptions also have a trailing space. The space is intended to reduce
false-positives in matching. There are some occurrences of these tags followed by a
\n which will not match (but the line ends there, so it's not an issue).
These new tags may be preceded by blank space so .lstrip() was added to
the test. I believe this .lstrip() should not be an issue for the other
languages and exemptions present.
Bug: None
Change-Id: Ie9c2bca0e7147033e360ddcfc6eee3b73e167228
Reviewed-on: https://chromium-review.googlesource.com/477371
Reviewed-by: Marc-Antoine Ruel <maruel@chromium.org>
Commit-Queue: Dave Schuyler <dschuyler@chromium.org>
Have "bot_update.py" export the failing patch body in its JSON. Have the
recipe actually emit the patch body in the "Patch Failure" step instead
of the "bot_update" step, and remove the "Patch Failure" step's
indirection to the "bot_update" step for patch failure.
This will provide a more straightforward user interface: the red step
that says "Patch Failure" now includes the details of the patch failure!
BUG=chromium:710477
TEST=expectations
Change-Id: I6ad305f0b972de89e4f0b5eb70edf41980447abd
Reviewed-on: https://chromium-review.googlesource.com/475950
Commit-Queue: Daniel Jacques <dnj@chromium.org>
Reviewed-by: Ryan Tseng <hinoka@chromium.org>
Bug: 710817
Change-Id: Ifb2a9abe605d9e403c55ec1360d186af12dd2f34
Reviewed-on: https://chromium-review.googlesource.com/475775
Reviewed-by: Michael Moss <mmoss@chromium.org>
Commit-Queue: Paweł Hajdan Jr. <phajdan.jr@chromium.org>
Bug: 710817
Change-Id: Ice7cefaf5c5a5cac431a95d3adfa44f323eafb2f
Reviewed-on: https://chromium-review.googlesource.com/475230
Reviewed-by: Michael Moss <mmoss@chromium.org>
Commit-Queue: Paweł Hajdan Jr. <phajdan.jr@chromium.org>
While working on fixing git-cl-status for gerrit, I realized
it would be really easy to bring the Rietveld version up to
parity and simplify it at the same time.
Bug: 706460
Change-Id: Icff32b532fa29f8869205111cd117176e0d34b8f
Reviewed-on: https://chromium-review.googlesource.com/470448
Commit-Queue: Aaron Gable <agable@chromium.org>
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
The loop over the messages didn't early-exit when it found
a non-CQ message, so it would continue looking until it
found any message by a non-owner. So all CLs with any comments
by anyone other than the uploader would be in 'reply' state
forever.
This CL fixes that, and also makes some other tweaks to
make the gerrit status code simpler and faster.
Bug: 706460
Change-Id: I5cc06962f5121fe042a315e5e2e205e556eb85da
Reviewed-on: https://chromium-review.googlesource.com/470586
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Commit-Queue: Aaron Gable <agable@chromium.org>
Nothing should depend on this magic file any more.
R=maruel@chromium.org,agable@chromium.org
Change-Id: Ibff8e2b575b119733c6c21ca6aebe38856c578c1
Reviewed-on: https://chromium-review.googlesource.com/474826
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
Reviewed-by: Marc-Antoine Ruel <maruel@chromium.org>
* if --rietveld or --gerrit is given, parse only using appropriate
parser.
* if url has '$HOST-review' in the beginning, assume it's Gerrit
* if type of codereview is detected based on URL, then print this
information for the user.
This also applies to `git cl description` but message is logged instead,
because in '-d|--display' option git cl is supposed to print only description,
and some tooling likely relies on this :(
R=jochen@chromium.org
BUG=706406
Change-Id: I21c9355c5334fd71db27618cda11287f75168b59
Reviewed-on: https://chromium-review.googlesource.com/473186
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
Reviewed-by: Jochen Eisinger <jochen@chromium.org>