Commit Graph

10 Commits (fff0fe4deaddeb6e5f7b58c64e38c6237ec36204)

Author SHA1 Message Date
Yannic Bonenberger 684096347b Improve git cl split
This CL changes the behavior of `git cl split` to split the change
by the size of the resulting CLs. For now, this is based on the number
of bytes changed, and not by the number of changed lines. Depending
on the shape of change, this may still produce more CLs than expected
(and possibly more than before).

A future change will switch the split to be based on the number
of affected lines, and also introduce a mode to base the split
on the number of affected files.

Bug: 998922
Change-Id: I49f868972a61b89b426ef9e2ceedc733eacb4350
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1778744
Commit-Queue: Yannic Bonenberger <yannic.bonenberger@gmail.com>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
5 years ago
Marc-Antoine Ruel 8e57b4bc55 python3 improvements
Ran:
  vi $(git grep --name-only iteritems | grep -v third_party)
  vi $(git grep --name-only itervalues | grep -v third_party)
  vi $(git grep --name-only 'print ' | grep -v third_party)

and edited the files quickly with adhoc macros. Then ran in recipes/:
  ./recipes.py test train

There was only a small subset of files that had been updated to use
six.iteritems() and six.itervalues(). Since the dataset size that is
being used in gclient is small (pretty much always below 200 items),
it's better to just switch to .items() right away and take the temporary
performance hit, so that we don't need to come back to rewrite the code.

Recipe-Nontrivial-Roll: build
Bug: 984182
Change-Id: I5faf11486b66b0d73c9098ab0f2ce1b15a45c53e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1854900
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Auto-Submit: Marc-Antoine Ruel <maruel@chromium.org>
5 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
Takuto Ikuta 51eca59ff6 Support --enable-auto-submit in `git cl split`
With default True.

This CL was uploaded by git cl split.

R=jochen@chromium.org
Bug: 927178
Change-Id: Ie0a68ed7ca381e1bb33341badca153bf409bb376
Reviewed-on: https://chromium-review.googlesource.com/c/1470402
Reviewed-by: Nico Weber <thakis@chromium.org>
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
Auto-Submit: Takuto Ikuta <tikuta@chromium.org>
6 years ago
Stephen Martinis f53f82cbc8 `git cl split`: Fix typos in cq_dry_run code
Bug: 878117
Change-Id: Ifb8af6bfcc6467ad9b79cf6292ebb8afc8f7e949
Reviewed-on: https://chromium-review.googlesource.com/1213588
Reviewed-by: John Budorick <jbudorick@chromium.org>
Reviewed-by: Ryan Tseng <hinoka@chromium.org>
Commit-Queue: Stephen Martinis <martiniss@chromium.org>
7 years ago
Stephen Martinis cb32668137 git cl split: Don't cq dry run by default
`git cl split` currently runs a cq dry run for every uploaded CL. This
has overloaded our infrastructure a few times in the past. This CL changes
the command to not dry run by default, and adds a flag to enable this. The
flag has a warning about doing this, and tells the user to email
infra-dev@chromium.org if they're going to be generating >~10 CLs.

Bug: 878117
Change-Id: Ic865c09b188b8d4f202785f4763f7b7b8910c9cf
Reviewed-on: https://chromium-review.googlesource.com/1191927
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Commit-Queue: Stephen Martinis <martiniss@chromium.org>
7 years ago
Chris Watkins ba28e460fb Add a --dry-run option to git cl split
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>
7 years ago
Gabriel Charette 09baacd899 Fix git cl upload --send-mail typo in split_cl.py
R=iannucci@chromium.org

Bug: --send-email is not a command
Change-Id: Ia6a034204510322d674e0a45a2ed8a43dbba242c
Reviewed-on: https://chromium-review.googlesource.com/757131
Commit-Queue: Gabriel Charette <gab@chromium.org>
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
7 years ago
Aaron Gable e5adf61266 Fix typo with --send-email [sic] flags
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>
8 years ago
Francois Doray d42c68114c Add git cl split.
`git cl split` splits a branch into smaller branches and
uploads CLs.

Change-Id: Ic41cdabdd6241008ff48766e31a8d9d07995f2b0
Reviewed-on: https://chromium-review.googlesource.com/439706
Commit-Queue: Francois Pierre Doray <fdoray@chromium.org>
Reviewed-by: Aaron Gable <agable@chromium.org>
8 years ago