Commit Graph

65 Commits (9a8b066e52dff833016db0fcea69072814162ffe)

Author SHA1 Message Date
hinoka@google.com da73a4bdaa bypass_prodaccess fix
It looked like the bypass_prodaccess flag wasn't passed in all the way to
where it needed to be, causing it to be set to True by default at some point,
which caused the prodaccess path to never happen.  This change takes the flag
and brings it all of the way.

BUG=337972

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@247049 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
dtu@chromium.org 8cfa89bfd7 Disable retries when gsutil runs loas_check.
By default, if loasd is not running, loas_check retries twice, waiting 5 seconds between retries. This is in case loasd is restarting due to reinstallation. Unfortunately, if the user has never run prodaccess, this check takes an extra 10 seconds. So, just disable the retries.

BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@245399 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
hinoka@chromium.org c6a2ee6930 Adds SSO auth to gsutil
Code path:
1. plugins.sso_auth is imported, which adds the AuthHandler class to the global state.
2. HasConfiguredCredentials() in gslib/utils.py is called by gsutil, and will return true if "prodaccess" exists on the system, which tells the system that we don't want a no-op auth handler.
3. When a command is called, all the auth handlers are cycled through and sso_auth.SSOAuth is called, which calls a stubby command to emit a gaiamint'ed oauth2 access token, which is then used as the Authorization Header

if --bypass_prodaccess is passed in, then:
1. HasConfiguredCredentials() will bypass the check for prodaccess, as if it didn't exist.
2. plugins.sso_auth does not get imported.
Which will essentially cause gsutil to behave as if this patch never existed.

So the expected behavior is:
=.boto file does not exist, prodaccess exists, but unauthenticated=
Failure: No handler was ready to authenticate. 3 handlers were checked. ['OAuth2Auth', 'HmacAuthV1Handler', 'SSOAuth'] Check your credentials.

=.boto file exists, prodaccess exists, but unauthenticated=
sso_auth will raise NotReadyToAuthenticate, and the .boto file will be used instead

=.boto file exists, prodaccess exists, authenticated=
sso_auth will be run _after_ the default gsutil authenticator, which causes the sso_auth to be used over whatever the default authentication is.

bypass_prodaccess is passed in by default to upload_to_google_storage because we expect people who use upload_to_google_storage to not need prodaccess and have their own boto file already.  Also the sso_auth plugin will only request a readonlyi token, which will not work for uploading.

BUG=258152

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@240266 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
hinoka@chromium.org b5f87ed83b Remove code in gsutil that removes http_proxy from the env var
boto config does the right thing by using the http_proxy env var to set the proxy,
and gsutil removes that var which isn't the behavior we want.
This should allow gsutil to respect the http_proxy env var.

BUG=318478

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@235818 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
iannucci@chromium.org 3665cd2c39 Add python coverage 3.7 to depot tools.
R=maruel@chromium.org
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@233566 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
maruel@chromium.org 566c38251a Update colorama from upstream to 5a3100113a3a.
This fixes license headers.

Interestingly, the pylint workaround at r133705 doesn't seem to be necessary
anymore.

R=stip@chromium.org
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@232152 0039d316-1c4b-4281-b951-d872f2087c98
12 years ago
maruel@chromium.org e0fabd7414 Update upload.py from Rietveld @ 73805c4878a9.
TBR=stip@chromium.org
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@229012 0039d316-1c4b-4281-b951-d872f2087c98
12 years ago
maruel@chromium.org 2a08269234 Update upload.py at b7cdf3e63c5e.
R=iannucci@chromium.org
BUG=23608

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@224175 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
iannucci@chromium.org e7e690a951 Update upload.py to include fix for svg files.
This pulls r1084 from the chromium on upstream rietveld.

R=jparent@chromium.org, maruel@chromium.org
BUG=247791

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@206743 0039d316-1c4b-4281-b951-d872f2087c98
12 years ago
jparent@chromium.org be31c43fa7 Images are binaries too, yo.
Make upload.py treat images as binaries, so they upload correctly and display in Reitveld.

BUG=227346

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@198833 0039d316-1c4b-4281-b951-d872f2087c98
12 years ago
iannucci@chromium.org ed7d3e4428 Update update.py from rietveld/chromium@r1052.
R=maruel@chromium.org
BUG=166901

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@198031 0039d316-1c4b-4281-b951-d872f2087c98
12 years ago
hinoka@google.com 8d2f67235a Added gsutil/ to depot_tools/third_party/
This is needed for https://chromiumcodereview.appspot.com/12042069/
Which uses gsutil to download objects from Google Storage based on SHA1 sums

