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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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