Commit Graph

91 Commits (222840fb5fcba621789c68a537f360a6684868db)

Author SHA1 Message Date
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
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
Andrii Shyshkalov 1bf69a1245 Fix bug in is_transient check of rietveld rpc errors.
R=katthomas@chromium.org,sergiyb@chromium.org
BUG=chromium:601260

Change-Id: I79e1e807d1f8aed8d294742974d1f42a852c6b13
Reviewed-on: https://chromium-review.googlesource.com/415147
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
Reviewed-by: Sergiy Byelozyorov <sergiyb@chromium.org>
8 years ago
tandrii 4b233bdb48 Implement git cl set-commit --dry-run for Rietveld.
BUG=622828
R=emso@chromium.org,machenbach@chromium.org

Review-Url: https://codereview.chromium.org/2127633003
9 years ago
tandrii@chromium.org 432fb94422 rietveld: retry more transient errors.
Namely these errors when applying patch:

  <urlopen error [Errno 10060] A connection attempt failed
  because the connected party did not properly respond after
  a period of time, or established connection failed because
  connected host has failed to respond>

  <urlopen error [Errno 104] Connection reset by peer>

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

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@299837 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
dsansome@chromium.org 1dda36db84 Raise exceptions properly on HTTP errors from OAuthRpcServer (which is only used on bots)
This will hopefully make Rietveld._send retry 500s like it promises to

BUG=585632

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@298726 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
dsansome@chromium.org c1eb692f03 Revert "Raise exceptions properly on HTTP errors from OAuthRpcServer (which is only used on bots)"
BUG=585632
TBR=agable

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@298693 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
dsansome@chromium.org 6fa3c67f7e Raise exceptions properly on HTTP errors from OAuthRpcServer (which is only used on bots)
This will hopefully make Rietveld._send retry 500s like it promises to

BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@298688 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
sebmarchand@chromium.org 03d762f285 Make apply_issue fail if the content of a large file is missing.
Currently apply_issue fail if the content of a newly added file is
missing (because of the 900ko threshold in upload.py). But this doesn't
apply to the large file that get modified (instead of being added). This
is wrong because apply_issue will indicates a success without really
applying the patch.

It looks like the patch content is set to "None" in this cases (the string
value, not the empty value None).

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@298366 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
tandrii@chromium.org 29d5e56cd5 Rietveld: refactor and improve retries with UrlError exception.
BUG=564304
R=sergiyb@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@297830 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
tandrii@chromium.org 6e1e951984 Rietveld: do retries on timeouts in Mac.
BUG=564304
TBR=sergiyb@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@297793 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
cbentzel@chromium.org 473527c7ea rietveld.py: Change three_state_keys to emit "True" or "False" query params rather than 1/2.
Manually generating param strings shows that the 1/2 values do not work.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@297732 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
sergiyb@chromium.org f56c93bd17 Retry more errors when talking to Rietveld
R=tandrii@chromium.org
BUG=560785

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@297701 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
dsansome@chromium.org f4ef3e70dd Retry socket.timeout as well as SSL timeouts (ssl.SSLError is a subclass of socket.error).
To fix this flake:
https://uberchromegw.corp.google.com/i/internal.infra.try/builders/infra-internal-presubmit/builds/1216/steps/bot_update/logs/stdio

BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@297234 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
sergiyb@chromium.org e4d195aed9 Print response from the server on HTTP errors from Rietveld
This will make explanation provided by Rietveld visible to the user, e.g.
"Request to https://codereview.chromium.org/1386443003/edit_flags failed: Cannot
set commit on an issue that does not have a commit queue".

