Commit Graph

63 Commits (00253809342017ef8d9742f1cb13cec5fe6e7ff7)

Author SHA1 Message Date
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
maruel@chromium.org c1715ec26f Make logging a bit shorter on Rietveld().add_comment().
It's done for the Commit Queue.

TBR=csharp@chromium.org
BUG=


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@177704 0039d316-1c4b-4281-b951-d872f2087c98
12 years ago
ilevy@chromium.org eebd3c9e53 Add rietveld POST logging
I've found it helpful and instructive to see what we're posting to
rietveld. Let's add it as a debug log for others too.  Can be helpful
to debug certain network issues.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@175361 0039d316-1c4b-4281-b951-d872f2087c98
12 years ago
maruel@chromium.org 4bac4b5517 Create CachingRietveld to automatically cache results for presubmit checks.
Multiple presubmit checks may call the same function multiple times, so it's
worth caching the results to speed up the presubmit check run.

Convert presubmit_support, git-cl and gcl to use it.

R=dpranke@chromium.org
BUG=


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@169726 0039d316-1c4b-4281-b951-d872f2087c98
12 years ago
ilevy@chromium.org b812828795 Hard code order field for rietveld.py::get_pending_issues
This is needed for https://codereview.appspot.com/6814091/
which changes the default ordering on codereview searches.

R=maruel@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@166822 0039d316-1c4b-4281-b951-d872f2087c98
12 years ago
maruel@chromium.org de85d9c794 Add protected against empty binary file and disable all binary file support.
If a file is empty, it's not a binary file in the first place. This is to
protect against improper uploads.
From light testing, it seems binary file support is totally broken. This needs to be verified throughout before being enabled back.

TBR=rogerta@chromium.org
BUG=23608


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@159941 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
maruel@chromium.org 072d94b68f Do not enforce HEAD when a revision is not specified.
This brings back git cl try to try at LKGR instead of HEAD, which is coherent
with git-try and gcl try.

R=rogerta@chromium.org
BUG=


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@157810 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
maruel@chromium.org 893982033e Change Rietveld.add_comment() to not add the user as a reviewer by default
This is mainly to reduce the spam that the commit queue adds to
commit-bot@chromium.org as all follow up emails on code reviews are sent to it
because it was adding itself as a reviewer, even if it is not.

R=rogerta@chromium.org
BUG=


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@155141 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
maruel@chromium.org 61ea42f080 Add function to trigger try jobs on Rietveld.
R=rogerta@chromium.org
BUG=


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@154955 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
maruel@chromium.org 083cd45914 Fix apply_issue.py to work on python 2.6 with anonymous request.
Fix RawCheckout support in apply_issue.py.

TBR=rogerta@chromium.org
BUG=


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@154703 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
maruel@chromium.org 3bf4b3c864 Enable anonymous apply_issue behavior by default and only fall back to login when needed.
Patch in upload.py fix for python 2.7.

TBR=rogerta@chromium.org
BUG=


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@154696 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
maruel@chromium.org 8f4e5bf7be Enforce issue and patchset being a number in most Rietveld APIs.
This ensures we don't send incorrect values like None or random strings.

R=cmp@chromium.org
BUG=


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@152756 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
rogerta@chromium.org ed2332542c Allow apply_issue.py to make api calls to rietveld that don't require
authentication.  Also allow apply_issue.py to specify a username if needed.

BUG=43563
TEST=Make sure that sending try jobs directly from rietveld works.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@145600 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
rogerta@chromium.org e989f19485 Change rietveld object to use new URL to download binary files. This depnds
on http://codereview.appspot.com/6221063/ which makes sure that rietveld will
upload non-image binary files.

BUG=23608
TEST=Use apply_issue.py with an issue that contains binary files, and make
sure the files download correctly.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@138472 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
maruel@chromium.org 40f4ad31ef Moving a file in the same directory result in status 'R'.
Add support for this status.

