Commit Graph

2848 Commits (f4ef3e70dd35009a060007cae026f967727a6c38)
 

Author SHA1 Message Date
sbc@chromium.org 217330f2f0 Add quotes around command line in subproccess error message
Allows the command line itself to be distinguished
from the surrounding error message.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@295481 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
maruel@chromium.org 79d6237ec0 Make gclient warn when svn is used.
Include links to the tracking bug and to request creating git repositories. Also
include note how to keep subversion support, if users require this.

It won't warn when git-svn clones are used.

There is no functional change except printing a warning to stderr.

Remove stale code. The CHROMIUM_SRC_URL variable is also defined in gclient.py
so it looks like a copy-paste error.

R=iannucci@chromium.org
BUG=475320

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@295478 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
sbc@chromium.org 30e5b23701 roll_dep.py: switch to argparse
This makes for cleaner code and better --help.

Also, handle case when deps directory does not exist.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@295475 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
akuegel@chromium.org f0149a3cb5 Install google appengine.
This is needed to run the presubmit commit checks.
Tested this CL by running git cl presubmit locally.

BUG=420910

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@295472 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
sergiyb@chromium.org 318592bc0b Added commit_queue binaries for Windows and Linux
R=pgervais@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@295468 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
sbc@chromium.org e5d984b90a Fix crash in roll_dep.py when key == None
Also, unify error handling to use exceptions.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@295465 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
sergiyb@chromium.org dc1283197c Added tools to retrieve CQ builders from a CQ config
R=pgervais@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@295461 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
wychen@chromium.org 5b3bebb18e In PatchIssue, add CL description to commit message
Before this change, the commit message only contains issue number and
patchset number. Adding CL description should be more informative.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@295449 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
wychen@chromium.org 85cab635b1 Show date format in help message in my_activity.py
It was not very obvious what kind of date format is expected.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@295448 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
scottmg@chromium.org 0d2dae5791 Add README.md for win_toolchain
I started to build a package for setting up a VS2015 bot, and realized
I didn't really remember how the toolchain setup worked. So I wrote
a readme for this directory.

I see I will live to regret putting way too many "2013"s in various
places in these scripts. :/

R=dpranke@chromium.org
BUG=492774

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@295437 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
sullivan@chromium.org 8770f48dfd Fix filename checks
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@295430 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
stevefung@chromium.org 832d51eed5 my_activity.py: Fix to work with non-ascii characters
The default encoding for python 2.7 strings is ascii.  Some of
the titles of issues, such as http://crbug.com/477941, contain
non-ascii characters, and cause my_activity.py to throw an
exception.  Re-encode the unicode title string to ascii with
the 'replace' option, to replace non-ascii characters with '?'.

R=maruel@chromium.org
BUG=none
TEST=Run `my_activity.py` with #477941 in my issues list; correctly
     lists issues without throwing an exception.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@295425 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
nparker@chromium.org 31f3df064d Report more detailed error from download_from_google_storage.py when gsutil fails.
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@295416 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
dgarrett@chromium.org adec273a66 Remove the 'brillo' wrapper.
This command no longer makes sense here, it should only be used from the chromite bootstrap workflow.

This is basically a revert of cl:896393003

BUG=None

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@295415 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
maruel@chromium.org dbd102dc2b Remove most svn related testing.
Subversion usage is going away, tests get the kick first.

R=iannucci@chromium.org
BUG=475320

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@295411 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
scottmg@chromium.org c20f470011 Make roll_dep.py work on Windows
Didn't have any shell=True for git.bat/cmd.

Was able to upload https://codereview.chromium.org/1151373003 after
this CL (though the printed description didn't make it to Rietveld,
not sure if it normally does that.)

R=maruel@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@295397 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
maruel@chromium.org a7a229fe6d Also handle IOError in roll_dep.py.
TBR=smut@chromium.org
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@295391 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
maruel@chromium.org 96550949d5 Rename roll-dep to roll-dep-svn and add roll-dep for git.
It is inspired by src/tools/roll_swarming_client.py but generalized.

R=dpranke@chromium.org, stip@chromium.org
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@295386 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
akuegel@chromium.org a1bf72dd1e Disable tests that break because of git 2.4
BUG=487172

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@295375 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
machenbach@chromium.org 79e43ffaad Allow properties to be overridden in buildbucket tries.
BUG=488235
PRESUBMIT=false
R=nodir@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@295275 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
sheyang@google.com 6ebaf7822c git cl try uses buildbucket via OAuth2
TEST=local run on Linux desktop and Macbook