R=phajdan.jr@chromium.org
BUG=529339

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@297009 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
tandrii@chromium.org c15d2a0aa7 Rietveld: retry on win on "Errno 10060" socket error.
R=sergeyberezin@chromium.org
BUG=537417

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@296995 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
stip@chromium.org 798a9e3ecd Revert of Temporary fix for codereview cert issue. (patchset #3 id:2 of https://codereview.chromium.org/1376333002/ )
Reason for revert:
Outage is now over

Original issue's description:
> Temporary fix for codereview cert issue.
> 
> BUG=537763
> R=stip@chromium.org
> 
> Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=296959

TBR=tandrii@google.com,tandrii@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=537763

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@296964 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
tandrii@chromium.org c4e1b91bce Temporary fix for codereview cert issue.
BUG=537763
R=stip@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@296959 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
rmistry@google.com 816d085d71 get_depends_on_patchset is actually a POST endpoint
Context= https://groups.google.com/a/chromium.org/d/msg/infra-dev/GNKEiqLqKPg/M_rjXvwvLQAJ

BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@296430 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
rmistry@google.com d91b7e3ccb Find, upload and apply patchset dependencies.
Here is an explanation of the changes in each module:

* git_cl.py -
IF a local branch is being tracked AND a CL has been uploaded there THEN use the CL's issue number and latest patchset as a dependency.

* upload.py -
Uploads the patchset dependency, if it exists, to Rietveld (Rietveld will be able to parse this when https://codereview.chromium.org/1155513002/ lands).

* rietveld.py -
Adds utility methods to get patchset dependencies from the new Rietveld endpoint (the endpoint will exist when https://codereview.chromium.org/1155513002/ lands).

* apply_issue.py -
If CL3 depends on CL2 which in turn depends on CL1 then apply_issue will gather a list of all issues and patchsets to apply (Eg: [CL1:PS1, CL2:PS1, CL3:PS2]).
apply_issue will then loop over the list applying each dependency.
Note: The apply_issue.py diff looks much worse than it is. Please see my comment in
https://codereview.chromium.org/1149653002/diff/260001/apply_issue.py#oldcode169


Tested end-to-end using a test Git repository (https://skia.googlesource.com/skiabot-test/) and the following CLs created in my test Rietveld instance:
* https://skia-codereview-staging.appspot.com/931002  ('Branch1 CL')
* https://skia-codereview-staging.appspot.com/5001001 ('Branch2 CL')
* https://skia-codereview-staging.appspot.com/9881001 ('Branch3 CL')
* https://skia-codereview-staging.appspot.com/3951001 ('Branch3.1 CL')
Opt into the new UI and observe the new 'Depends on Patchset' and 'Dependent Patchsets' sections in the above CLs.


Design doc is here: https://docs.google.com/document/d/1KZGFKZpOPvco81sYVRCzwlnjGctup71RAzY0MSb0ntc/edit#heading=h.6r6lt4tsvssw

BUG=502255

Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=295778

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@295799 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
rmistry@google.com 1c28dab9ee Revert of [depot_tools] Find, upload and apply patchset dependencies (patchset #17 id:360001 of https://codereview.chromium.org/1149653002/)
Reason for revert:
Ran into a crash during the bot_update step here:
https://uberchromegw.corp.google.com/i/internal.infra.try/builders/infra-internal-presubmit/builds/62

Original issue's description:
> Find, upload and apply patchset dependencies.
> 
> Here is an explanation of the changes in each module:
> 
> * git_cl.py -
> IF a local branch is being tracked AND a CL has been uploaded there THEN use the CL's issue number and latest patchset as a dependency.
> 
> * upload.py -
> Uploads the patchset dependency, if it exists, to Rietveld (Rietveld will be able to parse this when https://codereview.chromium.org/1155513002/ lands).
> 
> * rietveld.py -
> Adds utility methods to get patchset dependencies from the new Rietveld endpoint (the endpoint will exist when https://codereview.chromium.org/1155513002/ lands).
> 
> * apply_issue.py -
> If CL3 depends on CL2 which in turn depends on CL1 then apply_issue will gather a list of all issues and patchsets to apply (Eg: [CL1:PS1, CL2:PS1, CL3:PS2]).
> apply_issue will then loop over the list applying each dependency.
> Note: The apply_issue.py diff looks much worse than it is. Please see my comment in
> https://codereview.chromium.org/1149653002/diff/260001/apply_issue.py#oldcode169
> 
> 
> Tested end-to-end using a test Git repository (https://skia.googlesource.com/skiabot-test/) and the following CLs created in my test Rietveld instance:
> * https://skia-codereview-staging.appspot.com/931002  ('Branch1 CL')
> * https://skia-codereview-staging.appspot.com/5001001 ('Branch2 CL')
> * https://skia-codereview-staging.appspot.com/9881001 ('Branch3 CL')
> * https://skia-codereview-staging.appspot.com/3951001 ('Branch3.1 CL')
> Opt into the new UI and observe the new 'Depends on Patchset' and 'Dependent Patchsets' sections in the above CLs.
> 
> 
> Design doc is here: https://docs.google.com/document/d/1KZGFKZpOPvco81sYVRCzwlnjGctup71RAzY0MSb0ntc/edit#heading=h.6r6lt4tsvssw
> 
> BUG=502255
> 
> Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=295778

TBR=agable@chromium.org,jrobbins@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=502255

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@295782 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
rmistry@google.com c2b9bd03e9 Find, upload and apply patchset dependencies.
Here is an explanation of the changes in each module:

* git_cl.py -
IF a local branch is being tracked AND a CL has been uploaded there THEN use the CL's issue number and latest patchset as a dependency.

* upload.py -
Uploads the patchset dependency, if it exists, to Rietveld (Rietveld will be able to parse this when https://codereview.chromium.org/1155513002/ lands).

* rietveld.py -
Adds utility methods to get patchset dependencies from the new Rietveld endpoint (the endpoint will exist when https://codereview.chromium.org/1155513002/ lands).

* apply_issue.py -
If CL3 depends on CL2 which in turn depends on CL1 then apply_issue will gather a list of all issues and patchsets to apply (Eg: [CL1:PS1, CL2:PS1, CL3:PS2]).
apply_issue will then loop over the list applying each dependency.
Note: The apply_issue.py diff looks much worse than it is. Please see my comment in
https://codereview.chromium.org/1149653002/diff/260001/apply_issue.py#oldcode169


Tested end-to-end using a test Git repository (https://skia.googlesource.com/skiabot-test/) and the following CLs created in my test Rietveld instance:
* https://skia-codereview-staging.appspot.com/931002  ('Branch1 CL')
* https://skia-codereview-staging.appspot.com/5001001 ('Branch2 CL')
* https://skia-codereview-staging.appspot.com/9881001 ('Branch3 CL')
* https://skia-codereview-staging.appspot.com/3951001 ('Branch3.1 CL')
Opt into the new UI and observe the new 'Depends on Patchset' and 'Dependent Patchsets' sections in the above CLs.


Design doc is here: https://docs.google.com/document/d/1KZGFKZpOPvco81sYVRCzwlnjGctup71RAzY0MSb0ntc/edit#heading=h.6r6lt4tsvssw

BUG=502255

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@295778 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
tandrii@google.com 39bb4b174d Make Rietveld RPC work with service accounts for public instances.
R=pgervais@chromium.org, hinoka@chromium.org
BUG=489569

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@295723 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
vadimsh@chromium.org f31e7e8c2a Remove 'email', 'password' and 'private_key_file' properties of Rietveld class.
They were used by CQ code, but CQ forked relevant parts of depot_tools already
and no longer uses this code. These properties are unused now (as far as I can
tell searching through code). They expose auth implementation details that
better to be hidden (since they will change with OAuth2 adoption).

R=maruel@chromium.org
BUG=356813

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@294707 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
phajdan.jr@chromium.org db98b6ee20 Fix a bug in setting maxtries
Noticed by Jens Widell in https://codereview.chromium.org/932333003/

TBR=maruel

BUG=459855

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@294123 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
phajdan.jr@chromium.org ab8154f27b Make maxtries for Rietveld configurable
R=machenbach
TBR=maruel

BUG=459855

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@294121 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
sheyang@chromium.org 62554f9d0a Add category property to tryjob
BUG=431792

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@293525 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
hinoka@chromium.org d612e4938a Retry fetching patch from rietveld on a 404
Also added a tiny bit of exponential backoff.

BUG=375479

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@291682 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
sergiyb@chromium.org 538f602e19 Changed backoff to be exponential. This will help to reduce apply_issue flakiness.
BUG=373797
R=maruel@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@277040 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
pgervais@chromium.org 3fd55f9520 Automatically reauthenticate to Rietveld
Added automatic detection of OAuth2 token expiracy. Token is
automatically renewed when necessary.

BUG=363825

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@264871 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
pgervais@chromium.org e7f4e02b5d Fixed reauthentication issue
Renewal of OAuth2 credentials did not work on appengine because it
replies with 302 instead of 401 when authentication fails. Configured
it to attempt credentials renewal on a 302.

Of course this will prevent any 302 from working normally, but it works
with Rietveld since it does not use 302.

BUG=319446

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@264639 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
pgervais@chromium.org 92c300923c Added POST capability to oauth Rietveld
BUG=319446

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@263750 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
agable@chromium.org 333087e2c5 Fix upload.py to properly use a local logger
When rietveld.py overrides upload.py's logging module, it generally works fine...
until someone tries to run upload.py with any level of verbosity. Then the
calls to logging.getLogger and logging.INFO/logging.DEBUG fail. This patches
upload.py to properly use a module-scope logger so that rietveld.py doesn't
have to perform invasive surgery, and everything just works.

This version of upload.py taken from upstream Rietveld at:
changeset:   1267:d7b39eca7dbe
branch:      chromium

R=djacques@chromium.org, maruel@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@262793 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
sergeyberezin@chromium.org 782dc94b4f Fixing inadvertant CQ breakage from depot tools change.
CL that cause the issue: https://codereview.chromium.org/183793010

Symptoms: commit queue presubmit checks failed.

BUG=None

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@259947 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
pgervais@chromium.org 9979824601 Added OAuth2 authentication to apply_issue
Added oauth2client and httplib to third_party

BUG=348233

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@259643 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
agable@chromium.org 6c3c326013 Let ReadOnlyRietveld access the password.
The commit queue can't successfully run presubmit checks on top of
ReadOnlyRietveld because it requires access to the password field to pass
through to presubmit_shim.

R=phajdan.jr@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@259611 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
machenbach@chromium.org 58a69cbe01 Support multiple try masters when sending tries to rietveld.
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@254321 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
sergeyberezin@chromium.org 04bd6b16bd Incorrect SSLError attribute.
ssl.SSLError does NOT have 'reason' attribute. Use str() to get a
reliable string.

Fixed the silly bug in another CL: https://codereview.chromium.org/180273003/

The ssl.SSLError does NOT have attribute 'reason', and must use the
generic 'strerror' instead. This is what happens when I submit a CL
too fast...

BUG=346845
R=stip@chromium.org,maruel@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@253317 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
sergeyberezin@chromium.org 36bc38406a Handle SSL timeouts in Rietveld requests.
BUG=346845
R=maruel@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@253271 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
sergeyberezin@chromium.org e0faffa486 Added a default timeout to rietveld requests.
BUG=345117

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@252452 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
dtseng@chromium.org ac98e29f58 Add an "add_inline_comment" method to rietveld.py
With the addition of this method, rietveld.py can be used to create cli-based tools to review Chromium code.

BUG=none

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@244529 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
phajdan.jr@chromium.org cef7236c80 GTTF: When faking urllib2.HTTPError use int type for HTTP error code
This makes exception catching code which compares the code with
numeric values work as expected. pythonis not PHP and 500 != '500'.

BUG=none

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@228788 0039d316-1c4b-4281-b951-d872f2087c98
12 years ago
phajdan.jr@chromium.org c2f94e78a5 GTTF: Retry on flaky SSL "EOF occurred in violation of protocol" errors.
BUG=none

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@227982 0039d316-1c4b-4281-b951-d872f2087c98
12 years ago
phajdan.jr@chromium.org de9c675a9b Always convert flag value to string in set_flag
The callee needs it to be a string so that it can be made
part of HTTP request. However, in code using Rietveld
it's useful to use non-string types for flags where
Rietveld actually doesn't return strings (say booleans).

One example is the commit flag, which is a boolean.

BUG=291335

Review URL: https://chromiumcodereview.appspot.com/24846002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@225748 0039d316-1c4b-4281-b951-d872f2087c98
12 years ago
phajdan.jr@chromium.org c7a9efad97 GTTF: Add ReadOnlyRietveld similar to one currently in CQ codebase.
This will replace the CQ one and allow it to stay in sync with Rietveld.

For now I've only covered methods that CQ seems to touch.

BUG=291335

Review URL: https://chromiumcodereview.appspot.com/24095007

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@224455 0039d316-1c4b-4281-b951-d872f2087c98
12 years ago
chrisphan@chromium.org 8bbdb7e692 Enable binary file upload.
It seems to just work.

R=dpranke@chromium.org
BUG=23608

Review URL: https://chromiumcodereview.appspot.com/23766025

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@222431 0039d316-1c4b-4281-b951-d872f2087c98
12 years ago
ilevy@chromium.org 9414599a01 Add anonymous-only option to apply_issue
Add an option to apply_issue to fail if anonymous access
triggers a login prompt.
- cherry-pick upload.py rietveld cl 37c73ece82d0 which
   allows clients to request no authentication.

BUG=240634

Review URL: https://chromiumcodereview.appspot.com/20634003

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@214023 0039d316-1c4b-4281-b951-d872f2087c98
12 years ago
maruel@chromium.org 4572a09102 Have Rietveld.get_description() consistently strip CR and whitespace.
This makes the commit description cleaner.

R=iannucci@chromium.org
BUG=

Review URL: https://chromiumcodereview.appspot.com/14061008

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@199275 0039d316-1c4b-4281-b951-d872f2087c98
12 years ago
maruel@chromium.org 0df1e0de11 Cut the comment short in Rietveld.add_comment(). [follow up of r177704]
Very long comments, like when posting a diff that failed to apply, cause extra
burden on the Commit Queue logs.

TBR=csharp@chromium.org
BUG=


Review URL: https://chromiumcodereview.appspot.com/11929027

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