R=nsylvain@chromium.org
BUG=
TEST=apply_issue.py -i 10382062 should work now


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@135912 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
maruel@chromium.org 2c96af7d78 Trim message posted to rietveld to 10000.
Rietveld doesn't post the message when it is too large.

R=petermayo@chromium.org
BUG=
TEST=Now the CQ should stop having weird case where it doesn't post a message on
CQ failure. It was because the message was simply too long!


Review URL: http://codereview.chromium.org/10383004

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@135326 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
maruel@chromium.org 264952ad00 There is no reason to not assume that status:null isn't 'M'.
Rietveld self-corrupts its status all the time, there is not point in bailing
just because of that. So just assume it's an 'M' and it'll work fine. In any
case, the diff is properly parsed to detect what was the real operation.

Add unit test that correctly process a deleted file with status:null.

TBR=nsylvain@chromium.org
BUG=
TEST=A corrupted patchset can still be committed with the Commit Queue.


Review URL: http://codereview.chromium.org/10272024

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@134733 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
maruel@chromium.org 4f6852cca4 Remove python 2.5 compatibility code.
R=cmp@chromium.org
BUG=
TEST=


Review URL: http://codereview.chromium.org/10165007

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@133265 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
maruel@chromium.org 58733288cd Fix workaround for ErrorExit().
r123775 contained copy-paste left-over that caused the code to throw a NameError
instead of a HTTPError.

R=petermayo@chromium.org
BUG=
TEST=


Review URL: http://codereview.chromium.org/9536014

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@124184 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
maruel@chromium.org a01fd324f9 Convert ErrorExit() calls back into an HTTPError exception so it can be properly handled.
Occasionally, AppEngine throws HTTP 500. In practice it's not a big deal but
upload.py converts them into sys.exit() call which is problematic. This breaks
the commit queue since this behaviors forces the CQ to quit.

R=dpranke@chromium.org
BUG=
TEST=


Review URL: http://codereview.chromium.org/9480005

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@123775 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
maruel@chromium.org 9799a079c5 Accept svn:mime-type as a valid svn property.
R=dpranke@chromium.org
BUG=
TEST=


Review URL: http://codereview.chromium.org/9172003

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@117133 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
maruel@chromium.org 3e9e4325cd Strip url trailing backslash.
It's annoying to have it crash much later in a member function call when a
trailing backslash is provided.

R=dpranke@chromium.org
BUG=
TEST=


Review URL: http://codereview.chromium.org/8056016

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@103058 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org c73e516e12 Add my_reviews.py script for perf time.
Add search interface for rietveld.

R=dpranke@chromium.org
BUG=
TEST=


Review URL: http://codereview.chromium.org/7977030

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@102191 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 087066c553 Make the rietveld client code ignore file status more often.
It's proved to be unreliable.

R=dpranke@chromium.org
BUG=
TEST=


Review URL: http://codereview.chromium.org/7857006

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@100236 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org e2335ae8fe Fix support when 2 properties are modified.
Add regression test.

R=dpranke@chromium.org
BUG=
TEST=


Review URL: http://codereview.chromium.org/7754020

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@100209 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 75547c3f98 Fix rietveld when status is only one char
Update unit test accordingly.

R=dpranke@chromium.org
BUG=
TEST=


Review URL: http://codereview.chromium.org/7754016

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@100207 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org a19047cdf4 Add support forcopied and renamed files.
R=dpranke@chromium.org
BUG=
TEST=


Review URL: http://codereview.chromium.org/6874006

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@100138 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 6cdac9ef45 Make rietveld status handling saner
Add support for a few svn:* properties.
Silently ignore svn:mergeinfo. It's useless once we're switched to git-land anyway.

More testing.

R=dpranke@chromium.org
BUG=
TEST=


Review URL: http://codereview.chromium.org/7840003

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@99952 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 031524151a Implement reverse mangling of svn properties.
That means some properties will being to be applied.

R=dpranke@chromium.org
BUG=
TEST=

Review URL: http://codereview.chromium.org/7776015

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