Continuation of: https://chromiumcodereview.appspot.com/12317103/
Rietveld didn't like a giant CL with all of gsutil (kept crashing on upload),
The CL is being split into three parts

Related:
https://chromiumcodereview.appspot.com/12755026/ (gsutil/boto)
https://chromiumcodereview.appspot.com/12685010/ (gsutil/gslib)

BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@188896 0039d316-1c4b-4281-b951-d872f2087c98
12 years ago
hinoka@google.com 8efca395c0 Added gsutil/gslib to depot_tools/third_party
This is needed for https://chromiumcodereview.appspot.com/12042069/
Which uses gsutil to download objects from Google Storage based on SHA1 sums

Continuation of: https://chromiumcodereview.appspot.com/12317103/
Rietveld didn't like a giant CL with all of gsutil (kept crashing on upload),
The CL is being split into three parts

Related:
https://chromiumcodereview.appspot.com/12755026 (gsutil/boto)
https://codereview.chromium.org/12685009/ (gsutil/)

BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@188842 0039d316-1c4b-4281-b951-d872f2087c98
12 years ago
hinoka@google.com 50f1d2a176 This is needed for https://chromiumcodereview.appspot.com/12042069/
Which uses gsutil to download objects from Google Storage based on SHA1 sums 

Continuation of: https://chromiumcodereview.appspot.com/12317103/ 
Rietveld didn't like a giant CL with all of gsutil (kept crashing on upload), 
The CL is being split into three parts 

Related: 
https://chromiumcodereview.appspot.com/12685010/ (gsutil/gslib) 
https://codereview.chromium.org/12685009/ (gsutil/) 

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@188841 0039d316-1c4b-4281-b951-d872f2087c98
12 years ago
maruel@chromium.org 04cf03f4a6 Update upload.py at @ 41332266d718.
TBR=iannucci@chromium.org
BUG=155511


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@167443 0039d316-1c4b-4281-b951-d872f2087c98
12 years ago
maruel@chromium.org 3836bb2c3f Update upload.py at 6edc5bf0ceb2.
TBR=iannucci@chromium.org
BUG=


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@159715 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
maruel@chromium.org 72e04c7dc7 Update upload.py @ 215ecb2ae628; fixes typo.
TBR=petermayo@chromium.org
BUG=


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@156105 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
maruel@chromium.org 7bf1b5dc72 Update upload.py from upstream at d5f7dffc2dbb.
Fix issue with invalid password in keyring and git renames.

R=petermayo@chromium.org
BUG=144408

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@155898 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
chrisha@chromium.org 1b129e551f Pass arguments to pylint child process via a pipe.
This gets around command-line length limitations.

BUG=
TEST=


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@143620 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
maruel@chromium.org 22a6876246 Fix Pylint presubmit check.
First, the environment variable for the child process was created but not
specified to subprocess.call().

Second, third_party/logilab/__init__.py tried to initialize itself with
pkg_resources.

TBR=chrisha@chromium.org
BUG=
TEST=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@143111 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
chrisha@google.com 267d659c93 Add pylint to depot_tools.
This CL adds pylint (and its dependencies) to third_party. It plumbs them into presubmit_canned_checks, and exposes a command-line tool to access pylint.

BUG=
TEST=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@143016 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
maruel@chromium.org f029dcf461 Update upload.py to chromium@53dd8c978c1b
TBR=cmp@chromium.org
BUG=
TEST=


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@141676 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
rogerta@chromium.org f0526416ba Update upload.py @ f218528d3469
BUG=None
TEST=gcl upload now uploads any type of binary file, not just images.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@138469 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
rogerta@chromium.org 4b37d61a9b Apply upstream changes from http://code.google.com/p/rietveld/source/detail?r=2972a6fd9a4713862609a49d6bc953ca76fa2339&name=chromium
Review URL: http://codereview.chromium.org/10269009

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@134574 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
maruel@chromium.org a9eeeee9fe Remove E1101 errors generated by colorama.AnsiCodes.
Pylint fails to parse generated members in a __init__() function.

R=cmp@chromium.org
BUG=
TEST=Manually tested on linux, cygwin and windows


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@133705 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
maruel@chromium.org 71e12a9e41 Update upload.py @ fae51921ad9d
This version of upload.py is slightly less annoying, it won't cancel out if no
patchset title is provided and disable colors all the time.

R=cmp@chromium.org
BUG=
TEST=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@121826 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
jam@chromium.org 3108364f7c Revert 119066 until we have consensus.
TBR=ben
Review URL: https://chromiumcodereview.appspot.com/9298002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@119353 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
maruel@chromium.org 2b40b89ae1 Update upload.py @827fa087f74d, which includes support for svn 1.7
It also removes the need of manually creating a subject argument.

