Commit Graph

47 Commits (6cf251b5179f2cd5157cc314b60ef461d863eca1)

Author SHA1 Message Date
Scott Lee 562c59c76c [git_footers] add support for multiline footers
Gerrit allows multiline footers with indents.

e.g.,
Test: something
   looks great

This CL fixes the bug such that add_footer correctly inserts
a given message after multiline footers.

Bug: 379923433
Change-Id: I9b3f793095b63b0586123543a2f8d49f0503fca0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6064963
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Scott Lee <ddoman@chromium.org>
3 months ago
Scott Lee 8e30250504 [git_footers] remove param before_keys from add_footer
The param before_key used to be used in presubmit_support.py, but
it was removed in 2018, and has never been used anywhere since.
- https://crrev.com/c/1351509
- http://shortn/_YQUh4yC9Tc

This CL removes it to simplify the code before the next CL.
It hasn't been used for several years and will unlikely be used
in the future.

Bug: 379923433
Change-Id: Ib0da340235a991b6d8edca041eae811540d4aa60
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6064306
Commit-Queue: Scott Lee <ddoman@chromium.org>
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
3 months ago
Yiwei Zhang 04535d7af3 fail gracefully if git footers is called in cog
Bug: 339231299
Change-Id: Ibfe871ec37db42f2ad75b3effc142f5854d878be
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5539335
Commit-Queue: Josip Sokcevic <sokcevic@chromium.org>
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Auto-Submit: Yiwei Zhang <yiwzhang@google.com>
10 months ago
Gavin Mak edba22d4eb Fix multiline comment formatting
Many incorrectly formatted comments exist from the switch to
4 space indent: https://crrev.com/c/4836379

Bug: 1514505
Change-Id: I6366f9da812919bd35b999f18fa8a49b7a66c09b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5153633
Commit-Queue: Gavin Mak <gavinmak@google.com>
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
1 year ago
Mike Frysinger 124bb8e53c switch to 4 space indent
Leave the recipes/ code at 2 space to match the rest of the recipes
project in other repos.

Reformatted using:
files=( $(
	git ls-tree -r --name-only HEAD | \
		grep -Ev -e '^(third_party|recipes)/' | \
		grep '\.py$';
	git grep -l '#!/usr/bin/env.*python' | grep -v '\.py$'
) )
parallel ./yapf -i -- "${files[@]}"
~/chromiumos/chromite/contrib/reflow_overlong_comments "${files[@]}"

The files that still had strings that were too long were manually
reformatted because they were easy and only a few issues.
autoninja.py
clang_format.py
download_from_google_storage.py
fix_encoding.py
gclient_utils.py
git_cache.py
git_common.py
git_map_branches.py
git_reparent_branch.py
gn.py
my_activity.py
owners_finder.py
presubmit_canned_checks.py
reclient_helper.py
reclientreport.py
roll_dep.py
rustfmt.py
siso.py
split_cl.py
subcommand.py
subprocess2.py
swift_format.py
upload_to_google_storage.py

These files still had lines (strings) that were too long, so the pylint
warnings were suppressed with a TODO.
auth.py
gclient.py
gclient_eval.py
gclient_paths.py
gclient_scm.py
gerrit_util.py
git_cl.py
presubmit_canned_checks.py
presubmit_support.py
scm.py

Change-Id: Ia6535c4f2c48d46b589ec1e791dde6c6b2ea858f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4836379
Commit-Queue: Josip Sokcevic <sokcevic@chromium.org>
Auto-Submit: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
2 years ago
Gavin Mak cc97655889 Reland "Drop py2 support in gerrit and git related files"
This is a reland of commit b5c7f4b46c

Original change's description:
> Drop py2 support in gerrit and git related files
>
> python3 is the only supported version of python in depot_tools.
>
> Bug: 1475402
> Change-Id: Ie4ee18d297081b3aa0206b8d7ce6461819bff0ca
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4809560
> Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
> Commit-Queue: Gavin Mak <gavinmak@google.com>

Bug: 1475402
Change-Id: I194180494071777b7b9dd91a5c8edabbbf5484c1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4811218
Reviewed-by: Joanna Wang <jojwang@chromium.org>
Commit-Queue: Gavin Mak <gavinmak@google.com>
2 years ago
Gavin Mak 42674f5d2d Revert "Drop py2 support in gerrit and git related files"
This reverts commit b5c7f4b46c.