NOPRESUBMIT=true(due to https://code.google.com/p/chromium/issues/detail?id=487172)

BUG=461614
R=maruel@chromium.org, nodir@chromium.org, vadimsh@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@295236 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
thakis@chromium.org eda2c9b5bf Update toolchain setup instructions to match reality.
BUG=none
NOTRY=true
NOPRESUBMIT=true

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@295155 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
luqui@chromium.org 609f395e7c Make git cl upload correctly track upstream refs when uploading to Gerrit
NOPRESUBMIT because it's broke on CQ, Cf. https://codereview.chromium.org/1124803002

BUG=478260
NOPRESUBMIT=true

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@295124 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
estaab@chromium.org 84ec4ace10 Change depot_tools presubmit to use infra rietveld from head. Also disable newly added backends by specifying app.yaml explicitly.
BUG=481568

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@295099 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
stip@chromium.org a735da2a16 Add `gclient root` command which outputs the current solution's root.
NOPRESUBMIT=true

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@295075 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
wychen@chromium.org 8ba1ddb3d6 In my_activity.py, multiple --last_week for more weeks
Also, if one --last_week option is given, the date range should be
strictly one week before when without the option.

BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@295052 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
wychen@chromium.org a872e757cb Don't clean up after conflict in "git cl patch"
After crrev.com/896453002, if "git cl diff" ends up having conflict, it
would be cleaned up. However, if "git cl patch" ends up with conflict,
the user should still be able to manually resolve them.

BUG=438362
TEST=tests/git_cl_test.py

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@295051 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
wychen@chromium.org 445c896d9f Fix mock restoration in git_cl_test
The assertion in TestGitCl.tearDown should be done after super.tearDown
is finished. Otherwise if the assertion fails, mocked objects won't be
restored properly, and the next TestCase would be affected.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@295049 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
sergiyb@google.com 7676cca756 Disabled flaky depot_tools tests
R=akuegel@chromium.org,pgervais@chromium.org
BUG=477454

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@295007 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
sbc@chromium.org 98201125ea Improve --help and usage message for roll_deps.py
Also, don't use assert for user error handling plus
some other general python cleanup.

NOPRESUBMIT=true (presubmit is broken)

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@294950 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
agable@chromium.org 327d72b88b Enable passing custom pylintrc files to PRESUBMIT.RunPylint.
R=maruel@chromium.org
BUG=475714

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@294925 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
vadimsh@chromium.org 148f76f770 Fix "git cl upload --use-oauth2" not working on Windows when HOME is not set.
depot_tools' git wrapper for some reason overrides %HOME% to point to
depot_tools directory, and thus scripts running as git subprocesses (git_cl.py)
use not the same HOME as scripts that run outside of git process tree
(depot-tools-auth.py). Instead always use USERPROFILE in auth.py to consistently
pick same directory.

This issue happens only when HOME is not set globally. It can explain why it
wasn't seen earlier.

R=iannucci@chromium.org
BUG=356813

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@294911 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
vadimsh@chromium.org cfbeecb23e Add debug logging to auth.py.
There are some mysterious issues happening to some Windows users. Verbose log
can be helpful.

R=maruel@chromium.org
BUG=356813

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@294910 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
vadimsh@chromium.org 19f3fe60b2 Enable OAuth2 by default.
ClientLogin will be supposedly turned off on Apr 20.

R=maruel@chromium.org
BUG=356813

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@294899 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
jiangj@opera.com d6d15b8e29 Fix GetPrimarySolutionPath() to not include buildtools
GetPrimarySolutionPath() is used by GetBuildtoolsPath() to locate
the chromium/src directory, its return value shouldn't include
'buildtools', since GetBuildtoolsPath() will append another one to
it.

Introduced by https://codereview.chromium.org/933383002

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@294894 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
phajdan.jr@chromium.org 5604359d27 Add "fetch" recipe for pdfium
BUG=none

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@294890 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
sheyang@chromium.org 002ffa0e3e Remove apiclient package
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@294877 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
vadimsh@chromium.org 24daf9e974 Add support for externally provided refresh tokens.
OAuth token cache file (as implemented by oauth2client library) stores refresh
token and can in theory be deployed via Puppet as the credential. But it is
mutated by the library (to store access tokens, rotated each hour), and so it is
not static and managing it via Puppet (or however else) is a big pain.

Instead, now depot_tools accepts --auth-refresh-token-json parameter with a path
to a static JSON file (with minimal body being {"refresh_token": "....."}). It
can be used to pass previously prepared refresh tokens of role accounts. It
will be used for blink DEPS roller account and similar @chromium.org accounts.

R=maruel@chromium.org
BUG=356813

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@294870 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
peter@chromium.org 2ce13130dd Implement support for file: includes in OWNERS files.
This CL implements support for file: include lines in OWNERS files,
both as top-level directives and as per-file directives. The
paths can be either relative or absolute.

Examples of lines in OWNERS files:

  file:test/OWNERS  (relative, top-level)
  file://content/OWNERS  (absolute, top-level)
  per-file mock_impl.h=file:test/OWNERS  (relative, per-file)
  per-file mock_impl.h=file://content/OWNERS  (absolute, per-file)

A whole series of tests to cover this feature have been added
to owners_unittest.py as well.

BUG=119396, 147633

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@294854 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
akuegel@chromium.org 82c0fb126a Revert of Upgrade 3rd packages (patchset #4 id:60001 of https://codereview.chromium.org/1085893002/)
Reason for revert:
This might have broken some internal tryserver bots.

Original issue's description:
> Upgrade 3rd packages
> 
> BUG=461614
> R=nodir@chromium.org
> 
> Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=294835

TBR=nodir@chromium.org,sheyang@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=461614

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@294841 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
sheyang@google.com 7e3b6fdd79 Upgrade 3rd packages
BUG=461614
R=nodir@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@294835 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
vadimsh@chromium.org ed15219ece Use prefixed URLs path when calling internal Rietveld with OAuth2 auth.
Internal Rietveld exposes OAuth2 compatible API via /bots/* endpoints, not via
/* as public one does. See crbug.com/476690.

R=maruel@chromium.org
BUG=356813

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@294793 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
vadimsh@chromium.org afbb019144 Fix typo in Authorization header name.
This code path is not actually used yet, so the typo wasn't caught earlier.

Also make sure access tokens have 'str' type, not 'unicode'.

R=nodir@chromium.org
BUG=356813

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@294789 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
sergiyb@chromium.org 48d661e723 Added an env variable to hide "Depot tools has been updated..." message
This is needed to prevent auto_deploy.py in CQ send alert each time depot_tools
get's updated as cron job will send alert on any output.

R=stip@chromium.org
CC=akuegel@chromium.org
BUG=475049

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@294778 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
akuegel@chromium.org 5df79ca431 Fix git_cl_tests.
BUG=356813

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@294777 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
vadimsh@chromium.org eed4df3d91 Add OAuth2 support for end users (i.e. 3-legged flow with the browser).
This CL introduces new top level command for managing cached auth tokens:
  $ depot-tools-auth login codereview.chromium.org
  $ depot-tools-auth info codereview.chromium.org
  $ depot-tools-auth logout codereview.chromium.org

All scripts that use rietveld.Rietveld internally should be able to use cached
credentials created by 'depot-tools-auth' subcommand. Also 'depot-tools-auth'
is the only way to run login flow. If some scripts stumbles over expired or
revoked token, it dies with the error, asking user to run
'depot-tools-auth login <hostname>'.

Password login is still default. OAuth2 can be enabled by passing --oauth2 to
all scripts.

R=maruel@chromium.org
BUG=356813

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@294764 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
sbc@chromium.org 71437c0ba5 git-squash-branch: handle empty squashes
Error out of the current tree is dirty (previously the dirty
content would be incorporated silently into the newly
squashed branch!).

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@294744 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
primiano@chromium.org 4126556b4a Fix hook disable logic in gclient_scm (non-atomic os.rename on Windows)
crrev.com/348703002 has introduced some code into gclient_scm.py which
disables the .git/hooks when gclient is running in managed mode.
The disabling logic renames the individual hook files to hook.disabled
using os.rename. Conversely to what happen on Posix OSs, on Windows
os.rename does not have atomic rename semantics [1] and it fails if the
destination file already exists.
This change improves the hook disable logic.

[1] See https://bugs.python.org/issue8828 and os.replace in Python 3

BUG=474218

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

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