Other related changes in this CL:
- Reenable the prompt for patchset title in gcl. I'm not sure why it was disabled.
- Remove git cl upload --desc_from_logs flag. --force is already meaningful.

R=cmp@chromium.org
BUG=
TEST=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@119066 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
chrisha@chromium.org 93ee568c52 Add setuptools egg to third_party.
This CL adds the egg distribution of setuptools to third_party. A follow-up CL will use this to install various required third-party eggs in a depot_tools/site-packages directory.

TBR=maruel@chromium.org
BUG=
TEST=


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@114635 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
maruel@chromium.org 8e2bb16aa5 Update upload.py to ba420db469ba.
The main fix is 'Accept new empty files, like __init__.py'

TBR=dpranke@chromium.org
BUG=
TEST=


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@109431 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org da78c6f1b6 Reapply r106708 "Include initial use of colorama"
isatty() wasn't defined on Windows, causing it to crash.

R=dpranke@chromium.org
BUG=
TEST=manually gclient sync on windows


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@106865 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org d8aba2cea8 Revert "Include initial use of colorama"
Crashes.

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@106709 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 037bd18864 Include initial use of colorama
For now only affect gclient help to figure out if there is any issue with it.

Because of the way it's done, there is no way to disable coloring, which could
be annoying when redirected. This needs to be taken in consideration.

R=dpranke@chromium.org
TEST=manually tested on linux, cygwin and windows, both run manually and
redirected to a text file.
BUG=


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@106708 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 4f6d25c4ac Update upload.py from rietveld @ 7696eca367d2.
---

Trap failure to get password from keyring

It happens when using upload.py from a ssh session without a X session but
gnomekeyring is used.

R=dpranke@chromium.org
BUG=
TEST=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@97909 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org b615edaef7 Update upload.py from ed59464f8468.
R=dpranke@chromium.org
BUG=
TEST=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@97854 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org e8829d3d7c Update upload.py to r746.
R=dpranke@chromium.org
BUG=
TEST=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@87106 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 04d22591ee Add back support for git mv files.
It was added in r80045 but was overwriten in r82495 when I synced upload.py to
r705 since upstreaming that part staled.

TBR=dpranke
TEST="git mv foo bar; git commit -a; git cl upload" shows 2 files, one A+, one D.
BUG=none

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@84264 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 1c5518eae4 Update upload.py to r705.
R=dpranke@chromium.org
BUG=
TEST=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@82495 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org cab38e994e First stab at using Rietveld wrapper object in both gcl.py and git-cl.
Exposes InputApi.rietveld and deprecate host_url.

This is useful since it places authentication at a single place.

BUG=
TEST=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@81019 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org df3302b382 Update upload.py to r690 and include fix for "support for git mv in rietveld"
I just don't want to wait for http://codereview.appspot.com/4333051 to be committed.

R=dpranke@chromium.org
BUG=
TEST=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@80045 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org fbe3d3015c Update upload.py to r680 from upstream.
Removed all the local hacks as they are not necessary anymore.

R=dpranke@chromium.org
BUG=none
TEST=manually verified that HTTP 302 redirect works fine.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@79296 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 082cccdbb4 Partial update of upload.py with r660 patch.
Make json files known as a text mimetype so that they can be seen in reviews.

Original review at http://codereview.appspot.com/4133046/

Also make sure that the copy in third_party and in git_cl are the same. I'll
remove the copy in git_cl in a later change.

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@74116 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
kbr@chromium.org 6c96e493a3 Second attempt to work around App Engine flakiness by retrying upon URLError
("Connection timed out"). This allowed me to successfully upload a CL I had
been stuck on for a couple of hours.

Manually tested by raising both HTTPError and URLError within this code block
and ensuring both are caught correctly.

BUG=none
TEST=none


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@71702 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
kbr@chromium.org e0c16f9f67 Revert http://codereview.chromium.org/6345001/ because it apparently
introduced a bug which I didn't encounter during testing.

BUG=none
TEST=none
TBR=maruel

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@71520 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
kbr@chromium.org 02a89f564b Work around App Engine flakiness by retrying upon URLError
("Connection timed out"). This allowed me to successfully upload a CL
I have been stuck on for a couple of hours.

BUG=none
TEST=none

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@71513 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org b7d3b24d3f Increment tries so it doesn't loop forever.
TEST=none
BUG=none

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@67359 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org d528cb88ce Propagate host to _GetAuthToken() to make it coherent.
TEST=none
BUG=none

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

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