Commit Graph

234 Commits (78753da20ee812116f2cec5daed8a22b20e66352)

Author SHA1 Message Date
Aaron Gable 12ef501b02 Parse Bug, R, and Tbr git-footers in PRESUBMIT
This gives PRESUBMIT equal support for all the
gerrit-style footers that we're migrating to.

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

Bug: 710327,710803
Change-Id: I64b8f39ef923d90ebda7dd191b83d1a7cc87c776
Reviewed-on: https://chromium-review.googlesource.com/506551
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Commit-Queue: Aaron Gable <agable@chromium.org>
8 years ago
Aaron Gable fc03e67e9a Refactor PRESUBMIT support for tags
We want PRESUBMIT to be able to equally support
BUG= tags (old style) and Git-Footer: footers
(new style). This change refactors the way that
the presubmit api gives access to those properties
so that it is easier to add support for equivalent
footers.

It also limits the scope of tags/footers that it
exposes, as code search shows no PRESUBMIT files
that take advantage of any of the more esoteric
ones.

Bug: 710327, 710803
Change-Id: I86f1d6cb2e1f0aff9653ef3fb455e0a6f47acf5d
Reviewed-on: https://chromium-review.googlesource.com/506450
Commit-Queue: Aaron Gable <agable@chromium.org>
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
8 years ago
Aaron Gable b584c4f0d1 Make CQ_INCLUDE_TRYBOTS support review-specific
This CL wholly revamps the way presubmit_support adds
CQ_INCLUDE_TRYBOTS lines in commit descriptions. In
particular, when the CL is being uploaded to Gerrit,
it uses our pre-existing support for manipulating git
footers to make the whole process much simpler.

R=tandrii@chromium.org

Bug: 710547
Change-Id: I5858282a44c590f131021fa3820f1cb3f70ef620
Reviewed-on: https://chromium-review.googlesource.com/487831
Commit-Queue: Aaron Gable <agable@chromium.org>
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
8 years ago
Kenneth Russell df6e7348b9 Fix addition of CQ_INCLUDE_TRYBOTS on Gerrit.
BUG=710547

Change-Id: I6558ba08683b8e010ac5051dabfd82d9a5b9c551
Reviewed-on: https://chromium-review.googlesource.com/486083
Reviewed-by: Aaron Gable <agable@chromium.org>
Commit-Queue: Kenneth Russell <kbr@chromium.org>
8 years ago
Jochen Eisinger d0573ec067 Use OldContents() for OWNERS files to do checks
BUG=141253
R=dpranke@chromium.org

Change-Id: Iacbc2f0571e725e4f2ccf5ea7878f101972289bb
Reviewed-on: https://chromium-review.googlesource.com/476610
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Jochen Eisinger <jochen@chromium.org>
8 years ago
Jochen Eisinger 76f5fc6cd9 Also print comments found in files during presubmit owners suggestion
R=dpranke@chromium.org
BUG=694222

Change-Id: I5676db2283dd43378293bc9bb32f71e0a1225806
Reviewed-on: https://chromium-review.googlesource.com/471609
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Jochen Eisinger <jochen@chromium.org>
8 years ago
Jochen Eisinger eb7447605b Configure path to OWNERS.status file via toplevel OWNERS
BUG=694222
R=dpranke@chromium.org

Change-Id: Ie841332129dd6fa8555d2e940c919b812fc9408d
Reviewed-on: https://chromium-review.googlesource.com/467250
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Jochen Eisinger <jochen@chromium.org>
8 years ago
Jochen Eisinger 72606f8c24 Add support for a global status files for OWNERS
This allows for having some global comments such as timezones or
long-term unavailability.

The comments go into build/OWNERS.status (that way, they should be
available in all repos that map in build/ for the gn config files).
The local can be overwritten in codereview.settings.

The format is

email: status