Reason for revert: missing a replace for urlparse.urlparse

Original change's description:
> Drop py2 support in gerrit and git related files
>
> python3 is the only supported version of python in depot_tools.
>
> Bug: 1475402
> Change-Id: Ie4ee18d297081b3aa0206b8d7ce6461819bff0ca
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4809560
> Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
> Commit-Queue: Gavin Mak <gavinmak@google.com>

Bug: 1475402
Change-Id: Idd00fdfe0b3d62785da2789a7dfcc9fbc79b6385
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4811623
Reviewed-by: Aravind Vasudevan <aravindvasudev@google.com>
Commit-Queue: Gavin Mak <gavinmak@google.com>
2 years ago
Gavin Mak b5c7f4b46c Drop py2 support in gerrit and git related files
python3 is the only supported version of python in depot_tools.

Bug: 1475402
Change-Id: Ie4ee18d297081b3aa0206b8d7ce6461819bff0ca
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4809560
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Gavin Mak <gavinmak@google.com>
2 years ago
Josip Sokcevic 4de5deacd4 Explicitly run everything with python3
R=aravindvasudev@google.com, gavinmak@google.com

Change-Id: Iaa5e960c6226dea3a0814c7cb778d952eafb1502
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3525960
Reviewed-by: Gavin Mak <gavinmak@google.com>
Reviewed-by: Aravind Vasudevan <aravindvasudev@google.com>
Commit-Queue: Josip Sokcevic <sokcevic@google.com>
3 years ago
Aravind Vasudevan c5f0cbb865 Use pylint 2.7 for depot_tools
This includes a few fixes for specific errors, and disables several new
warnings introduced in this version, in order to allow for an incremental migration.

Bug:1262286
Change-Id: I4b8f8fc521386419a3121bbb07edc8ac83170a94
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3413679
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
Commit-Queue: Aravind Vasudevan <aravindvasudev@google.com>
3 years ago
Josip Sokcevic 42c5bbbc96 Revert "Use pylint 2.7 for depot_tools"
This reverts commit 22bf605bb6.

Reason for revert: breaks gclient sync

Original change's description:
> Use pylint 2.7 for depot_tools
>
> This includes a few fixes for specific errors, and disables several new
> warnings introduced in this version, in order to allow for an incremental migration.
>
> Bug:1262286
> Change-Id: Ie97d686748c9c952e87718a65f401c5f6f80a5c9
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3400616
> Reviewed-by: Gavin Mak <gavinmak@google.com>
> Commit-Queue: Aravind Vasudevan <aravindvasudev@google.com>

Bug: 1262286
Change-Id: Ieb946073c7886c7bf056ce843a5a48e82becf7a5
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3413672
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Josip Sokcevic <sokcevic@google.com>
3 years ago
Aravind Vasudevan 22bf605bb6 Use pylint 2.7 for depot_tools
This includes a few fixes for specific errors, and disables several new
warnings introduced in this version, in order to allow for an incremental migration.

Bug:1262286
Change-Id: Ie97d686748c9c952e87718a65f401c5f6f80a5c9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3400616
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Aravind Vasudevan <aravindvasudev@google.com>
3 years ago
Josip Sokcevic 9c0dc3026e Replace non-inclusive terms
Bug: 1118410, 1118413, 1118422, 1118424, 1118426
Bug: 1118428, 1118430, 1118434, 1118438, 1118442
Bug: 1118453, 1118454
Recipe-Nontrivial-Roll: chromiumos
Recipe-Nontrivial-Roll: build
Change-Id: I43e6305f8c3136774f01b57f12bb442bcb863371
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2551388
Commit-Queue: Josip Sokcevic <sokcevic@google.com>
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
4 years ago
Shahbaz Youssefi 407b5a54a9 Use rstrip when getting footer tags
A quick bugfix was made in cc29098042 that removed trailing empty lines
when getting tags out of the git log.  This preserved the behavior that
tags with trailing whitespace would retain said whitespace.

This change instead simplifies the logic that removes trailing
whitespace with the side effect that whitespace at the end of the last
tag is also stripped.  The unittests are adjusted accordingly

Bug: 1130601
Change-Id: I26d39736179b36ac2573de1ca003a5bc09f30a28
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2423050
Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Dirk Pranke <dpranke@google.com>
Reviewed-by: Dirk Pranke <dpranke@google.com>
5 years ago
Shahbaz Youssefi cc29098042 Strip trailing empty lines when getting footers
Take the following git change description (Note: added ~ to avoid
having these lines be parsed as tags):

```
~Test
~
~Bug: something
~Change-Id: Something
```

Sometimes(?) `git log --pretty=format:%B%n <hash>..` returns:

```
~Test
~
~Bug: something
~Change-Id: Something

```

The trailing empty line trips split_footers() up, making it return
an empty footer.

This change removes trailing empty lines before processing them.

Bug: 1130601
Change-Id: Ib8d6c37ad6817a47a744245d1a2455ac9af6c469
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2422378
Commit-Queue: Dirk Pranke <dpranke@google.com>
Reviewed-by: Dirk Pranke <dpranke@google.com>
Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org>
5 years ago
Ayu Ishii 0985861970 CodeInclusion: Rename whitelist/blacklist -> allowlist/blocklist
Migrate to more inclusive terminology.

Bug: 1097674
Change-Id: I387b385ff36c7766682c06af34ed5fc6115119d1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2268403
Reviewed-by: Anthony Polito <apolito@google.com>
Commit-Queue: Ayu Ishii <ayui@chromium.org>
5 years ago
Quinten Yearsley 925cedba7b Run spellchecker on depot_tools
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>
5 years ago
Edward Lemur 69bb8bef75 presubmit_support: Support getting and adding footers.
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>
5 years ago
Edward Lemur 5da394f8e1 depot_tools: Run git_footers_test on Python 3.
Bug: 1009809
Change-Id: I39bbb288a96bbb349747a3aa080f505d3b3a2cff
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1835041
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
Auto-Submit: Edward Lesmes <ehmaldonado@chromium.org>
Reviewed-by: Anthony Polito <apolito@google.com>
5 years ago
Edward Lesmes 98eda3f3e4 Revert "depot_tools: Run Python scripts using vpython (Part 1)"
This reverts commit d6186f9936.

Reason for revert: <INSERT REASONING HERE>

Original change's description:
> depot_tools: Run Python scripts using vpython (Part 1)
> 
> Tbr: iannucci@chromium.org
> Bug: 984182
> Change-Id: If36722e190d305f89d63dce91d0a600ddc34ebe3
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1748589
> Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
> Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>

TBR=iannucci@chromium.org,ehmaldonado@chromium.org

Change-Id: I7686985852608d0703bcbbab137df1ce82b29723
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 984182
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1749853
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
6 years ago
Edward Lemur d6186f9936 depot_tools: Run Python scripts using vpython (Part 1)
Tbr: iannucci@chromium.org
Bug: 984182
Change-Id: If36722e190d305f89d63dce91d0a600ddc34ebe3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1748589
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
6 years ago
Raul Tambre 80ee78e7fa Convert print statements to Python 3 style
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>
6 years ago
Aaron Gable 4be31878a8 Let git_footers split final paragraphs in specific cases
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>
7 years ago
Aaron Gable d9a6756b24 Blacklist http(s): from being parsed as a git footer
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>
7 years ago
Andrii Shyshkalov 22a9cf54c9 git_footers: fix bug stdin-based message input.
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>
8 years ago
Aaron Gable b08ba6575e git_footer: be more resilient to malformed footers
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>
8 years ago
Andrii Shyshkalov 1a91c6080a Nit fix for git_footers.
TBR=machenbach@chromium.org
Bug: 717504
Change-Id: Ifa71fa4cac0b57ed11ba5e7eb93516b23b72a496
Reviewed-on: https://chromium-review.googlesource.com/502809
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
8 years ago
Andrii Shyshkalov 04b51d6de0 Reland of Relax git_footers parsing to match that of Gerrit (JGit).
Previously landed as:
> Change-Id: Ieb6415d55e85b91f11f9052b0fd08cf982b64d51
> Reviewed-on: https://chromium-review.googlesource.com/501849

R=agable@chromium.org,machenbach@chromium.org

Bug: 717504
Change-Id: Iede5c29ff4c317b68d8c2bca319edec140a176f5
Reviewed-on: https://chromium-review.googlesource.com/502908
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
8 years ago
Andrii Shyshkalov 43ec62ec71 Revert "Relax git_footers parsing to match that of Gerrit (JGit)."
This reverts commit 28a5d5defd.

Reason for revert: breaks assumption in function for adding footers

Original change's description:
> Relax git_footers parsing to match that of Gerrit (JGit).
> 
> R=​agable@chromium.org
> 
> Bug: 717504
> Change-Id: Ieb6415d55e85b91f11f9052b0fd08cf982b64d51
> Reviewed-on: https://chromium-review.googlesource.com/501849
> Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
> Reviewed-by: Aaron Gable <agable@chromium.org>
> 

TBR=agable@chromium.org,machenbach@chromium.org,tandrii@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Bug: 717504

Change-Id: I9b4d619b2972be8434aff9464f1959fbcb3abd32
Reviewed-on: https://chromium-review.googlesource.com/503030
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
8 years ago
Andrii Shyshkalov 28a5d5defd Relax git_footers parsing to match that of Gerrit (JGit).
R=agable@chromium.org

Bug: 717504
Change-Id: Ieb6415d55e85b91f11f9052b0fd08cf982b64d51
Reviewed-on: https://chromium-review.googlesource.com/501849
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
Reviewed-by: Aaron Gable <agable@chromium.org>
8 years ago
Aaron Gable b584c4f0d1 Make CQ_INCLUDE_TRYBOTS support review-specific
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>
8 years ago
Aaron Gable c06db440c9 Make git_footers.add_footer more flexible
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>
8 years ago
Andrii Shyshkalov 80cae42d7f Fix git_footers to recognize footers with empty value.
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>
8 years ago
Andrii Shyshkalov 1897532850 Python style fixes + unused imports removal in git cl and friends.
R=sergiyb@chromium.org
BUG=

Change-Id: I9b886100557bf6efa9be07d40175f7bb919f5294
Reviewed-on: https://chromium-review.googlesource.com/432456
Reviewed-by: Sergiy Byelozyorov <sergiyb@chromium.org>
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
8 years ago
agable 814b1cab2f Remove svn support from smaller git extensions
R=iannucci@chromium.org
BUG=475320

Review-Url: https://codereview.chromium.org/2354313003
8 years ago
Andrii Shyshkalov 49fe922ffa Fix git_footers to accept refs with periods in them.
For example, v8 has refs/heads/1.4.2

TBR=machenbach@chromium.org
BUG=chromium:674448

Change-Id: Ia3405ee402a01153fc9744457d8fee9385446cae
Reviewed-on: https://chromium-review.googlesource.com/420285
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
8 years ago
tandrii@chromium.org f2aa52b562 Refactor git_footers for later use in git cl.
Motivation: git_cl should start understanding Gerrit's git footers,
to avoid appending BUG= after Change-Id: Ixxx line.

R=sergiyb@chromium.org
BUG=614587

Review-Url: https://codereview.chromium.org/2028303006

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@300691 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
martiniss@chromium.org 456ca7f0c2 tryserver recipe_module: Add get_tags.
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
9 years ago
tandrii@chromium.org 9fc50db2cc Gerrit git cl: fix change-id appending.
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
9 years ago
tandrii@chromium.org 3c3c034d82 Add Gerrit's Change-Id handling to git_footers.
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
9 years ago
mmoss@chromium.org f0e4152061 Improve "dcommit in git repo" error message.
R=agable@chromium.org, iannucci@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@295609 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
sbc@chromium.org 013731e832 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
10 years ago
hinoka@chromium.org 4593f47b06 Git footer fix for v8
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
11 years ago
agable@chromium.org d629fb4084 Introduct git-auto-svn
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
11 years ago
iannucci@chromium.org 0a17dab124 Allow trunk to not end in a slash for git_footers.
R=luqui@chromium.org, prasadv@chromium.org
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@291897 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
iannucci@chromium.org 74c44f6d69 Expand git-footers to read the svn position for any trunk path in any repo.
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
11 years ago
luqui@chromium.org 0b88762379 Added git footers tool to parse conventional metadata from git commits
BUG=407316

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

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