After switching to a pure git workflow, most of the patchset we upload
to rietveld have git metadata. Apparently, however, the scripts here in
depot tools, which are used by the CQ and trybots, are ignoring that
and applying patches without taking advantage of git metadata.
In practice this causes people to rebase and reupload patches more than
necessary, even in the cases when it could be handled automatically by
means of a three way merge.
This change updates the GitCheckout class of depot_tools to use that.
BUG=416003
Review URL: https://codereview.chromium.org/577203002
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@292087 0039d316-1c4b-4281-b951-d872f2087c98
This CL fixes some issues with map-branches:
* Branches with no upstream were not being shown.
* -vv from a detached HEAD would crash
* GONE upstreams would crash when git cleaned up in a way that caused
hash_one to fail
This CL also adds a blue coloring to branches that start with
'branch-heads' for Chromium release branches.
BUG=416530
Review URL: https://codereview.chromium.org/576423002
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@292083 0039d316-1c4b-4281-b951-d872f2087c98
Then this was changed to CheckCallAndFilter it broke
the expectations of code in the buildbot tree:
scripts/slave/chromium_commands.py:extract_revisions
Alternatively we could update the expectations
of chromium_commands.py.
BUG= https://code.google.com/p/chromium/issues/detail?id=412818
Review URL: https://codereview.chromium.org/587253005
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@292072 0039d316-1c4b-4281-b951-d872f2087c98
According to Python's doc (
https://docs.python.org/2/library/subprocess.html#subprocess.check_output
):
if check_output raises exception CalledProcessError, the exception object
should contain stdout data as `output` attribute. Before this commit,
subprocess2.CalledProcessError had `output` always None, and used `stdout`
instead. This commit fixes this problem storing the same data in both `stdout`
and `output`.
BUG=NONE
Review URL: https://codereview.chromium.org/582933002
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@292036 0039d316-1c4b-4281-b951-d872f2087c98
This reverts commit 931b6c6a6c.
This was causing our try bots to fail on DEPS changes.
After applying the patch successfully, apply_issue.py tries to run gclient sync to get the updated DEPS, resulting in this error:
src (ERROR)
----------------------------------------
[0:00:00] Started.
----------------------------------------
Error:
____ src at origin/master
Your index contains uncommitted changes
Please commit, stash, or reset.
BUG=413326
TESTED=Manually: https://paste.googleplex.com/6375653263802368
Review URL: https://codereview.chromium.org/563873002
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@291932 0039d316-1c4b-4281-b951-d872f2087c98
Pulls the logic for computing an issue's "status" - has LGTM, is in
CQ, etc. - out of the "git cl status" command itself, so that other
tools can get the status of a Changelist.
BUG=379849
R=iannucci@chromium.org
Review URL: https://codereview.chromium.org/555973005
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@291928 0039d316-1c4b-4281-b951-d872f2087c98
This was done because a line ending with a '\' will not be printed properly.
Completely escape the string.
R=stip@chromium.org
BUG=
Review URL: https://codereview.chromium.org/557143002
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@291906 0039d316-1c4b-4281-b951-d872f2087c98
This is to support non-chrome repos in the bisect scripts.
R=hinoka@chromium.org, luqui@chromium.org
BUG=
Review URL: https://codereview.chromium.org/552403003
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@291895 0039d316-1c4b-4281-b951-d872f2087c98
Without --exit-code, diff-index always returns 0 and thus never throws
the exception for a dirty index.
R=iannucci@chromium.org
Review URL: https://codereview.chromium.org/548553003
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@291881 0039d316-1c4b-4281-b951-d872f2087c98
Because everyone needs humour.
Fix a small bug in subcommands.py with undocumented commands.
R=stip@chromium.org
BUG=
Review URL: https://codereview.chromium.org/554123003
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@291867 0039d316-1c4b-4281-b951-d872f2087c98
improvements.
* No longer crash on HEAD
* Always correctly highlight lines based on hash-matching-ness
* Only import git_cl if you want it (it can be slow)
* Print a message when NO branches are found (instead of blank output)
R=calamity@chromium.org, jsbell@chromium.org
BUG=410353
Review URL: https://codereview.chromium.org/554523003
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@291847 0039d316-1c4b-4281-b951-d872f2087c98
This CL prevents map-branches from loading the tracking status when
the -v flag is not supplied. This prevents the vanilla map-branches
from taking a potentially long time to retrieve the tracking status.
BUG=410137
Review URL: https://codereview.chromium.org/536793002
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@291846 0039d316-1c4b-4281-b951-d872f2087c98
For me, PATH was a unicode instead of a str for some reason, so things
failed with
D:\src\chromefetch\src>git cl format
Traceback (most recent call last):
File "d:\src\depot_tools\git_cl.py", line 2821, in <module>
sys.exit(main(sys.argv[1:]))
File "d:\src\depot_tools\git_cl.py", line 2807, in main
return dispatcher.execute(OptionParser(), argv)
File "d:\src\depot_tools\subcommand.py", line 245, in execute
return command(parser, args[1:])
File "d:\src\depot_tools\git_cl.py", line 2768, in CMDformat
stdout = RunCommand(cmd, stdin=diff_output, cwd=top_dir, env=env)
File "d:\src\depot_tools\git_cl.py", line 81, in RunCommand
return subprocess2.check_output(args, shell=False, **kwargs)
File "d:\src\depot_tools\subprocess2.py", line 515, in check_output
return check_call_out(args, stdout=PIPE, **kwargs)[0]
File "d:\src\depot_tools\subprocess2.py", line 475, in check_call_out
out, returncode = communicate(args, **kwargs)
File "d:\src\depot_tools\subprocess2.py", line 449, in communicate
proc = Popen(args, **kwargs)
File "d:\src\depot_tools\subprocess2.py", line 237, in __init__
super(Popen, self).__init__(args, **kwargs)
File "d:\src\depot_tools\python276_bin\lib\subprocess.py", line 709, in __init__
errread, errwrite)
File "d:\src\depot_tools\python276_bin\lib\subprocess.py", line 957, in _execute_child
startupinfo)
TypeError: environment can only contain strings
Sending crash report ...
args: ['d:\\src\\depot_tools\\git_cl.py', 'format']
cwd: D:\src\chromefetch\src
exception: environment can only contain strings
host: THAKIS1-W.ad.corp.google.com
stack: File "d:\src\depot_tools\git_cl.py", line 2821,
user: thakis
version: 2.7.6 (default, Nov 10 2013, 19:24:18)
This fixes the glitch.
Review URL: https://codereview.chromium.org/545333002
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@291825 0039d316-1c4b-4281-b951-d872f2087c98
In https://codereview.chromium.org/341533006/ a change
was made so that gn.py is not looking for the .gn file
to identify the root of the checkout. This breaks
GN functionality for projects that uses gclient but
have a top directory named something else than 'src'.
This change adds support for arbitrarily named primary (the first)
solutions in the .gclient file.
It also adds a check for the generated GN path so a friendly
error message can be printed if the GN executable cannot be found.
BUG=389883
TESTED=Various cases of Chromium, WebRTC and custom checkouts
with .gclient containing empty solution list, solution missing the
'name' key and so on.
Review URL: https://codereview.chromium.org/538393002
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@291819 0039d316-1c4b-4281-b951-d872f2087c98
So the original intention of moving it to a different directory to be deleted later
was to (1) save it for diagnosis (2) be a single inode swap rather than a long
rmtree delete.
1. No one is actually looking at these directories
2. The tmpdir sometimes end up on a different partition, so it ends up being
a copy + delete instead. Since we're not getting timeouts from that, its
probably actually better to just straight up delete it.
BUG=410727
Review URL: https://codereview.chromium.org/538993002
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@291818 0039d316-1c4b-4281-b951-d872f2087c98
This CL adds information to the git map-branches command. Invoking
it map-branches with -v, will show tracking status of branches and
invoking with -vv will additionally show the Rietveld URL and the
branch hash.
BUG=None
Review URL: https://codereview.chromium.org/509843002
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@291776 0039d316-1c4b-4281-b951-d872f2087c98
Updated 'git-number' to produce an error message if it's run without the
CHROME_HEADLESS (bot) environment variable. This is intended to alert developers
who may be incorrectly using this tool to get positioning information instead of
the commit position.
BUG=409917
TEST=local
- Ran with and without 'CHROME_HEADLESS'; observed the error message in the
'without' case.
R=iannucci@chromium.org
Review URL: https://codereview.chromium.org/534703002
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@291773 0039d316-1c4b-4281-b951-d872f2087c98
This conforms to the convention of using a single-line short description
followed by an empty line followed by a long description. Shortened the
revisions to more easily fit on one line.
BUG=408700
Review URL: https://codereview.chromium.org/513383002
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@291743 0039d316-1c4b-4281-b951-d872f2087c98
With the deletion of .DEPS.git, 'webkit_rev' became 'webkit_revision':
https://codereview.chromium.org/497313003
Without this change, gclient sync will not get the latest Blink commit.
Review URL: https://codereview.chromium.org/496443005
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@291716 0039d316-1c4b-4281-b951-d872f2087c98
Currently git-nav-downstream invokes 'git checkout' in a subprocess, but
exits without waiting for the checkout to complete. Instead wait for the
subprocess to complete.
BUG=376101
Review URL: https://codereview.chromium.org/509163002
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@291701 0039d316-1c4b-4281-b951-d872f2087c98
Also added a tiny bit of exponential backoff.
BUG=375479
Review URL: https://codereview.chromium.org/350433003
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@291682 0039d316-1c4b-4281-b951-d872f2087c98
This is breaking the ability to specify an alternate DEPS file, and do
things like sync release tags where DEPS is still from svn and we need
.DEPS.git to do a git checkout.
R=iannucci@chromium.org, szager@chromium.org
BUG=407049
Review URL: https://codereview.chromium.org/511533003
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@291665 0039d316-1c4b-4281-b951-d872f2087c98
Also reduce number of attempts and give up right away on ACL errors.
R=iannucci@chromium.org
BUG=407369,407470
Review URL: https://codereview.chromium.org/512493002
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@291656 0039d316-1c4b-4281-b951-d872f2087c98