Comments (starting with #) are allowed in that file, but they're ignored.

BUG=694222
R=dpranke@chromium.org

Change-Id: I49f58be87497d1ccaaa74f0a2f3d373403be44e7
Reviewed-on: https://chromium-review.googlesource.com/459542
Commit-Queue: Jochen Eisinger <jochen@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
8 years ago
anatoly techtonik bdcdc59cb6 Fix pylint file list matching on Windows
Windows paths use backward slash separator, which
escapes regular expressions for white and black lists
in PRESUBMIT.py filters

See https://goo.gl/6c7aku for discussion

Bug:

Change-Id: Ia1d133c5b6cfa6cb364b1500b7b7abe583bce346
Reviewed-on: https://chromium-review.googlesource.com/461141
Commit-Queue: Marc-Antoine Ruel <maruel@chromium.org>
Reviewed-by: Marc-Antoine Ruel <maruel@chromium.org>
8 years ago
Daniel Cheng 7a1f04d377 Implement presubmit API to get the old contents of an affected file.
BUG=702851

Change-Id: I6f005d19524cbb8b361d3fcb0b91912885c46e00
Reviewed-on: https://chromium-review.googlesource.com/456755
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
8 years ago
Kenneth Russell 61e2ed43fb Moved EnsureCQIncludeTrybotsAreAdded to OutputApi.
This makes them accessible to presubmit scripts' PostUploadHook.

Fixed bugs where caching needed to be bypassed in order for
sequential PostUploadHooks to see each others' results.

BUG=688765

Change-Id: I56c0c6b6419e2474f4b7f701be036fb2a524f8e3
Reviewed-on: https://chromium-review.googlesource.com/439877
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Reviewed-by: Paweł Hajdan Jr. <phajdan.jr@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Kenneth Russell <kbr@chromium.org>
8 years ago
Kenneth Russell 1678a364a5 Add presubmit_support.EnsureCQIncludeTrybotsAreAdded.
The PostUploadHooks in the Chromium repository which add
CQ_INCLUDE_TRYBOTS entries to the issue description will be rewritten
in terms of this primitive, which will compose properly if multiple
sub-directories attempt to modify it.

BUG=688765

Change-Id: Icf72edb872f29af1e082038e96bc547504edfd07
Reviewed-on: https://chromium-review.googlesource.com/438925
Reviewed-by: Marc-Antoine Ruel <maruel@chromium.org>
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Commit-Queue: Kenneth Russell <kbr@chromium.org>
8 years ago
Dirk Pranke 3c86cee33a Revert "Fix OWNERS canned check to avoid duplicate output."
This reverts commit 66c50ea1f1.

Reason for revert:
Breaks some OWNERS checks. See https://crbug.com/684270 for details.

Original change's description:
> Fix OWNERS canned check to avoid duplicate output.
>
> 1. Update PanProjectChecks() to supply source_filter to CheckOwners().
>    This prevents files under e.g. third_party/WebKit being checked both
>    by the top-level and sub-directory PRESUBMIT rules.
> 2. Fix CheckOwners() to list missing-OWNERS only for the sub-directory
>    it is invoked on, rather than the whole CL. This prevents files under
>    sub-directories with their own PRESUBMIT rule, within the same repo,
>    from causing OWNERS to be checked for files outside that directory.
>
> BUG=
>
> Reviewed-on: https://chromium-review.googlesource.com/426003

TBR=wez@chromium.org,dcheng@chromium.org
BUG=684270

Change-Id: I094818a6fa3e16fbac0d37d2596a40210611ee05
Reviewed-on: https://chromium-review.googlesource.com/431656
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
8 years ago
Clemens Hammacher d0c226a0d3 Output missing LGTMs notification also on dry-run
On larger CLs, this can be used to see whether all needed LGTMs are
there on a dry run.

R=tandrii@chromium.org

Change-Id: I5fe4022feaca73d08ead9aed14ca270192740675
Reviewed-on: https://chromium-review.googlesource.com/426819
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Reviewed-by: smut <smut@chromium.org>
8 years ago
Wez 66c50ea1f1 Fix OWNERS canned check to avoid duplicate output.
1. Update PanProjectChecks() to supply source_filter to CheckOwners().
   This prevents files under e.g. third_party/WebKit being checked both
   by the top-level and sub-directory PRESUBMIT rules.
2. Fix CheckOwners() to list missing-OWNERS only for the sub-directory
   it is invoked on, rather than the whole CL. This prevents files under
   sub-directories with their own PRESUBMIT rule, within the same repo,
   from causing OWNERS to be checked for files outside that directory.

BUG=

Change-Id: I9bd5677a69efe9c78b4174a917780d6688991a38
Reviewed-on: https://chromium-review.googlesource.com/426003
Commit-Queue: James Weatherall <wez@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
8 years ago
Quinten Yearsley e9c794ea4e Make DoPresubmitChecks unit tests clearer.
This is a follow-up to https://chromium-review.googlesource.com/c/419148/;
the purpose is to confirm that the behavior is how we want it to be when
there are presubmit errors and warnings.

BUG=671683

Change-Id: I5b295c200d3db1a374e4294bdd78a777ae36c832
Reviewed-on: https://chromium-review.googlesource.com/420975
Commit-Queue: Quinten Yearsley <qyearsley@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Reviewed-by: Aaron Gable <agable@chromium.org>
8 years ago
Quinten Yearsley b2cc4a94da depot_tools: Replace pylint error numbers with symbolic names.
This affects a bunch of files, but only changes comments,
and shouldn't make any difference to behavior.

The purpose is to slightly improve readability of pylint
disable comments.

Change-Id: Ic6cd0f8de792b31d91c6125f6da2616450b30f11
Reviewed-on: https://chromium-review.googlesource.com/420412
Reviewed-by: Aaron Gable <agable@chromium.org>
Commit-Queue: Quinten Yearsley <qyearsley@chromium.org>
8 years ago
Quinten Yearsley 516fe7f881 Presubmit: if there are warnings and may_prompt is false, don't fail.
Rationale: The description of the -f flag to git cl upload is "force
yes to questions (don't prompt)", so when git cl upload -f is run,
I would expect it to abort on errors, but still continue on warnings.

When the -f is given, DoPresubmitChecks is called with may_prompt=False;
this CL would change the behavior of DoPresubmitChecks so that when
may_prompt is False and there are warnings but no errors, then that
means we will print warnings but not fail.

BUG=671683

Change-Id: Ie0f1ac1983d875226db8ad741cbce3dc0bc4eb96
Reviewed-on: https://chromium-review.googlesource.com/419148
Reviewed-by: Aaron Gable <agable@chromium.org>
Commit-Queue: Quinten Yearsley <qyearsley@chromium.org>
8 years ago
Quinten Yearsley ee60c539eb Refactor DoPresubmitChecks unit tests.
Purpose: This is a unit test method refactoring to try to
improve readability; I made this when adding unit tests for
https://chromium-review.googlesource.com/c/419148/.

In this CL:
 - Extract ExampleChange helper method
 - Explicitly write names of args for DoPresubmitChecks
 - Other minor changes to make the style more consistent

Change-Id: I52236e285e50db890245c6c4b69c70ddf258f140
Reviewed-on: https://chromium-review.googlesource.com/419184
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Commit-Queue: Quinten Yearsley <qyearsley@chromium.org>
8 years ago
Michael Achenbach c850b9611e Add authors check to canned presubmit checks
BUG=v8:5603

Change-Id: Ib7bbdfae070ae4c55f99041befbade942d1d3f9c
Reviewed-on: https://chromium-review.googlesource.com/416859
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
8 years ago
agable 0b65e732b4 Remove SVN support from PRESUBMIT
R=maruel@chromium.org
BUG=475320

Review-Url: https://codereview.chromium.org/2394043002
8 years ago
qyearsley 136b49ff7e depot_tools: Remove DoGetTrySlaves, GetTrySlavesExecuter, GetPreferredTrySlaves
Note: This CL originally just removed a deprecated use of Remove use of DoGetTrySlaves, suggested in http://crrev.com/2442153002, then was expanded to remove DoGetTrySlaves, GetPreferredTrySlaves and GetTrySlavesExecuter since these are all deprecated and unused.

BUG=660453

Review-Url: https://codereview.chromium.org/2453823002
8 years ago
scottmg 86099d7ce5 Shutdown multiprocess pool after running tests to avoid _finalizer spew on Windows
Can't just let the GC collect the pool on Windows.

R=tandrii@chromium.org
BUG=618726

Review-Url: https://codereview.chromium.org/2296723006
9 years ago
tobiasjs 2836bcf810 Support additional user presubmit scripts named PRESUBMIT*.py.
This allows users to specify additional local presubmit tests that
do not need to exist as locally maintained changes to PRESUBMIT.py
files.

BUG=

Review-Url: https://codereview.chromium.org/2232203002
9 years ago
agable 565adb55a6 Have presubmit accept various Code-Review label configurations
Since different projects can have different configurations for what
the maximum value of the "Code-Review" label is in Gerrit, this teaches
presubmit_support to inspect the maximum configured value and see who
has granted it (the same behavior as the Submit button in Gerrit itself).

R=andybons@chromium.org, martiniss@chromium.org, tandrii@chromium.org
BUG=630738

Review-Url: https://codereview.chromium.org/2178673002
9 years ago
dcheng 091b7db64c Expose fnmatch in presubmit's input_api.
BUG=611905

Review-Url: https://codereview.chromium.org/2070493002
9 years ago
seanmccullough 0b67044c35 [depot_tools] Add gendered pronoun presubmit check.
Review-Url: https://codereview.chromium.org/2046003002
9 years ago
tandrii@chromium.org 830dc0bca8 Properly expose already used elsewhere functionality.
Also make _RietveldOwnerAndReviewers have same semantics as before,
to resolve immediate bug until chromium checkouts of developers are
updated.

BUG=609832
R=machenbach@chromium.org

Review-Url: https://codereview.chromium.org/1955223002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@300494 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
dbeam@chromium.org 78d65556a8 Remove unused PresubmitAddReviewers
R=dpranke@chromium.org
BUG=none

Review-Url: https://codereview.chromium.org/1960763002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@300488 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
tandrii@chromium.org 37b07a78ee Reland Implement owners check in presubmit for Gerrit.
R=machenbach@chromium.org,phajdan.jr@chromium.org
BUG=605563

Review-Url: https://codereview.chromium.org/1927773002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@300353 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
tandrii@chromium.org 83b1b238c6 Revert of Implement owners check in presubmit for Gerrit. (patchset #5 id:80001 of https://codereview.chromium.org/1927773002/ )
Reason for revert:
now it doesn't work for gerrit. Damn it.

Original issue's description:
> Implement owners check in presubmit for Gerrit.
> 
> R=machenbach@chromium.org,phajdan.jr@chromium.org
> BUG=605563
> 
> Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=300350

TBR=machenbach@chromium.org,phajdan.jr@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=605563

Review-Url: https://codereview.chromium.org/1935563002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@300352 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
tandrii@chromium.org b4cd1960d5 Implement owners check in presubmit for Gerrit.
R=machenbach@chromium.org,phajdan.jr@chromium.org
BUG=605563

Review-Url: https://codereview.chromium.org/1927773002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@300350 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
machenbach@chromium.org 6996a10666 Revert of Implement owners check in presubmit for Gerrit. (patchset #3 id:40001 of https://codereview.chromium.org/1927773002/ )
Reason for revert:
Breaks presubmit:
https://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/175120/steps/presubmit/logs/stdio

Original issue's description:
> Implement owners check in presubmit for Gerrit.
> 
> R=machenbach@chromium.org,phajdan.jr@chromium.org
> BUG=605563
> 
> Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=300320

TBR=phajdan.jr@chromium.org,tandrii@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=605563

Review-Url: https://codereview.chromium.org/1928343002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@300326 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
tandrii@chromium.org f48a375153 Implement owners check in presubmit for Gerrit.
R=machenbach@chromium.org,phajdan.jr@chromium.org
BUG=605563

Review-Url: https://codereview.chromium.org/1927773002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@300320 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
tandrii@chromium.org 9dea2ac16f Remove manual check using Rietveld for dry run.
It's now passed using command line flags.

This depends on https://codereview.chromium.org/1931633002,
which actually uses this command line flag.

R=sergiyb@chromium.org,phajdan.jr@chromium.org
BUG=601128

Review-Url: https://codereview.chromium.org/1929653002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@300268 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
tandrii@chromium.org 57bafac9aa Add --dry_run to presubmit_support.
Also, implement skipping of CheckOwners presumbit canned check. To be used by run_presubmit recipe in build repo in 
https://codereview.chromium.org/1931633002

R=sergiyb@chromium.org,phajdan.jr@chromium.org,machenbach@chromium.org
BUG=594127

Review-Url: https://codereview.chromium.org/1923623004

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@300262 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
tandrii@chromium.org 015ebae720 Add basic Gerrit support for presubmit_support.
R=andybons@chromium.org,scottmg@chromium.org
BUG=605563

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@300164 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
danakj@chromium.org 0ae7122b91 Remove build/c++11 from the set of linter rules ever used.
The checks are not reliable for Rvalue references, and only are
allowing default/deleted constructors. They are based on the google3
internal rules which do not exactly match our own c++11 rules, and
may diverge more over time.

Email thread that led to this change here: https://groups.google.com/a/chromium.org/forum/#!topic/cxx/9TZvt8vyeEM

R=agable@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@298202 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
thestig@chromium.org 13ccc77201 Remove unused CheckSvnModifiedDirectories.
Review URL: https://codereview.chromium.org/1435333005

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@297676 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
phajdan.jr@chromium.org e27eb7e62d depot_tools: make CheckLicense warn instead of notify
BUG=553681

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@297563 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
phajdan.jr@chromium.org d965db3047 depot_tools: move some checks from commit to upload
BUG=553681

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@297559 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
dbeam@chromium.org 5a2af6d9d1 Add long line exception for GEN('#include') in JS browser tests.
It's basically like C++'s #include but in JS.

Why write 1 language when you can write 2?!

R=maruel@chromium.org
BUG=540977

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@297065 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
iannucci@chromium.org d61a4950b2 Changes to improve multiprocessing PRESUBMIT support in Windows
* make RunTest's multiprocessing.Pool in the constructor of InputApi
    to avoid getting tripped up by chdir manipulation.
  * Don't do the split cyclic-import check when the invoker of the
    Pylint presubmit checks explicitly sends cyclic import check
    parameters via extra_args
  * fix pseudobug where ownership of the files variable was unclear,
    and pass all arguments on stdin (instead of mix of CLI + stdin).
  * fix bug in pylint which caused it to manipulate sys.path before
    spawning its subprocesses, which caused multiprocessing to fail
    on windows.
    * Note: This may carry a slight semantic change. Before, pylint would
      add all .py files' directories to sys.path while checking any of
      them. Now in parallel mode, pylint will only add the path of the
      single file to sys.path. This behavior actually mirrors Python's
      own behavior, so the check should be more-correct than before (and
      should cut down on pylint import scanning time with very large
      sys.path's).
    * If someone encounters an issue with this, please note that the
      GetPylint check also includes an extra_paths_list which is
      expressly for this purpose.

R=dpranke@chromium.org, kbr@chromium.org, maruel@chromium.org
BUG=501012

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@295908 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
iannucci@chromium.org 1b9a55600f Fix depot_tools presubmit tests by mocking multiprocessing.cpu_count.
R=thakis@chromium.org
BUG=503462

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@295795 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
iannucci@chromium.org 0af3bb37eb Parallelize pylint PRESUBMIT checks.
R=maruel@chromium.org
BUG=479837,499650

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@295664 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
rmistry@google.com 5fc6c8c0e7 Skip OWNERS checks for CQ dry runs
The CQ dry run feature was announced in https://groups.google.com/a/chromium.org/forum/#!topic/chromium-dev/G5-X0_tfmok

The primary complain is that the presubmit builders fail because of OWNERS checks or because of "Missing LGTM from someone other than...".
This change skips those checks for dry runs.

BUG=chromium:477190

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@294853 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
vadimsh@chromium.org cf6a5d2026 Extract authentication options handling into a separate function.
It is done in preparation for switching to OAuth2 as default (and only)
authentication method. Having all auth options handled by the same code makes it
easier to gradually add OAuth2 support.

As part of this, some options that would no longer work with OAuth2 (and that
are not being used from anywhere now, as far as I can tell) are removed:
  * Passing account password for authentication via command line.
  * Overriding 'Host' header when making requests to Rietveld (won't work with
    SSL anyway).
  * --account_type option (seems to be ClientLogin specific).

R=maruel@chromium.org
BUG=356813

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@294746 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
dtu@chromium.org 03f0c53648 Remove 150% hard line length limit for long URLs.
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@294600 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
sbc@chromium.org 013731e832 Handle KeyboardInterrupt consistently in python scripts
Handle KeyboardInterrupt gracefully rather the printing a
backtrace. Most users of these tools don't expect a
backtrace when then hit Ctrl-C.

Also, fix a few other inconsistencies found in the python
startup code of these different scripts:
- always call main function 'main' (rather than 'Main')
- always return 0 from main function
- if main takes args never include argv[0]

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@294250 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
rmistry@google.com 5626a92eec Add ability to specify and run post upload hooks.
Motivation: There are a few things we want to do in Skia infrastructure that is not possible to do without this functionality.
Eg1: If there is a change made to Skia's markdown then automatically include a 'DOCS_PREVIEW_URL=https://skia.org?cl=1234' in the CL's description.
Eg2: Automatically add 'NOTRY=true' for changes impacting things that do not need trybot runs.
Eg3: Include CL specific links to skia's perf (https://perf.skia.org/) and correctness (https://gold.skia.org/) servers.

BUG=chromium:462208

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@294242 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago