chromium/tools/depot_tools.git
7 hours agoAdd "fetch" recipe for pdfium master
phajdan.jr@chromium.org [Sat, 18 Apr 2015 01:38:30 +0000 (01:38 +0000)]
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

16 hours agoRemove apiclient package
sheyang@chromium.org [Fri, 17 Apr 2015 16:24:32 +0000 (16:24 +0000)]
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

30 hours agoAdd support for externally provided refresh tokens.
vadimsh@chromium.org [Fri, 17 Apr 2015 02:42:44 +0000 (02:42 +0000)]
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

40 hours agoImplement support for file: includes in OWNERS files.
peter@chromium.org [Thu, 16 Apr 2015 16:42:08 +0000 (16:42 +0000)]
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

40 hours agoSkip OWNERS checks for CQ dry runs
rmistry@google.com [Thu, 16 Apr 2015 16:38:43 +0000 (16:38 +0000)]
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

45 hours agoRevert of Upgrade 3rd packages (patchset #4 id:60001 of https://codereview.chromium...
akuegel@chromium.org [Thu, 16 Apr 2015 11:06:23 +0000 (11:06 +0000)]
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

2 days agoUpgrade 3rd packages
sheyang@google.com [Thu, 16 Apr 2015 01:12:39 +0000 (01:12 +0000)]
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

4 days agoUse prefixed URLs path when calling internal Rietveld with OAuth2 auth.
vadimsh@chromium.org [Tue, 14 Apr 2015 01:36:17 +0000 (01:36 +0000)]
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

4 days agoFix typo in Authorization header name.
vadimsh@chromium.org [Mon, 13 Apr 2015 23:26:31 +0000 (23:26 +0000)]
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

4 days agoAdded an env variable to hide "Depot tools has been updated..." message
sergiyb@chromium.org [Mon, 13 Apr 2015 14:03:53 +0000 (14:03 +0000)]
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

4 days agoFix git_cl_tests.
akuegel@chromium.org [Mon, 13 Apr 2015 13:59:24 +0000 (13:59 +0000)]
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

7 days agoAdd OAuth2 support for end users (i.e. 3-legged flow with the browser).
vadimsh@chromium.org [Fri, 10 Apr 2015 21:30:20 +0000 (21:30 +0000)]
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

8 days agoExtract authentication options handling into a separate function.
vadimsh@chromium.org [Thu, 9 Apr 2015 22:02:00 +0000 (22:02 +0000)]
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

8 days agogit-squash-branch: handle empty squashes
sbc@chromium.org [Thu, 9 Apr 2015 19:29:40 +0000 (19:29 +0000)]
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

9 days agoFix hook disable logic in gclient_scm (non-atomic os.rename on Windows)
primiano@chromium.org [Wed, 8 Apr 2015 09:14:46 +0000 (09:14 +0000)]
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 days agogclient: Add '--no-bootstrap' sync option.
e.hakkinen@samsung.com [Wed, 8 Apr 2015 08:00:37 +0000 (08:00 +0000)]
gclient: Add '--no-bootstrap' sync option.

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

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

10 days agoFix 'gsutil' self-discovery.
dnj@chromium.org [Wed, 8 Apr 2015 01:54:09 +0000 (01:54 +0000)]
Fix 'gsutil' self-discovery.

Use 'realpath' instead of 'abspath' for self-discovery. This fixes an
issue where 'gsutil' cannot find its dependencies when it is referenced
through a symbolic link.

Specifically, the symlink was: /b/scripts => /b/build/scripts
'gsutil' was called as:
/b/scripts/slave/../../../depot_tools/third_party/gsutil/gsutil

Because '/b/scripts/slave' resolves to '/b/build/scripts/slave', the three
parent directory operators actually resolve to '/b', but 'os.path.abspath'
blindly resolves them to '/'.

BUG=chromium:474442
TEST=live
  - Signed onto failing bot, made this change, 'gsutil' works.

R=hinoka@chromium.org

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

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

10 days agoRemove 'email', 'password' and 'private_key_file' properties of Rietveld class.
vadimsh@chromium.org [Tue, 7 Apr 2015 22:44:08 +0000 (22:44 +0000)]
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 days agoupload.py: Fix immutable exception attribute.
dnj@chromium.org [Tue, 7 Apr 2015 19:33:07 +0000 (19:33 +0000)]
upload.py: Fix immutable exception attribute.

BUG=chromium:356813
TEST=local
  - Actually failed login, watched error message get printed.

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

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

10 days agoupload.py: Fix undefined variable bug.
dnj@google.com [Tue, 7 Apr 2015 19:02:53 +0000 (19:02 +0000)]
upload.py: Fix undefined variable bug.

BUG=chromium:356813
TEST=None
R=vadimsh@chromium.org, stip@chromium.org

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

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

10 days agoTry internal authentication URL if external fails.
dnj@chromium.org [Tue, 7 Apr 2015 17:59:05 +0000 (17:59 +0000)]
Try internal authentication URL if external fails.

BUG=chromium:356813
TEST=local
  - Deleted cookies file, ran without patch, 404.
  - Deleted cookies file, ran on internal network, works!

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

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

10 days agoAutomatically upgrade '_' to '-' when finding the right command.
maruel@chromium.org [Tue, 7 Apr 2015 17:19:35 +0000 (17:19 +0000)]
Automatically upgrade '_' to '-' when finding the right command.

This doesn't change the automatic command finder, so it really only helps
increase match hit rate in case of low confidence level delta between the 2 top
hits. For example, given commands 'set-commit' and 'dcommit', a user typing
'set_commit' would hit:
- 'set-commit': 90%
- 'dcommit': 70.5%

Since subcommand.py uses a 30% minimum confidence level between the two top hit
to automatically select a command, it will err on the side of safety and will
abort instead of selecting 'set-commit'.

This change fixes this specific case but won't trigger on partial matches, e.g.
'set_commi' for 'set-commit'.

R=stip@chromium.org
BUG=

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

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

10 days agoAdd ability to CQ dry run patchsets during "git cl upload".
rmistry@google.com [Tue, 7 Apr 2015 11:15:01 +0000 (11:15 +0000)]
Add ability to CQ dry run patchsets during "git cl upload".

The corresponding Rietveld change is here: https://codereview.chromium.org/1054683003/

BUG=chromium:472690

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

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

11 days agoAdded OAuth2 support in depot_tools
sheyang@google.com [Tue, 7 Apr 2015 02:23:34 +0000 (02:23 +0000)]
Added OAuth2 support in depot_tools

BUG=356813
R=nodir@chromium.org, vadimsh@chromium.org

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

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

2 weeks agoDisallow applying patches when git tree is dirty
wychen@chromium.org [Fri, 3 Apr 2015 21:04:49 +0000 (21:04 +0000)]
Disallow applying patches when git tree is dirty

This allows proper clean-up after failing to apply a patch. Therefore,
if "git cl diff" ends up having conflict, it could be cleaned up.

BUG=438362

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

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

2 weeks agoIn upload_to_google_storage, pass -z argument through to gsutil.
pasko@chromium.org [Fri, 3 Apr 2015 14:14:18 +0000 (14:14 +0000)]
In upload_to_google_storage, pass -z argument through to gsutil.

Also fix some latent bugs in the unit tests.

(cherry-picked by pasko@ from https://codereview.chromium.org/1048103002/)

BUG=467005

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

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

2 weeks agoIn "git cl description", skip updating when unchanged
wychen@chromium.org [Fri, 3 Apr 2015 06:51:44 +0000 (06:51 +0000)]
In "git cl description", skip updating when unchanged

BUG=473423

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

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

2 weeks agoUnify style of subcommand docstrings in git-cl
wychen@chromium.org [Fri, 3 Apr 2015 00:49:15 +0000 (00:49 +0000)]
Unify style of subcommand docstrings in git-cl

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

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

2 weeks agoEnable help generation for some git-cl subcommands
wychen@chromium.org [Thu, 2 Apr 2015 22:26:55 +0000 (22:26 +0000)]
Enable help generation for some git-cl subcommands

The subcommends "description" and "diff" in git-cl could not print the
help message even if --help was provided.

BUG= 473406

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

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

2 weeks agoFormalizes support for '-' in command names.
maruel@chromium.org [Thu, 2 Apr 2015 19:56:58 +0000 (19:56 +0000)]
Formalizes support for '-' in command names.

This officially drops support for '_' in command names, which is ugly as hell.
'_' was very rarely used so it shouldn't affect too much users.

Refactor the code to be more readable.

R=stip@chromium.org
BUG=

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

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

2 weeks agoNormalizes OWNERS and WATCHLISTS.
maruel@chromium.org [Mon, 30 Mar 2015 20:09:43 +0000 (20:09 +0000)]
Normalizes OWNERS and WATCHLISTS.

Removes cmp-cc@chromium.org from WATCHLISTS, removes *@google.com from OWNERS.
Remove szager@ from OWNERS.

R=iannucci@chromium.org
BUG=

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

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

3 weeks agoRemove 150% hard line length limit for long URLs.
dtu@chromium.org [Fri, 27 Mar 2015 22:22:07 +0000 (22:22 +0000)]
Remove 150% hard line length limit for long URLs.

BUG=

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

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

3 weeks agoAdjust file name blacklist in patch.py
phajdan.jr@chromium.org [Fri, 27 Mar 2015 15:21:53 +0000 (15:21 +0000)]
Adjust file name blacklist in patch.py

- allow the percent sign ('%')
- disallow characters from Windows blacklist https://msdn.microsoft.com/en-us/library/windows/desktop/aa365247.aspx#naming_conventions

BUG=467152

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

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

3 weeks agogit map-branches: add --show-subject
borenet@google.com [Thu, 26 Mar 2015 14:10:06 +0000 (14:10 +0000)]
git map-branches: add --show-subject

BUG=

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

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

3 weeks agoFine tune const NSClass* presubmit check
dominik.rottsches@intel.com [Wed, 25 Mar 2015 07:36:05 +0000 (07:36 +0000)]
Fine tune const NSClass* presubmit check

Blink CL https://codereview.chromium.org/879533003/ defines own
casts to convert between bridged types. The cast helpers in base
cannot be used in Blink. Fine tune the presubmit check to allow
for those by adding a negative look behind for reinterpret_cast.

BUG=

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

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

3 weeks agoSwitch WebRTC recipe to Git.
kjellander@chromium.org [Tue, 24 Mar 2015 14:08:44 +0000 (14:08 +0000)]
Switch WebRTC recipe to Git.

BUG=412012

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

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

3 weeks agoWebRTC fetch recipe: Always sync branch heads.
kjellander@chromium.org [Mon, 23 Mar 2015 13:30:03 +0000 (13:30 +0000)]
WebRTC fetch recipe: Always sync branch heads.

This will make gclient download all the remote branches of
the WebRTC Git repo when the 'fetch webrtc' recipe runs.
This will result in a new fetch line in the .git/config for
branch-heads, like this:
[remote "origin"]
  url = https://chromium.googlesource.com/external/webrtc.git
  fetch = +refs/heads/*:refs/remotes/origin/*
  fetch = +refs/branch-heads/*:refs/remotes/branch-heads/*

In order to get the same setup for an existing checkout, do:
gclient sync --with_branch_heads
git fetch origin

BUG=437776
TESTED=Ran 'fetch webrtc' and 'fetch webrtc_ios' and verified
the remote branches were available with 'git branch --remotes'

R=jochen@chromium.org

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

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

4 weeks agogit try -t support for Gerrit
nodir@chromium.org [Thu, 19 Mar 2015 16:37:01 +0000 (16:37 +0000)]
git try -t support for Gerrit

If testfilter parameter is passed, put it in to the gerrit tryjob
as a property. Later it will be processed by GerritPoller on Buildbot
master.

R=victorhsieh@chromium.org
BUG=468075

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

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

4 weeks agomy_activity.py: Add WebRTC code review and Google code site.
kjellander@chromium.org [Mon, 16 Mar 2015 10:12:22 +0000 (10:12 +0000)]
my_activity.py: Add WebRTC code review and Google code site.

BUG=webrtc:3884
TESTED=my_activity.py --auth
R=jochen@chromium.org

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

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

5 weeks agoFix CheckPatchFormatted message for subdirectories
enne@chromium.org [Fri, 13 Mar 2015 18:56:54 +0000 (18:56 +0000)]
Fix CheckPatchFormatted message for subdirectories

Thanks to tfarina for the code suggestion.

BUG=443718

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

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

5 weeks agoMake git-map-branches -vvv show CL status colors.
calamity@chromium.org [Thu, 12 Mar 2015 00:44:17 +0000 (00:44 +0000)]
Make git-map-branches -vvv show CL status colors.

This CL makes git-map-branches show CL status colors like git cl status
when -vvv is used. Statuses are fetched in parallel for speed.

BUG=379849

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

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

6 weeks agoAdded nodir to OWNERS
nodir@chromium.org [Fri, 6 Mar 2015 06:53:39 +0000 (06:53 +0000)]
Added nodir to OWNERS

R=sheyang@chromium.org, vadimsh@chromium.org
BUG=

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

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

6 weeks agogit_cl: Add reverse issue lookup.
dnj@chromium.org [Tue, 3 Mar 2015 17:22:28 +0000 (17:22 +0000)]
git_cl: Add reverse issue lookup.

Add the ability to lookup the branch(es) corresponding to a specific
issue. This helps keep track of issues when switching between multiple
branches.

BUG=None
TEST=None

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

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

6 weeks agoStop defaulting unrecognized branches to master except for handful of special refs.
rmistry@google.com [Tue, 3 Mar 2015 12:48:06 +0000 (12:48 +0000)]
Stop defaulting unrecognized branches to master except for handful of special refs.

Context:
In https://codereview.chromium.org/781523002/ I added the ability for target_ref to be set to any branch name. Eg: For Skia a ref of 'refs/remotes/origin/chrome/m42' would be correctly set to 'refs/heads/chrome/m42'.

But in https://codereview.chromium.org/822503005/ this was changed to treat any branch that did not start with 'refs/remotes/branch-heads' or 'refs/remotes/origin/refs' to be 'refs/remotes/origin/master'.
This makes it very chromium specific, there are plenty of other projects that use depot_tools that does not work like this.
For Skia 'refs/remotes/origin/chrome/m42' would now change to 'refs/remotes/origin/master' which is wrong.

The default behavior should be to preserve the original ref not to override it to master.

I handled 'lkgr' and 'lkcr' as special cases in this CL because many developers track it and would like it to land in master by default.

BUG=chromium:463109
NOPRESUBMIT=true

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

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

6 weeks agoFix the argument passed to main() in clang_format.py
tfarina@chromium.org [Sat, 28 Feb 2015 19:20:22 +0000 (19:20 +0000)]
Fix the argument passed to main() in clang_format.py

Passing arg[1] rather than argv[1:] is causing the following with
Python 2.7.3.

Traceback (most recent call last):
File "/home/tfarina/depot_tools/clang_format.py", line 70, in
<module>
sys.exit(main(sys.argv[1]))
File "/home/tfarina/depot_tools/clang_format.py", line 65,
in main
return subprocess.call([tool] + args)
TypeError: can only concatenate list (not "str") to list
No output from clang-format (crashed?).
Please report to bugs.llvm.org.

This started to happening after
http://src.chromium.org/viewvc/chrome?view=rev&revision=294250

BUG=None
TEST=try to format a c++ file using clang-format
TBR=sbc@chromium.org,maruel@chromium.org

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

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

7 weeks agoHandle KeyboardInterrupt consistently in python scripts
sbc@chromium.org [Thu, 26 Feb 2015 18:28:43 +0000 (18:28 +0000)]
Handle KeyboardInterrupt consistently in python scripts

Handle KeyboardInterrupt gracefully rather the printing a
backtrace. Most users of these tools don't expect a
backtrace when then hit Ctrl-C.

Also, fix a few other inconsistencies found in the python
startup code of these different scripts:
- always call main function 'main' (rather than 'Main')
- always return 0 from main function
- if main takes args never include argv[0]

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

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

7 weeks agoAdd ability to specify and run post upload hooks.
rmistry@google.com [Thu, 26 Feb 2015 14:03:30 +0000 (14:03 +0000)]
Add ability to specify and run post upload hooks.

Motivation: There are a few things we want to do in Skia infrastructure that is not possible to do without this functionality.
Eg1: If there is a change made to Skia's markdown then automatically include a 'DOCS_PREVIEW_URL=https://skia.org?cl=1234' in the CL's description.
Eg2: Automatically add 'NOTRY=true' for changes impacting things that do not need trybot runs.
Eg3: Include CL specific links to skia's perf (https://perf.skia.org/) and correctness (https://gold.skia.org/) servers.

BUG=chromium:462208

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

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

7 weeks agoLet clients pass the verbose level they want to cpplint.
tfarina@chromium.org [Wed, 25 Feb 2015 03:23:11 +0000 (03:23 +0000)]
Let clients pass the verbose level they want to cpplint.

This came in this CL review https://codereview.chromium.org/947983003/

BUG=None
R=dpranke@chromium.org

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

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

7 weeks agoRun dartfmt when invoking git cl format.
erg@chromium.org [Mon, 23 Feb 2015 20:30:08 +0000 (20:30 +0000)]
Run dartfmt when invoking git cl format.

If the repository has third_party/dart-sdk/ unpacked, use that to
format dart files modified in the current patch.

BUG=459376
R=maruel@chromium.org, zra@google.com

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

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

8 weeks agogclient: Add '--auto_rebase' sync option.
dnj@chromium.org [Fri, 20 Feb 2015 21:25:57 +0000 (21:25 +0000)]
gclient: Add '--auto_rebase' sync option.

This adds the '--auto_rebase' sync option, enabling parallel updates to
automatically rebase local Git branches during sync.

BUG=None
TEST=local

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

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

8 weeks agoRemove the Singleton<T> presubmit check from presubmit_canned_checks.py
glider@chromium.org [Thu, 19 Feb 2015 16:33:33 +0000 (16:33 +0000)]
Remove the Singleton<T> presubmit check from presubmit_canned_checks.py
This check is specific to Chromium codebase, there's no point in having it in depot_tools.

BUG=None
R=maruel@chromium.org

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

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

8 weeks agoFix a bug in setting maxtries
phajdan.jr@chromium.org [Thu, 19 Feb 2015 11:42:45 +0000 (11:42 +0000)]
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

8 weeks agoMake maxtries for Rietveld configurable
phajdan.jr@chromium.org [Thu, 19 Feb 2015 11:29:00 +0000 (11:29 +0000)]
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

8 weeks agoAdd hinoka@ to depot_tools OWNERS
hinoka@chromium.org [Tue, 17 Feb 2015 21:30:28 +0000 (21:30 +0000)]
Add hinoka@ to depot_tools OWNERS

BUG=

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

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

8 weeks ago[download_from_google_storage] Don't list ALL objects to check for ACLs
primiano@chromium.org [Tue, 17 Feb 2015 12:33:35 +0000 (12:33 +0000)]
[download_from_google_storage] Don't list ALL objects to check for ACLs

Currently check_bucket_permissions() in download_from_google_storage.py
performs a gsutil ls gs://bucket to determine whether the user has access
to the bucket or not.
This can be an EXTREMELY expensive operation (~minutes) if the bucket in
question has a lot of objects in the root (real case: chrome-telemetry).
It is worth noting that check_bucket_permissions() is not called just for
uploads but also for downloads, hence this is slowing down all invocations
of gclient sync on users and bots machine.
Removing the check_bucket_permissions() and let gsutil fail with an
Unauthorized error message if ACLs are not met.

BUG=458059

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

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

8 weeks agoReland "Make gclient ready for the Blink (DEPS to main project)"
primiano@chromium.org [Tue, 17 Feb 2015 11:15:40 +0000 (11:15 +0000)]
Reland "Make gclient ready for the Blink (DEPS to main project)"

Reland crrev.com/743083002, which was reverted in crrev.com/796053002
due to some test flakiness, probably related with an old version of Git on
the bots. Relanding now that the infra has been updated to Trusty (plus
adding some de-flake precautions).

Original CL Description:
Make gclient ready for the Blink (DEPS to main project) transition

This CL makes gclient understand correctly whether a git project is
being moved from DEPS to an upper project and vice-versa.
The driving use case for this is the upcoming Blink merge, where
third_party/Webkit will be removed from DEPS (and .gitignore) and will
become part of the main project.

At present state, gclient leaves the .git folder around when a project
is removed from DEPS, and that causes many problems.

Furthermore this CL solves the performance problem of bisecting across
the merge point. The subproject's (Blink) .git/ folder is moved to a
backup location (in the main checkout root) and is restored when moving
backwards, avoiding a re-fetch when bisecting across the merge point.

BUG=431469

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

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

2 months agoAdd a --squash option to Gerrit uploads.
bauerb@chromium.org [Mon, 16 Feb 2015 10:45:39 +0000 (10:45 +0000)]
Add a --squash option to Gerrit uploads.

This makes uploading to Gerrit with `git cl` more similar to uploading to Rietveld, by uploading a squashed commit containing the diff to the newest common ancestor.

Uploaded commits are stored in refs/heads/git_cl_uploads/<branch> (and their commit message is used for the squash commit), which allows amending the commit message to change it on the uploaded CL, and looking through the reflog to find old uploaded versions.

BUG=none

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

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

2 months agoCreate brillo wrapper command.
dgarrett@chromium.org [Wed, 11 Feb 2015 00:58:10 +0000 (00:58 +0000)]
Create brillo wrapper command.

Add support for 'brillo' as an entry command distinct from 'cros'. It
still does exactly the same thing... for now.

BUG=brillo:162
TEST=Ran "brillo help" successfully.

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

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

2 months agoFix infra and infra_internal fetch recipes.
iannucci@chromium.org [Thu, 5 Feb 2015 01:56:14 +0000 (01:56 +0000)]
Fix infra and infra_internal fetch recipes.

expect_tests and testing_support are now pulled in via DEPS.

R=cmp@chromium.org, pgervais@chromium.org
BUG=

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

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

2 months agoThe original assertions trigger pylint unreachable warnings, and they are replaced...
wychen@chromium.org [Tue, 3 Feb 2015 21:46:52 +0000 (21:46 +0000)]
The original assertions trigger pylint unreachable warnings, and they are replaced by fail() calls.

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

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

2 months agoAllow branch name to be the same as directory name for "git cl diff"
wychen@chromium.org [Tue, 3 Feb 2015 02:11:29 +0000 (02:11 +0000)]
Allow branch name to be the same as directory name for "git cl diff"

Remove the ambiguity between revision and filename (or directory name)
when using command "git cl diff".

BUG=454032

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

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

2 months agomy_activity.py: Add brillo bug tracker.
deymo@chromium.org [Mon, 2 Feb 2015 22:19:46 +0000 (22:19 +0000)]
my_activity.py: Add brillo bug tracker.

BUG=brillo:90
TEST=./my_activity.py shows brillo bugs.

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

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

2 months agoRemove redundant checks.
cmp@chromium.org [Mon, 2 Feb 2015 22:09:46 +0000 (22:09 +0000)]
Remove redundant checks.

R=maruel@chromium.org

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

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

2 months agoSet default Windows git to 1.9.5-chromium.6 build.
mmoss@chromium.org [Mon, 2 Feb 2015 20:37:38 +0000 (20:37 +0000)]
Set default Windows git to 1.9.5-chromium.6 build.

R=iannucci@chromium.org, iannucci@google.com
BUG=444470

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

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

2 months agoBump bleeding edge git to 1.9.5-chromium.6 build.
scottmg@chromium.org [Fri, 30 Jan 2015 22:47:41 +0000 (22:47 +0000)]
Bump bleeding edge git to 1.9.5-chromium.6 build.

BUG=444470
R=scottmg@chromium.org, iannucci@google.com

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

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

2 months agoSupport --target-branch option to git-cl upload for Rietveld
wittman@chromium.org [Mon, 26 Jan 2015 20:15:50 +0000 (20:15 +0000)]
Support --target-branch option to git-cl upload for Rietveld

This is similar to the Gerrit behavior in that we default to master,
unless the remote upstream is a branch head.

BUG=435702

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

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

2 months agopylint: upgrade to 1.4.1
vapier@chromium.org [Mon, 26 Jan 2015 20:04:40 +0000 (20:04 +0000)]
pylint: upgrade to 1.4.1

This is largely a bugfix release, so should be much easier to transition.

BUG=chromium:431514
TEST=ran on some code bases and checked output

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

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

2 months agoHook sys.stdio directly to the gsutil subprocess for the gsutil call
hinoka@chromium.org [Sat, 24 Jan 2015 00:55:46 +0000 (00:55 +0000)]
Hook sys.stdio directly to the gsutil subprocess for the gsutil call

So that gsutil.py config works.

I would've preferred the execv solution, but apparently that didn't work on Windows :(

BUG=451551

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

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

2 months agoConvenience git extension for converting a chromium git commit number to a git hash.
szager@chromium.org [Fri, 23 Jan 2015 00:56:04 +0000 (00:56 +0000)]
Convenience git extension for converting a chromium git commit number to a git hash.

Context:

https://groups.google.com/a/chromium.org/d/msg/chromium-dev/IcZ3C_ooKUM/ux559wpM_9cJ

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

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

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

2 months agoRemove testfilter support from "git cl"
phajdan.jr@chromium.org [Thu, 22 Jan 2015 10:37:09 +0000 (10:37 +0000)]
Remove testfilter support from "git cl"

BUG=432498

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

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

3 months agoRemove the 'author_counts_as_owner' option from CheckOwners().
dpranke@chromium.org [Fri, 16 Jan 2015 22:38:38 +0000 (22:38 +0000)]
Remove the 'author_counts_as_owner' option from CheckOwners().

Way back in r185294 I added the ability to request that, when
checking owners, the patch author *should not* count (normally it does
count). We did this in order to be able to mimic the review processes
of WebKit in the Blink repo.

However, we ended up never using this feature, so I'm finally getting
around to deleting it.

R=maruel@chromium.org
BUG=none

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

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

3 months agoSupport optional BOTO specification with --no_auth.
mmoss@chromium.org [Thu, 15 Jan 2015 19:00:49 +0000 (19:00 +0000)]
Support optional BOTO specification with --no_auth.

This prevents --no_auth from always clearing BOTO_CONFIG, since there
are times when a BOTO is needed for other things than just auth info
(e.g. proxy settings).

BUG=443523
R=hinoka@chromium.org, szager@chromium.org

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

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

3 months agoAdd checks to GitSanityChecks (upstream branch or current branch can be None)
sbc@chromium.org [Wed, 14 Jan 2015 21:18:12 +0000 (21:18 +0000)]
Add checks to GitSanityChecks (upstream branch or current branch can be None)

I've run in the exceptions a few times when doing
'git cl presubmit' or 'git cl lint' from a detached
HEAD state (not uncommon when using 'git rebase-update')

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

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

3 months agoUpdate dpranke's entry in the WATCHLISTS.
dpranke@chromium.org [Tue, 13 Jan 2015 23:45:00 +0000 (23:45 +0000)]
Update dpranke's entry in the WATCHLISTS.

TBR=iannucci@chromium.org
BUG=

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

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

3 months agoFixed ``smart'' quotes in code block.
dnj@chromium.org [Tue, 13 Jan 2015 23:38:11 +0000 (23:38 +0000)]
Fixed ``smart'' quotes in code block.

This document generation round also includes additional generated content that
was not checked in from previous commits.

BUG=chromium:440844
TEST=local
  - Loaded HTML page in local browser, confirmed quotes were correct.

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

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

3 months agoSwitching nacl git recipe for fetch.
bradnelson@google.com [Sat, 10 Jan 2015 01:07:13 +0000 (01:07 +0000)]
Switching nacl git recipe for fetch.

BUG=None
TEST=local
R=iannucci@chromium.org

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

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

3 months agoPRESUBMIT: Ignore external_bin/.
raphael.kubo.da.costa@intel.com [Thu, 8 Jan 2015 22:28:34 +0000 (22:28 +0000)]
PRESUBMIT: Ignore external_bin/.

This is created for the external gsutil since r293320, and was creating
needless churn in presubmit tests when it is present.

R=pgervais@chromium.org,hinoka@google.com
BUG=434422

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

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

3 months agoAdd cross-platform resilience to gclient CPU count probe.
dnj@chromium.org [Wed, 7 Jan 2015 19:54:57 +0000 (19:54 +0000)]
Add cross-platform resilience to gclient CPU count probe.

BUG=chromium:444597

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

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

3 months agoAdded error check to git cl that we are on a branch when we try to upload.
luqui@chromium.org [Wed, 7 Jan 2015 00:29:29 +0000 (00:29 +0000)]
Added error check to git cl that we are on a branch when we try to upload.

BUG=443264

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

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

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

3 months agoAdd category property to tryjob
sheyang@chromium.org [Tue, 6 Jan 2015 00:42:39 +0000 (00:42 +0000)]
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

3 months agoFix gsutil execution on Windows.
djacques@chromium.org [Mon, 29 Dec 2014 19:50:00 +0000 (19:50 +0000)]
Fix gsutil execution on Windows.

5498b95831de0711fda19f2aabac4645ffb6cc78 runs gsutil using 'os.execv',
which, on Windows, apparently causes it to return before completion.

Also add verbosity to '7z' failures on toolchain downloading.

BUG=chromium:445425
TEST=bot
  - Ran on bot, this fix solves the problem that we were seeing.

R=pgervais@chromium.org, sergeyberezin@chromium.org

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

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

3 months agoFix for print(file=something)
loislo@chromium.org [Thu, 25 Dec 2014 15:28:22 +0000 (15:28 +0000)]
Fix for print(file=something)

BUG=
TBR= dpranke@chromium.org, enne@chromium.org, apavlov@chromium.org

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

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

3 months agoSpeculative fix for build on windows build bots.
loislo@chromium.org [Thu, 25 Dec 2014 13:48:37 +0000 (13:48 +0000)]
Speculative fix for build on windows build bots.

The root of problem is a _cache_temp file.
git_cache expected that it is a folder.
So rmtree failed to remove it.

BUG=
TBR= dpranke@chromium.org, enne@chromium.org
NOTRY=true

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

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

3 months agoMade gsutil.py truly transparent
pgervais@chromium.org [Tue, 23 Dec 2014 23:40:29 +0000 (23:40 +0000)]
Made gsutil.py truly transparent

The previous version was modifying gsutil output by adding a
stacktrace upon non-zero return code, which broke existing code.

BUG=400871
R=hinoka@chromium.org

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

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

3 months agoSwitch default windows git version to 1.9.5.
iannucci@chromium.org [Sat, 20 Dec 2014 02:00:52 +0000 (02:00 +0000)]
Switch default windows git version to 1.9.5.

R=pgervais@chromium.org, agable@chromium.org, friedman@chromium.org
BUG=

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

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

3 months agoSwitch the remaining third_party gsutil references to gsutil.py
hinoka@chromium.org [Sat, 20 Dec 2014 01:47:31 +0000 (01:47 +0000)]
Switch the remaining third_party gsutil references to gsutil.py

BUG=
R=pgervais@chromium.org

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

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

3 months agoGreatly clean up depot_tools handling of git binaries, add bleeding edge support...
iannucci@chromium.org [Sat, 20 Dec 2014 01:42:44 +0000 (01:42 +0000)]
Greatly clean up depot_tools handling of git binaries, add bleeding edge support for 1.9.5

R=agable@chromium.org, friedman@google.com, maruel@chromium.org, pgervais@chromium.org, friedman@chromium.org, mmoss@chromium.org, szager@chromium.org, vadimsh@chromium.org
BUG=

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

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

3 months agopresubmit_unittest: Fix pylint errors.
raphael.kubo.da.costa@intel.com [Fri, 19 Dec 2014 17:04:15 +0000 (17:04 +0000)]
presubmit_unittest: Fix pylint errors.

The recent pylint 1.3.1 and 1.4.0 upgrades have caused some new errors
to be reported for presubmit_unittest:

* presubmit_support.InputApi.AffectedFiles() expectes a parameter called
  |include_deletes|, not |include_deleted|.

* The mock AffectedFiles() implementation in
  CannedChecksUnittest.testCannedCheckChangeHasNoTabs() had its
  signature updated to match the one in presubmit_support.InputApi,
  otherwise pylint would (erroneously) consider that this mock
  implementation was used in all other AffectedFiles() invocations in
  CannedChecksUnittest and complain that some parameters were missing.
  It makes more sense to do this than disable the check and miss real
  problems in the future.

R=maruel@chromium.org, iannucci@chromium.org, pgervais@chromium.org
BUG=443232

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

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

3 months agoAllow to skip revision check in roll-dep.
machenbach@chromium.org [Thu, 18 Dec 2014 15:42:43 +0000 (15:42 +0000)]
Allow to skip revision check in roll-dep.

Without this change, roll-dep requires dependencies to be
checked out and up to date in order to roll a newer revision.

This change allows to use roll-dep with less checking and
makes the script user responsible to verify the correctness
of the deps path and git hash.

This eases writing a deps roller that updates multiple deps
including a variety of os deps, which might not be checked
out on the host of the deps roller.

BUG=438705, 437462
R=jochen@chromium.org

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

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

3 months agogsutil: Use urllib2 instead of urllib.
primiano@chromium.org [Thu, 18 Dec 2014 11:12:34 +0000 (11:12 +0000)]
gsutil: Use urllib2 instead of urllib.

This is similar to r247914 and r149742: urllib does not work with SSL
connections behind proxies, we need to use urllib2 instead. Doing this
should allow people behind proxies to download gsutils 4.7 after
r293413.

(Setting NOTRY here to be able to land the issue, otherwise the CQ fails when running some presubmit checks, see crbug.com/443232)

R=maruel@chromium.org, hinoka@chromium.org, pgervais@chromium.org, primiano@chromium.org
NOTRY=true

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

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

3 months agoArgs fix for gsutil.py
hinoka@chromium.org [Thu, 18 Dec 2014 01:06:20 +0000 (01:06 +0000)]
Args fix for gsutil.py

"--" is the hard keyword to separate gsutil commands from gsutil.py commands.

BUG=
R=dnj@chromium.org

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

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

3 months agoFix setting the executable bit in download_from_google_storage.
dpranke@chromium.org [Wed, 17 Dec 2014 23:47:23 +0000 (23:47 +0000)]
Fix setting the executable bit in download_from_google_storage.

The new GSUtil (or gs protocol, who knows) strips off the redundent x-goog-meta
string from the metadata key.  This CL compensates for that.

Also since we're on 4.7, we can use the faster gsutil stat instead of gsutil ls -L.

BUG=
TEST=ran download_from_google_storage against compiler_proxy.sha, works
NOTREECHECKS=true
NOTRY=true
R=dnj@chromium.org, pgervais@chromium.org

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

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

4 months agoUse gsutil.py for download_from_google_storage instead of the builtin one
hinoka@chromium.org [Wed, 17 Dec 2014 02:17:14 +0000 (02:17 +0000)]
Use gsutil.py for download_from_google_storage instead of the builtin one

This pins gsutil to a vanilla 4.7 instead of the weird custom 3.4 we have in depot_tools

BUG=
R=pgervais@chromium.org

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

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

4 months agoUpdate documentation to accurately reflect the new URL of depot_tools.
erikchen@chromium.org [Tue, 16 Dec 2014 00:48:01 +0000 (00:48 +0000)]
Update documentation to accurately reflect the new URL of depot_tools.

BUG=

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

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

4 months agoUpdates the depot_tools repository URL in the docs.
charliea@google.com [Mon, 15 Dec 2014 20:01:52 +0000 (20:01 +0000)]
Updates the depot_tools repository URL in the docs.

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

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

4 months agoUse grep -e --force instead of grep "--force" since apparently the latter doesn't...
pkasting@chromium.org [Fri, 12 Dec 2014 19:26:49 +0000 (19:26 +0000)]
Use grep -e --force instead of grep "--force" since apparently the latter doesn't work properly in all cases.

BUG=441072
TEST=No errors from gclient :/

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

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

4 months agoAdd lint_filters parameter to CheckChangeLintsClean function.
tfarina@chromium.org [Fri, 12 Dec 2014 00:03:49 +0000 (00:03 +0000)]
Add lint_filters parameter to CheckChangeLintsClean function.

The idea here is that when one of the filters are cleaned up in Chromium,
they should not be filtered out, otherwise we won't catch them in
the presubmit step.

See for example -> https://codereview.chromium.org/788493002/

BUG=None
R=agable@chromium.org, dpranke@chromium.org

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

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

4 months agoAdd pending prefix to the target_ref if it is specified
rmistry@google.com [Thu, 11 Dec 2014 23:41:21 +0000 (23:41 +0000)]
Add pending prefix to the target_ref if it is specified

BUG=435702

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

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

4 months agopylint: upgrade to 1.4.0
vapier@chromium.org [Thu, 11 Dec 2014 21:40:52 +0000 (21:40 +0000)]
pylint: upgrade to 1.4.0

This is largely a bugfix release, so should be much easier to transition.

BUG=chromium:431514
TEST=ran on some code bases and checked output

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

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

4 months agoRevert of Make gclient ready for the Blink (DEPS to main project) transition (patchse...
primiano@chromium.org [Thu, 11 Dec 2014 17:25:28 +0000 (17:25 +0000)]
Revert of Make gclient ready for the Blink (DEPS to main project) transition (patchset #6 id:180001 of https://codereview.chromium.org/743083002/)

Reason for revert:
The test intoruced is flake (see crrev.com/753543006/).
Need to look into that with more patience as it reproduces only on precise.

Original issue's description:
> Make gclient ready for the Blink (DEPS to main project) transition
>
> This CL makes gclient understand correctly whether a git project is
> being moved from DEPS to an upper project and vice-versa.
> The driving use case for this is the upcoming Blink merge, where
> third_party/Webkit will be removed from DEPS (and .gitignore) and will
> become part of the main project.
>
> At present state, gclient leaves the .git folder around when a project
> is removed from DEPS, and that causes many problems.
>
> Furthermore this CL solves the performance problem of bisecting across
> the merge point. The subproject's (Blink) .git/ folder is moved to a
> backup location (in the main checkout root) and is restored when moving
> backwards, avoiding a re-fetch when bisecting across the merge point.
>
> BUG=431469
>
> Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=293329

TBR=iannucci@chromium.org,maruel@chromium.org,jochen@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=431469

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

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