Getting a lot of "(401) Unauthorized" responses for these now. This at
least makes the script not crash.
Change-Id: Ib42ccbdb3326a0918015e9d5e1cc9392a9c1a469
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6049877
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Andrew Grieve <agrieve@chromium.org>
Auto-Submit: Andrew Grieve <agrieve@chromium.org>
No script can run on py2 (due to print syntax change), so those
checks are useless (will never be printed).
Change-Id: I9cc7bc8b2665dd09cc7f8939ba255956f96af88a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5262958
Commit-Queue: Josip Sokcevic <sokcevic@chromium.org>
Reviewed-by: Gavin Mak <gavinmak@google.com>
All __future__ imports (unicode_literals, print_function) are already
mandatory in py3. Also remove an outdated py2 comment in
presubmit_canned_checks.py
Bug: 1475402
Change-Id: I27cf6a8268f6dd1081f22af782c4c29a975376ae
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4867135
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Gavin Mak <gavinmak@google.com>
Leave the recipes/ code at 2 space to match the rest of the recipes
project in other repos.
Reformatted using:
files=( $(
git ls-tree -r --name-only HEAD | \
grep -Ev -e '^(third_party|recipes)/' | \
grep '\.py$';
git grep -l '#!/usr/bin/env.*python' | grep -v '\.py$'
) )
parallel ./yapf -i -- "${files[@]}"
~/chromiumos/chromite/contrib/reflow_overlong_comments "${files[@]}"
The files that still had strings that were too long were manually
reformatted because they were easy and only a few issues.
autoninja.py
clang_format.py
download_from_google_storage.py
fix_encoding.py
gclient_utils.py
git_cache.py
git_common.py
git_map_branches.py
git_reparent_branch.py
gn.py
my_activity.py
owners_finder.py
presubmit_canned_checks.py
reclient_helper.py
reclientreport.py
roll_dep.py
rustfmt.py
siso.py
split_cl.py
subcommand.py
subprocess2.py
swift_format.py
upload_to_google_storage.py
These files still had lines (strings) that were too long, so the pylint
warnings were suppressed with a TODO.
auth.py
gclient.py
gclient_eval.py
gclient_paths.py
gclient_scm.py
gerrit_util.py
git_cl.py
presubmit_canned_checks.py
presubmit_support.py
scm.py
Change-Id: Ia6535c4f2c48d46b589ec1e791dde6c6b2ea858f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4836379
Commit-Queue: Josip Sokcevic <sokcevic@chromium.org>
Auto-Submit: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
This includes a few fixes for specific errors, and disables several new
warnings introduced in this version, in order to allow for an incremental migration.
Bug:1262286
Change-Id: I4b8f8fc521386419a3121bbb07edc8ac83170a94
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3413679
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
Commit-Queue: Aravind Vasudevan <aravindvasudev@google.com>
This reverts commit 22bf605bb6.
Reason for revert: breaks gclient sync
Original change's description:
> Use pylint 2.7 for depot_tools
>
> This includes a few fixes for specific errors, and disables several new
> warnings introduced in this version, in order to allow for an incremental migration.
>
> Bug:1262286
> Change-Id: Ie97d686748c9c952e87718a65f401c5f6f80a5c9
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3400616
> Reviewed-by: Gavin Mak <gavinmak@google.com>
> Commit-Queue: Aravind Vasudevan <aravindvasudev@google.com>
Bug: 1262286
Change-Id: Ieb946073c7886c7bf056ce843a5a48e82becf7a5
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3413672
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Josip Sokcevic <sokcevic@google.com>
This includes a few fixes for specific errors, and disables several new
warnings introduced in this version, in order to allow for an incremental migration.
Bug:1262286
Change-Id: Ie97d686748c9c952e87718a65f401c5f6f80a5c9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3400616
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Aravind Vasudevan <aravindvasudev@google.com>
my_activity.py talks to third party (e.g. review.coreboot.org). Without
certifi package, making https connection may result in
CERTIFICATE_VERIFY_FAILED.
Adding certifi package to .vpython (py2) doesn't work, so this change
drops py2 support for my_activity.py.
R=gavinmak@google.com
Fixed: 1255921
Change-Id: I515b14c81d37a52d482d08085d8029c791911ae8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3206906
Auto-Submit: Josip Sokcevic <sokcevic@google.com>
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Josip Sokcevic <sokcevic@google.com>
my_activity can definitely be useful outside of Chromium, and the
gerrit instances are sometimes private. This allows users to carry
an additional list of instances in a json file (and possibly
monorail projects, but that seems like likely to be useful).
Change-Id: Ic0fec3bd4f815200f27cc0a8530cfd88f4328269
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2925677
Commit-Queue: Nicolas Boichat <drinkcat@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@google.com>
Change-Id: I370f023c7c4a5e5b1d1c1322bc443c7c375e1089
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2792341
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Dirk Pranke <dpranke@google.com>
Auto-Submit: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@google.com>
Add review.coreboot.org to the list of gerrit repos that
my_activity.py will query to find CLs.
Change-Id: I2c78c3365ee77f6a99ca6a39deda08bb913be5c2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2350325
Reviewed-by: Dirk Pranke <dpranke@google.com>
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
Commit-Queue: Dirk Pranke <dpranke@google.com>
gclient_utils.AskForData will use raw_input on Python 2 and input on Python 3.
Bug: 1063976
Change-Id: I93c059c4e4454d01787716b5a0a2641ad5253f53
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2116370
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
Reviewed-by: Anthony Polito <apolito@google.com>
Auto-Submit: Edward Lesmes <ehmaldonado@chromium.org>
This reverts commit 488712ab57.
Reason for revert: Breaks when running on vpython3
Original change's description:
> my_activity.py: Run using vpython3 by default.
>
> Also, prompt users to use vpython3 when running my_activity.py
> using Python 2.
>
> Change-Id: I078517832520b3c7baf3324f83e9a3b5194a5bcb
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2079703
> Reviewed-by: Josip Sokcevic <sokcevic@google.com>
> Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
TBR=ehmaldonado@chromium.org,apolito@google.com,infra-scoped@luci-project-accounts.iam.gserviceaccount.com,sokcevic@google.com
Change-Id: Ib217e8ec3613ee6645149f3d78ef9534ac68af8b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2080201
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
Also, prompt users to use vpython3 when running my_activity.py
using Python 2.
Change-Id: I078517832520b3c7baf3324f83e9a3b5194a5bcb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2079703
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
Not all my_activity.py users have accounts on all servers the utility
queries. This results in access errors reported when the utility is
ran.
Also, many users never upload patches on some servers even though the
account is there, there is no point in querying those servers.
This patch allows to pass in a list of servers to exclude from the
list of queried servers.
BUG=none
TEST=invoked the utility as follows:
$ my_activity.py --skip_servers \
pdfium-review.googlesource.com,skia-review.googlesource.com
observed that the 'ERROR:root:Access Errors:' messages are not
generated any more.
Change-Id: I7d676e45ee99d883a153b58acb778a2e2d5ed74a
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1487342
Reviewed-by: Aaron Gable <agable@chromium.org>
Ran:
vi $(git grep --name-only iteritems | grep -v third_party)
vi $(git grep --name-only itervalues | grep -v third_party)
vi $(git grep --name-only 'print ' | grep -v third_party)
and edited the files quickly with adhoc macros. Then ran in recipes/:
./recipes.py test train
There was only a small subset of files that had been updated to use
six.iteritems() and six.itervalues(). Since the dataset size that is
being used in gclient is small (pretty much always below 200 items),
it's better to just switch to .items() right away and take the temporary
performance hit, so that we don't need to come back to rewrite the code.
Recipe-Nontrivial-Roll: build
Bug: 984182
Change-Id: I5faf11486b66b0d73c9098ab0f2ce1b15a45c53e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1854900
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Auto-Submit: Marc-Antoine Ruel <maruel@chromium.org>
I know that sometimes imports can have side-effects,
so unused imports shouldn't always be removed, but these
ones look like they could be.
Change-Id: Iea9f82afa99b0ea35f29a28f20ce0493b579cfee
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1819860
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Commit-Queue: Quinten Yearsley <qyearsley@chromium.org>
While fetching monorail issues, @chromium.org is appended to the --user
option even if the original --user option is already a email address
(e.g. user@google.com).
Change-Id: I2442f4ea977b2681a72271f7c20fabb1ceaa351c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1790222
Reviewed-by: Andrii Shyshkalov <tandrii@google.com>
Commit-Queue: Peter Lee <pkl@chromium.org>
my_activity.py prints out a help message when required, which has some
example ways to use my_activity.py. However the dates used are ambiguous
in terms of the date format used/required. This CL changes the example
to make it clearer that it is mm/dd/yy.
Change-Id: Id054739201e5c83528902b1f38d1c27c7bbc788b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1682498
Auto-Submit: Mohamed Heikal <mheikal@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Mohamed Heikal <mheikal@chromium.org>
Ran "2to3 -w -n -f except ./".
The scripts still work with Python 2.
There are no intended behaviour changes.
Bug: 942522
Change-Id: Ifa274cb83f74cfa8ce092fffbb88f3ab5309e72c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1607841
Commit-Queue: Raul Tambre <raul@tambre.ee>
Auto-Submit: Raul Tambre <raul@tambre.ee>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Ran "2to3 -w -n -f print ./" and manually added imports.
Ran "^\s*print " and "\s+print " to find batch/shell scripts, comments and the like with embedded code, and updated them manually.
Also manually added imports to files, which used print as a function, but were missing the import.
The scripts still work with Python 2.
There are no intended behaviour changes.
Bug: 942522
Change-Id: Id777e4d4df4adcdfdab1b18bde89f235ef491b9f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1595684
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Dirk Pranke <dpranke@chromium.org>
Auto-Submit: Raul Tambre <raul@tambre.ee>
If you specify the wrong year to the -b flag then you may end up with an
inverted time range that is entirely in the future, and this causes odd
failures. Or at least that's what I've heard. This detects some of these
error cases and halts.
Also a one-line git cl format cleanup.
Change-Id: Iede80faed00d4857443b3a1d853fa2ba69f47023
Reviewed-on: https://chromium-review.googlesource.com/c/1487744
Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
Auto-Submit: Bruce Dawson <brucedawson@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
my_activity.py tries to determine the current user with the USER
environment variable but on Windows it should use USERNAME. This change
gets it to check both, which saves users from having to use the -u
option and figure out what format the name should be in.
Change-Id: Id2458d29f8a2635a96dd3859d6af0ed5aaea22bf
Reviewed-on: https://chromium-review.googlesource.com/c/1479896
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
Downside: the script now requires "-u user@chromium.org" or it results
in "error: USER is not set, please use -u".
Bug: 904604
Change-Id: I241ad440d0cf1a495ce6f57e48ed49d9d90a49d9
Reviewed-on: https://chromium-review.googlesource.com/c/1442851
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Commit-Queue: Gabriel Charette <gab@chromium.org>
Also, sort all the gerrit instances by url for clarity.
Change-Id: I89aea98f75de33e8673c929fb07df3b686ea6c15
Reviewed-on: https://chromium-review.googlesource.com/1228659
Commit-Queue: enne <enne@chromium.org>
Reviewed-by: Marc-Antoine Ruel <maruel@chromium.org>
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
--completed-issues lists only monorail issues which are owned by the
user and have status Fixed|Verified.
R=sergiyb@chromium.org
Change-Id: I42737bb6ef81ffa463eedee209a2993f68b57d3a
Reviewed-on: https://chromium-review.googlesource.com/1227445
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
Reviewed-by: Sergiy Byelozyorov <sergiyb@chromium.org>
Test: verified the same reviews list is produced w/o and w/ this change.
Change-Id: I72be85734a84d96a06b74515e64344fc203b1eed
Reviewed-on: https://chromium-review.googlesource.com/1227442
Reviewed-by: Sergiy Byelozyorov <sergiyb@chromium.org>
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
For some users who have a long history on the issue tracker, Monorail
queries were timing out with the default timeout.
Bug: 882266
Change-Id: Ib458f129d5a5f0eb04e035c016957730a1be1b99
Reviewed-on: https://chromium-review.googlesource.com/1214707
Commit-Queue: Kenneth Russell <kbr@chromium.org>
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
The script was crashing because of a missing 'email' value from some
gerrit results. Harden against the missing value.
BUG=None
Change-Id: I0f267f130e60e56d532ac2ec1a99ab108a3181e9
Reviewed-on: https://chromium-review.googlesource.com/1161504
Reviewed-by: Sergiy Byelozyorov <sergiyb@chromium.org>
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
This change fixes the filtering of Gerrit Reviews. Prior to this change
authored Changes were duplicated in the list of Reviews.
Bug: NONE
Change-Id: If0dceb3dc24ed12f039a9549ec22b9b78c3d80dd
Reviewed-on: https://chromium-review.googlesource.com/1145381
Reviewed-by: Sergiy Byelozyorov <sergiyb@chromium.org>
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
Commit-Queue: Jan Wilken Dörrie <jdoerrie@chromium.org>