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
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
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
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.orgCC=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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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