Over last two weeks of running tryjobs on CLs of others, I found
this very useful. This CL also simplifies code.
R=agable@chromium.org
Change-Id: I5c7ce0d311b1ca024b92227dbec54e5197205c62
Reviewed-on: https://chromium-review.googlesource.com/930742
Reviewed-by: Aaron Gable <agable@chromium.org>
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
The purpose of this CL is to remove confusion around whether or
not git-cl support the similarity flags when talking to Gerrit.
It does not. However, because Rietveld support has not been
fully ripped out of git-cl, this change does modify some of the
Rietveld-specific code to remove similarity support from everywhere.
Bug: 800902
Change-Id: I8703ed60d6889c7a36400b8a9f8f26de4669020a
Reviewed-on: https://chromium-review.googlesource.com/912389
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Commit-Queue: Aaron Gable <agable@chromium.org>
I don't know of any use-case where someone would want to
use git-cl-patch to pull a (e.g.) chromium change into
their (e.g.) v8 checkout.
Bug: 803918
Change-Id: Id53f1cc3ab97e623d0098bb366a573b18b54e91a
Reviewed-on: https://chromium-review.googlesource.com/876930
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Commit-Queue: Aaron Gable <agable@chromium.org>
Context:
https://bugs.chromium.org/p/chromium/issues/detail?id=800355#c22
Prepare git-cl-try to a new format of builders-map.appspot.com response
where each entry contains buckets, as opposed to masters.
Bug: 800355
Change-Id: I5a90c6c4860a7e1fca843067c477a272d782cba1
Reviewed-on: https://chromium-review.googlesource.com/885100
Commit-Queue: Nodir Turakulov <nodir@chromium.org>
Reviewed-by: Aaron Gable <agable@chromium.org>
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
The default description in the editor when you invoke "git cl upload"
includes recent commit descriptions, some blank lines and comments, and
"Bug: ". The upload script properly strips out the comments but was
leaving in the "Bug:" line. This leads to CLs with blank Bug: lines,
which is sloppy. It also means that if a user changes their mind and
closes the upload editor without adding any content... they would still
have a CL created.
This change removes the "Bug: " line if nothing has been added to it,
thus avoiding uploading a change with an empty description, and avoiding
having meaningless Bug: lines.
Change-Id: I18c2094e5712d31729899c0ebd0a52de97dc4e7f
Reviewed-on: https://chromium-review.googlesource.com/861920
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
This patch adds the standard issue option (-i/--issue) to
"git cl try" command.
This is useful for maintaining FlagExpectations with fyi bots.
Runtime-flag features often see new failures, and a good number
of tests are flaky. Maintainers can upload a CL and use cron to
run try jobs to collect multiple tests results to find new
failures and flaky tests.
Change-Id: I069593950023ddae814faf3074c33de4c98cb70e
Reviewed-on: https://chromium-review.googlesource.com/850792
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Commit-Queue: Koji Ishii <kojii@chromium.org>
git cl split previously had no way to find out what it would do before
it went ahead and uploaded CLs. Now you can use --dry-run to get it
to print info about each CL it would upload.
Change-Id: If2ac74a89b0a8b30d86819e16ece46f487b1e7c7
Reviewed-on: https://chromium-review.googlesource.com/821336
Reviewed-by: Aaron Gable <agable@chromium.org>
Commit-Queue: Chris Watkins <watk@chromium.org>
This includes a minor refactor so that some gclient_scm methods
can all share the same core.quotePath specifier.
R=iannucci
Bug: 792302
Change-Id: Iaadf190f5c0666787cf7c2ccda88d6dba9aace9b
Reviewed-on: https://chromium-review.googlesource.com/823131
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Commit-Queue: Aaron Gable <agable@chromium.org>
This is a reland of 9219d35688
The original was reverted due to a typo (core,quotePath instead
of core.quotePath). This version is fixed.
Original change's description:
> Use core.quotePath=false when git is listing files
>
> This prevents git from putting quotes around some file names
> (those that have astral-plane characters) and not around others.
>
> R=maruel
>
> Bug: 792302
>
> Change-Id: I3b6a6b36c4720116de811b40177b59aa25c263db
> Reviewed-on: https://chromium-review.googlesource.com/815454
> Commit-Queue: Aaron Gable <agable@chromium.org>
> Reviewed-by: Marc-Antoine Ruel <maruel@chromium.org>
Bug: 792302
Recipe-Nontrivial-Roll: build
Recipe-Nontrivial-Roll: build_limited_scripts_slave
Change-Id: I28d2260948aaf63bd865888c2f60e4cdee9aea48
Reviewed-on: https://chromium-review.googlesource.com/822990
Commit-Queue: Aaron Gable <agable@chromium.org>
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Context: The WPT importer consumes the JSON produced by
git cl try-results is consumed and uses it to determine
when the CQ has passed (whether all non-experimental cq
jobs were successful) and where layout test results are
stored.
Added fields:
created_ts: This could be used to sort builds by time.
tags: Includes user_agent tag and experimental tag, as well as
experimental: whether the job is experimental
Bug: 792652
Change-Id: Ic6099a21b21db668b88b1a8e54aefd84529a2a91
Reviewed-on: https://chromium-review.googlesource.com/819573
Commit-Queue: Quinten Yearsley <qyearsley@chromium.org>
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
This reverts commit 9219d35688.
Reason for revert: unfortunately this says "core,quotePath" and since it includes recipe changes, we need something that the roller can munch on :(
Original change's description:
> Use core.quotePath=false when git is listing files
>
> This prevents git from putting quotes around some file names
> (those that have astral-plane characters) and not around others.
>
> R=maruel
>
> Bug: 792302
> Recipe-Nontrivial-Roll: build
> Recipe-Nontrivial-Roll: build_limited_scripts_slave
> Change-Id: I3b6a6b36c4720116de811b40177b59aa25c263db
> Reviewed-on: https://chromium-review.googlesource.com/815454
> Commit-Queue: Aaron Gable <agable@chromium.org>
> Reviewed-by: Marc-Antoine Ruel <maruel@chromium.org>
TBR=maruel@chromium.org,agable@chromium.org
Change-Id: I226388f19024403240a1443eb2b878b9293220e1
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 792302
Reviewed-on: https://chromium-review.googlesource.com/821671
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Commit-Queue: Robbie Iannucci <iannucci@chromium.org>
This prevents git from putting quotes around some file names
(those that have astral-plane characters) and not around others.
R=maruel
Bug: 792302
Recipe-Nontrivial-Roll: build
Recipe-Nontrivial-Roll: build_limited_scripts_slave
Change-Id: I3b6a6b36c4720116de811b40177b59aa25c263db
Reviewed-on: https://chromium-review.googlesource.com/815454
Commit-Queue: Aaron Gable <agable@chromium.org>
Reviewed-by: Marc-Antoine Ruel <maruel@chromium.org>
We don't set the branch.<name>.gerritpatchset git config value
during "git cl upload" because it isn't returned from the
server either during push or during any of our subsequent RPCs,
and adding another RPC just for that metadata would be slower
that we would like.
But calling "git cl status" already makes an RPC per branch, so
take advantage of that to cache the gerritpatchset value during
that operation.
R=robertma
Bug: 792611
Change-Id: I37b09f3c4cfced86668b457eff82f2424012b14b
Reviewed-on: https://chromium-review.googlesource.com/815137
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Commit-Queue: Aaron Gable <agable@chromium.org>
While ripping SVN support out of git-cl, the Changelist() constructor
changed to require that the branch name start with "refs/heads/",
but the CMDissue --reverse code was never updated to feed it the
fully-qualified refname.
R=thestig
Bug: 791176
Change-Id: Ia7fee0f77fec080d91f34ad43bfd9f7c6a4bf64b
Reviewed-on: https://chromium-review.googlesource.com/806239
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Commit-Queue: Aaron Gable <agable@chromium.org>
This will let developers run PRESUBMIT against all files in the
repo, rather than just those their CL touches. This will be
particularly helpful when modifying PRESUBMIT.py itself.
R=maruel@chromium.org
Bug: 519046
Change-Id: I5775eef8aecefe0cd358537c9218afc7480a7619
Reviewed-on: https://chromium-review.googlesource.com/798056
Commit-Queue: Aaron Gable <agable@chromium.org>
Reviewed-by: Marc-Antoine Ruel <maruel@chromium.org>
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
If a commit subject contains [hashtags], include them in Gerrit CL.
Replace consecutive non-alphanums with dash.
Also add --hashtag flag for explicit hashtagging.
Bug:
Change-Id: I25aed286013043263f959ff340a5b5478faa0f27
Reviewed-on: https://chromium-review.googlesource.com/764974
Commit-Queue: Nodir Turakulov <nodir@chromium.org>
Reviewed-by: Aaron Gable <agable@chromium.org>
If you name your branches "bug-123-fix-foobar" or "123-fix-foobar", git cl
upload will automatically populate the "Bug: " line in the cl description with
123.
Bug: 778252
Change-Id: I5bf570d5d44e8681c552a52a8b5ed0c64ce82284
Reviewed-on: https://chromium-review.googlesource.com/738237
Commit-Queue: Aaron Gable <agable@chromium.org>
Reviewed-by: Aaron Gable <agable@chromium.org>
Sometimes I want to get try bot results without checking out the
relevant branch.
R=agable@chromium.org
Bug:
Change-Id: I89d118962ee37b10d95cf4044b61a0f2234b7e60
Reviewed-on: https://chromium-review.googlesource.com/710500
Commit-Queue: Stefan Zager <szager@chromium.org>
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
If -m option value starts with "luci.", most probably the user intends
to schedule a build on a LUCI bucket. Print an error message asking
the user to use -B option.
Bug: 749696
Change-Id: If7a038a1f629ee808e3261ae1c753e388bfea893
Reviewed-on: https://chromium-review.googlesource.com/707534
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Commit-Queue: Nodir Turakulov <nodir@chromium.org>
Previously, git-cl-diff went through a dance where it would create
a new branch, download the uploaded patch onto that branch, and
then diff against that. This had all sorts of problems: if you
aborted the command, it might leave you on that branch; if you have
local changes, they might get clobbered or the command would refuse
to run.
Now that we're in a Gerrit-only world, and patchsets are by definition
equivalent to commits, we can simply diff against whatever local commit
was last uploaded or, in a pinch, fetch the uploaded commit and diff
against that.
Bug: 759893
Change-Id: Ia4b93dcfb9b8aba85817e62731f68d6450026e75
Reviewed-on: https://chromium-review.googlesource.com/639915
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Commit-Queue: Aaron Gable <agable@chromium.org>
Since git-cl TBR always sets +1, it does not allow auto-submit where
using +2 score as approval. Let me make git-cl automatically adjust
to proper score.
Bug: 762425
Change-Id: I71fe1af1b8bf5e68d2509c60e8bf05024b6bdbb7
Reviewed-on: https://chromium-review.googlesource.com/680717
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Commit-Queue: Yoshisato Yanagisawa <yyanagisawa@chromium.org>
This allows a script to generate a sufficient list of owners (and
reviewers) for a given CL. Unlike the owners presubmit check and
the normal, interactive mode of `git-cl owners`, we do not print
the comments associated with an owner for each file, since
presumably a script doesn't care about them (and the comments
aren't in a particularly machine-parsable form, anyway).
This could be used by the WPT import scripts, and presumably
by roll scripts and other such things.
I didn't add a test for this because there appears to be no good
mechanism for testing top-level CMD functions in git_cl that
didn't end up just repeating the code mock-for-mock :(.
R: phajdan.jr@chromium.org
Change-Id: I3a9e6d117d6f4bafe938b07b028f119835c3e575
Reviewed-on: https://chromium-review.googlesource.com/648653
Reviewed-by: Paweł Hajdan Jr. <phajdan.jr@chromium.org>
Commit-Queue: Dirk Pranke <dpranke@chromium.org>
This adds support for the new urls (which contain the project) to
git-cl [description|checkout|issue|patch] and others.
Bug: 757602
Change-Id: I6e854a85e655e14daa7e4172ca938953778bf514
Reviewed-on: https://chromium-review.googlesource.com/634518
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
This allows us to skip 'git cl format' for histograms.xml, which in
turn allows us to issue a presubmit error rather than a warning when
that file is malformatted, without running the formatting code twice.
The formatter is somewhat slow for this file, so it's helpful to avoid
duplicating that work.
BUG=none
TEST=none
R=iannucci@chromium.org
Change-Id: Ia86d45c7c56a9f89db34ca7175ef686589084f85
Reviewed-on: https://chromium-review.googlesource.com/569105
Commit-Queue: Ilya Sherman <isherman@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Using self.GetDescription() uses the description from the web.
Given that the user is purposefully disassociating their current
branch from the review on the web, they may have already changed
the commit message. We shouldn't set it back.
Bug: 742730
Change-Id: I0545cb6288c332fd475d1de7fb302f71ee41a415
Reviewed-on: https://chromium-review.googlesource.com/578229
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Commit-Queue: Aaron Gable <agable@chromium.org>
The actual flag is --send-mail. Also includes a fix
to publish these changes if a comment is included.
Bug: 740950
Change-Id: I38ca0a35c1364c8364eb0ef301137c04daede40b
Reviewed-on: https://chromium-review.googlesource.com/572033
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Commit-Queue: Aaron Gable <agable@chromium.org>
In Rietveld, adding a comment to a change automatically
published it no matter what. In Gerrit, we need to explicitly
mark the change as Ready for Review. This CL adds a new
parameter to the wrapper methods around the SetReview
API so that they can mark changes as Ready.
Bug: 740950
Change-Id: Icb2ad7c5beb03a4760657a761841745f0d75514e
Reviewed-on: https://chromium-review.googlesource.com/572031
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Commit-Queue: Aaron Gable <agable@chromium.org>