This was made by running `codespell` and `scspell`
and then checking the results.
Change-Id: I169fd5b40294f83015075b4a899fbca263821f25
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2144602
Commit-Queue: Quinten Yearsley <qyearsley@chromium.org>
Auto-Submit: Quinten Yearsley <qyearsley@chromium.org>
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Needed by Skia's PostUploadHooks, so that presubmit_support doesn't
depend on git-cl internal classes.
Bug: 1042324
Change-Id: If8f4e6ea035197667cd9705a4274590c4d11511e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2007670
Reviewed-by: Anthony Polito <apolito@google.com>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
Ran "2to3 -w -n -f print ./" and manually added imports.
Ran "^\s*print " and "\s+print " to find batch/shell scripts, comments and the like with embedded code, and updated them manually.
Also manually added imports to files, which used print as a function, but were missing the import.
The scripts still work with Python 2.
There are no intended behaviour changes.
Bug: 942522
Change-Id: Id777e4d4df4adcdfdab1b18bde89f235ef491b9f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1595684
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Dirk Pranke <dpranke@chromium.org>
Auto-Submit: Raul Tambre <raul@tambre.ee>
Suppose the final paragraph of a commit message looks like this:
"""
And here's the final paragraph.
Bug: 1234
TBR=soandso
Change-Id: deadbeef
"""
In this case, we don't want to lose the Bug and Change-Id footers,
so we process the whole final paragraph. *But* we'd also like to
help the user get things formatted correctly. This change lets
git_footers notice this situation, and insert a newline before the
first well-formed footer (Bug: in this case), so that the set of
well- and mal-formed footers are separated from the rest of the
malformed body text.
In the rare case where the last line of the last non-trailer paragraph
is a url, this will also visibly push the url into the block of
trailers (where it doesn't belong), prompting the user to fix it.
A more comprehensive fix for that particular case is coming later.
Bug: 766234
Change-Id: I6ae0072fff68ddf06e6f43b70f9a82a7f247f4ab
Reviewed-on: https://chromium-review.googlesource.com/849481
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Commit-Queue: Aaron Gable <agable@chromium.org>
It's unlikely that anyone would ever intend to have a git trailer
whose key is "http", but since URLs are often long, it is rather
likely that someone would put a URL on a line all by itself. When
that happens, don't accidentally interpret it as a footer.
R=iannucci, tandrii
Bug: 766234
Change-Id: I3101119c4e49e20339487618cc1719452b026d90
Reviewed-on: https://chromium-review.googlesource.com/849484
Commit-Queue: Aaron Gable <agable@chromium.org>
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Also adds tests for the bug and for --json output.
R=agable@chromium.org, phajdan@chromium.org
Change-Id: I4e2208fdad8e23d48d27d0a354470336a7b86180
Reviewed-on: https://chromium-review.googlesource.com/570030
Reviewed-by: Paweł Hajdan Jr. <phajdan.jr@chromium.org>
Commit-Queue: Paweł Hajdan Jr. <phajdan.jr@chromium.org>
Since split_footers became more resilient to malformed
footers and started returning the entire last paragraph,
instead of just the last paragraph iff it was entirely
well-formed, other functions like remove_footer need to
make sure they handle the case where not every line of
the footer paragraph can be parsed.
R=iannucci@chromium.org
Bug: 740601
Change-Id: I75c6c626d96942181f453abeee896ee92d14b20b
Reviewed-on: https://chromium-review.googlesource.com/565779
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Commit-Queue: Aaron Gable <agable@chromium.org>
This CL wholly revamps the way presubmit_support adds
CQ_INCLUDE_TRYBOTS lines in commit descriptions. In
particular, when the CL is being uploaded to Gerrit,
it uses our pre-existing support for manipulating git
footers to make the whole process much simpler.
R=tandrii@chromium.org
Bug: 710547
Change-Id: I5858282a44c590f131021fa3820f1cb3f70ef620
Reviewed-on: https://chromium-review.googlesource.com/487831
Commit-Queue: Aaron Gable <agable@chromium.org>
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
This allows inserted footers to be specified as either before
or after other potentially-present footers.
It has one slight behavior change (reflected in the tests):
If after_keys is specified but *doesn't match* any pre-existing
footers, then the behavior does *not* switch to "insert as early
as possible". The behavior switch only happens if the after_keys
actually match a footer.
R=iannucci@chromium.org
Bug: 710547
Change-Id: If557978fe9309785285056eb557acbdc87960bb2
Reviewed-on: https://chromium-review.googlesource.com/487606
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Commit-Queue: Aaron Gable <agable@chromium.org>
R=agable@chromium.org,iannucci@chromium.org
Before, this block of footers won't be recognized by git_footers:
Bug:
Change-Id: xxx
because of empty value for "Bug:". This CL fixes this behavior.
Bug: 715614
Change-Id: Iabe45bfc027fda15cbe0cd5ce9b883ce3b891220
Reviewed-on: https://chromium-review.googlesource.com/487963
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Reviewed-by: Aaron Gable <agable@chromium.org>
Lets you get CL tags for a given CL.
BUG=591172
Review-Url: https://codereview.chromium.org/1915833003
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@300658 0039d316-1c4b-4281-b951-d872f2087c98
Special case when the change description has no footers, but looks
like a footer.
R=machenbach@chromium.org,andybons@chromium.org
BUG=579176
Review URL: https://codereview.chromium.org/1812803002
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@299343 0039d316-1c4b-4281-b951-d872f2087c98
This should insert the message according to Gerrit's own commit-msg
hook implementation.
BUG=579183
Review URL: https://codereview.chromium.org/1758943002
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@299093 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
Git footers doesn't seem to support v8, let alone know that trunk actually maps
to the candidate branch. This should fix it.
BUG=
TBR=agable
Review URL: https://codereview.chromium.org/645183002
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@292445 0039d316-1c4b-4281-b951-d872f2087c98
This tool can automatically set up the necessary git-svn metadata for our
repos that live in SVN but are mirrored to Chrome.
R=iannucci@chromium.org, tandrii@chromium.org
BUG=418973
Review URL: https://codereview.chromium.org/611253003
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@292241 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