Commit Graph

1139 Commits (2568d4c1ebc76be817d4e499308361fbe0bc79cf)

Author SHA1 Message Date
Josip Sokcevic 2568d4c1eb Add additional check for PS parents
When updating with external changes, depot_tools applies diff between
patchsets. It's not sufficient to just check local `base` commit with
the latest remote since both could be updated (e.g. via rebase-update
and Gerrit rebase).

R=gavinmak@google.com, jojwang@google.com

Bug: 1448243
Change-Id: Ib92d2f3958de15090a261c810ad19bdf085219a0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4559308
Reviewed-by: Joanna Wang <jojwang@chromium.org>
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Josip Sokcevic <sokcevic@chromium.org>
2 years ago
Joanna Wang 4786a41fb5 Allow users to mute stacked changes dogfood message.
Bug: 1443304
Change-Id: Idecda2ca5e059c069f38cf099e83e7e0ae932ce2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4537944
Reviewed-by: Gavin Mak <gavinmak@google.com>
Auto-Submit: Joanna Wang <jojwang@chromium.org>
Commit-Queue: Joanna Wang <jojwang@chromium.org>
2 years ago
Robert Iannucci 3d6d2d2500 [git-cl][presubmit] Remove references to LUCI_OMIT_PYTHON2.
This changes all references to the LUCI_OMIT_PYTHON2 environment
variable to instead assume that it is `'true'`.

R=sokcevic, tikuta

Bug: 1441784
Recipe-Nontrivial-Roll: build
Change-Id: Iea161a372adb68cdcb330d131df2c19ca2fe7b37
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4522480
Reviewed-by: Takuto Ikuta <tikuta@chromium.org>
Commit-Queue: Robbie Iannucci <iannucci@chromium.org>
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
2 years ago
Josip Sokcevic 967cf672eb Revert "Reland "Remove Python 2 support for PRESUBMIT.py""
This reverts commit 119cff3d2f.

Reason for revert: some builders still call py2 presubmit
http://go/bbid/8781466817788761185

We need to clean up recipe first before relanding this

Original change's description:
> Reland "Remove Python 2 support for PRESUBMIT.py"
>
> This reverts commit d4c6cbeb61.
>
> Reason for revert: Python 2 invocations of the presubmit system
> should be gone now.
>
> Original change's description:
> > Revert "Remove Python 2 support for PRESUBMIT.py"
> >
> > This reverts commit 8454fc2458.
> >
> > Reason for revert: post submit hooks failing
> > https://crbug.com/1422416
> >
> > Original change's description:
> > > Remove Python 2 support for PRESUBMIT.py
> > >
> > > The presubmit system still supports invoking PRESUBMIT.py files using
> > > Python 2. This has recently been turned off on the bots so this change
> > > removes support more completely.
> > >
> > > There are still some python3 parameters being passed around - it seemed
> > > better to do the simplest possible removal now, with a follow-up change
> > > to remove more support code after this has sat for a while.
> > >
> > > Tests run from PRESUBMIT.py files could still be run using Python 2, but
> > > those should also have been addressed already. Removing support for that
> > > will be done in a subsequent change.
> > >
> > > Bug: 1207012
> > > Change-Id: Id244d547a04438f83734dba269c3cc180c148b37
> > > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4315183
> > > Reviewed-by: Aravind Vasudevan <aravindvasudev@google.com>
> > > Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
> >
> > Bug: 1207012
> > Bug: 1422416
> > Change-Id: Iaf3102e63ec3c698d0258fac5746dbd92c30edbb
> > No-Presubmit: true
> > No-Tree-Checks: true
> > No-Try: true
> > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4317176
> > Auto-Submit: Josip Sokcevic <sokcevic@chromium.org>
> > Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
> > Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
>
> Bug: 1207012
> Bug: 1422416
> Change-Id: I9521095989c708188fca0251fa13881e086b1395
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4516015
> Reviewed-by: Aravind Vasudevan <aravindvasudev@google.com>
> Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
> Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>

Bug: 1207012
Bug: 1422416
Change-Id: Ifa775ca19f8c7b3c166eb89a255c25c20aaf4a98
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4521578
Commit-Queue: Josip Sokcevic <sokcevic@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
2 years ago
Bruce Dawson 119cff3d2f Reland "Remove Python 2 support for PRESUBMIT.py"
This reverts commit d4c6cbeb61.

Reason for revert: Python 2 invocations of the presubmit system
should be gone now.

Original change's description:
> Revert "Remove Python 2 support for PRESUBMIT.py"
>
> This reverts commit 8454fc2458.
>
> Reason for revert: post submit hooks failing
> https://crbug.com/1422416
>
> Original change's description:
> > Remove Python 2 support for PRESUBMIT.py
> >
> > The presubmit system still supports invoking PRESUBMIT.py files using
> > Python 2. This has recently been turned off on the bots so this change
> > removes support more completely.
> >
> > There are still some python3 parameters being passed around - it seemed
> > better to do the simplest possible removal now, with a follow-up change
> > to remove more support code after this has sat for a while.
> >
> > Tests run from PRESUBMIT.py files could still be run using Python 2, but
> > those should also have been addressed already. Removing support for that
> > will be done in a subsequent change.
> >
> > Bug: 1207012
> > Change-Id: Id244d547a04438f83734dba269c3cc180c148b37
> > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4315183
> > Reviewed-by: Aravind Vasudevan <aravindvasudev@google.com>
> > Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
>
> Bug: 1207012
> Bug: 1422416
> Change-Id: Iaf3102e63ec3c698d0258fac5746dbd92c30edbb
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4317176
> Auto-Submit: Josip Sokcevic <sokcevic@chromium.org>
> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
> Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>

Bug: 1207012
Bug: 1422416
Change-Id: I9521095989c708188fca0251fa13881e086b1395
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4516015
Reviewed-by: Aravind Vasudevan <aravindvasudev@google.com>
Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
2 years ago
mark a. foltz bcb9577a46 [depot_tools] Update messages for git cl upload.
If a Gerrit issue has commits not available in the local branch,
git cl upload will tell the user to run git rebase-update.  That doesn't
actually merge the Gerrit commits into the local branch though, so the message
is misleading.

Bug: 1441209
Change-Id: Ib30377ac3a0d87e5fcfc491759b10c3268883159
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4507644
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Mark Foltz <mfoltz@chromium.org>
2 years ago
Lukasz Anforowicz 9696c7f3ff [rust] [depot_tools] Refer to a more specific rustfmt bug in a TODO.
Bug: 1440869
Change-Id: I1ac21bf23972da9e515315c6bffb9afac9641393
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4484184
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Łukasz Anforowicz <lukasza@chromium.org>
Reviewed-by: Adrian Taylor <adetaylor@chromium.org>
2 years ago
Joanna Wang 1398e4fc69 Update stacked changes dogfood message.
Bug: 1441218
Change-Id: Ic82332d4ca1bda3049bb77daf90bf89aa8914577
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4495347
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Joanna Wang <jojwang@chromium.org>
2 years ago
Joanna Wang ddd8578dbe Enroll everyone in stacked changes dogfood.
Bug: b/265929888
Change-Id: Ib084e306a23a6159b8d5fe4b45bf9af731514665
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4482418
Commit-Queue: Joanna Wang <jojwang@chromium.org>
Reviewed-by: Gavin Mak <gavinmak@google.com>
2 years ago
Michael Achenbach b5cec8c867 Fix Python2 fallback in git-cl post-upload hooks
This fixes an uninitialized variable.

Bug: 1411979, 1435326
Change-Id: Ib28ed259238ff478e78e36b48e74eaf51617cd6d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4457528
Auto-Submit: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Josip Sokcevic <sokcevic@chromium.org>
2 years ago
Josip Sokcevic 34f62b4af7 Run post submit hooks on vpython3 if vpython is unavailable
If bot doesn't have vpython, run post submit hooks with vpython3.
presubmit_support already checks this too, and it will run those
presubmits regardless of USE_PYTHON3 variable.

Bug: 1411979
Change-Id: Id7edb8a10c39d625154dcc5a131becad3d3ebcbb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4457567
Reviewed-by: Garrett Beaty <gbeaty@google.com>
Commit-Queue: Josip Sokcevic <sokcevic@chromium.org>
2 years ago
Brian Ryner 8d19d8641b Add newlines to info message so words aren't squashed together.
Change-Id: I909b38a4aaa40e9ea8b4d40cababa1274d21e145
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4414305
Auto-Submit: Brian Ryner <bryner@google.com>
Reviewed-by: Joanna Wang <jojwang@chromium.org>
Commit-Queue: Joanna Wang <jojwang@chromium.org>
2 years ago
Joanna Wang d3cbd40cf9 Enroll chromium/src in stacked changes dogfood.
Bug: b/265929888
Change-Id: I1c996c631042cf52449565932eba5040089e76ec
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4412254
Commit-Queue: Gavin Mak <gavinmak@google.com>
Reviewed-by: Gavin Mak <gavinmak@google.com>
Auto-Submit: Joanna Wang <jojwang@chromium.org>
2 years ago
Arthur Milchior 801a975021 [depot tools] Remove `git cl issue --switch`
This was a duplicate of `git cl checkout`

Revert "[depot tools] Add `git cl issue --switch`"
Revert "[depot_tools] Use a function instead of reimplementing it."

This reverts commits 61ebd177ab and
7f9b0231c4.

Bug: 1428476
Change-Id: I54b70d7c7e98c847768cd980b337510fb91cdb20
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4405816
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Arthur Milchior <arthurmilchior@chromium.org>
2 years ago
Arthur Milchior 7f9b0231c4 [depot_tools] Use a function instead of reimplementing it.
It seems dubious that this function ever need to change. But it’s
safer to use this function just in case.

Bug: 1428476
Change-Id: I3c60e6be5c7dab6f003c209b47340e7573819e16
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4403090
Commit-Queue: Arthur Milchior <arthurmilchior@chromium.org>
Reviewed-by: Gavin Mak <gavinmak@google.com>
2 years ago
Arthur Milchior 61ebd177ab [depot tools] Add `git cl issue --switch`
This extra option to Issue number: None (None) allow to switch to the
branch associated to an issue iff there is a single one of those.

Fixed: 1428476
Change-Id: Id39792cffddcb0b08f1123e18f319256209267f2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4381562
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Arthur Milchior <arthurmilchior@chromium.org>
Auto-Submit: Arthur Milchior <arthurmilchior@chromium.org>
2 years ago
Joanna Wang 05b60349bd Add orig_parent to create change descriptions.
Bug: 1426333
Change-Id: I9a199d98aad7ca5133dfa85dd632ffc22f89e421
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4370432
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Joanna Wang <jojwang@chromium.org>
2 years ago
Joanna Wang c5b38329e6 Don't raise 'not a git repo' error in metrics collection.
Fixed: 1424809
Change-Id: I8f8b036a0ef1dd21a58d2af232e105b045e07f56
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4343669
Commit-Queue: Joanna Wang <jojwang@chromium.org>
Reviewed-by: Gavin Mak <gavinmak@google.com>
2 years ago
Joanna Wang 3408652be0 Add push_options to dogfood stacked changes.
Bug: 1423539
Change-Id: If17ce0738878b67d6a267f3082e58ddcef788a4b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4337901
Auto-Submit: Joanna Wang <jojwang@chromium.org>
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Joanna Wang <jojwang@chromium.org>
2 years ago
Joanna Wang 892f2ceea5 Fix git_cl tests for DOGFOOD_STACKED_CHANGES=1
Bug: 1422684
Change-Id: I0c772951cdce8bbe0b03b0008d26e80adea593d7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4337899
Commit-Queue: Gavin Mak <gavinmak@google.com>
Auto-Submit: Joanna Wang <jojwang@chromium.org>
Reviewed-by: Gavin Mak <gavinmak@google.com>
2 years ago
Aravind Vasudevan a9a050c879 Update banned words flag
This change updates banned words flag from 'uploadvalidator~skip' to 'banned-words~skip'.

Bug: None
Change-Id: I2d544171d01e6f61415ba7df03b31e7111226342
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4327604
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Aravind Vasudevan <aravindvasudev@google.com>
2 years ago
Josip Sokcevic a9a7eecf37 Revert "Extract searching relevat files in utils function"
This reverts commit 512fd3bd85.

Reason for revert: breaks some presubmits
https://crbug.com/1421441

Original change's description:
> Extract searching relevat files in utils function
>
> This change introduces lib/ directory which will be used for classes
> that are considered libraries and used by multiple executables.
>
> Change-Id: I3da126778bf5ffdb28d7a3c2b966c85de08ba717
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4289679
> Reviewed-by: Joanna Wang <jojwang@chromium.org>
> Commit-Queue: Josip Sokcevic <sokcevic@chromium.org>

Bug: 1421441
Change-Id: I20e40f452a544a1188a258131a620e2afcd64f13
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4328468
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Josip Sokcevic <sokcevic@chromium.org>
2 years ago
Josip Sokcevic 48d8e90bd4 Revert "Reland "Remove Python 2 support for PRESUBMIT.py""
This reverts commit e9ece0f581.

Reason for revert: broke infra presubmits:
https://ci.chromium.org/p/infra/builders/try/infra-try-presubmit

Original change's description:
> Reland "Remove Python 2 support for PRESUBMIT.py"
>
> This is a reland of commit 8454fc2458
>
> Original change's description:
> > Remove Python 2 support for PRESUBMIT.py
> >
> > The presubmit system still supports invoking PRESUBMIT.py files using
> > Python 2. This has recently been turned off on the bots so this change
> > removes support more completely.
> >
> > There are still some python3 parameters being passed around - it seemed
> > better to do the simplest possible removal now, with a follow-up change
> > to remove more support code after this has sat for a while.
> >
> > Tests run from PRESUBMIT.py files could still be run using Python 2, but
> > those should also have been addressed already. Removing support for that
> > will be done in a subsequent change.
> >
> > Bug: 1207012
> > Change-Id: Id244d547a04438f83734dba269c3cc180c148b37
> > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4315183
> > Reviewed-by: Aravind Vasudevan <aravindvasudev@google.com>
> > Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
>
> Bug: 1207012
> Change-Id: If542cac21d8ec8704b28d03fd8407c5c2899ca2c
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4317177
> Reviewed-by: Aravind Vasudevan <aravindvasudev@google.com>
> Commit-Queue: Aravind Vasudevan <aravindvasudev@google.com>
> Auto-Submit: Josip Sokcevic <sokcevic@chromium.org>

Bug: 1207012
Change-Id: Iebf76d9e2580761fc773791bac07439160503c98
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4323198
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Auto-Submit: Josip Sokcevic <sokcevic@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
2 years ago
Josip Sokcevic e9ece0f581 Reland "Remove Python 2 support for PRESUBMIT.py"
This is a reland of commit 8454fc2458

Original change's description:
> Remove Python 2 support for PRESUBMIT.py
>
> The presubmit system still supports invoking PRESUBMIT.py files using
> Python 2. This has recently been turned off on the bots so this change
> removes support more completely.
>
> There are still some python3 parameters being passed around - it seemed
> better to do the simplest possible removal now, with a follow-up change
> to remove more support code after this has sat for a while.
>
> Tests run from PRESUBMIT.py files could still be run using Python 2, but
> those should also have been addressed already. Removing support for that
> will be done in a subsequent change.
>
> Bug: 1207012
> Change-Id: Id244d547a04438f83734dba269c3cc180c148b37
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4315183
> Reviewed-by: Aravind Vasudevan <aravindvasudev@google.com>
> Commit-Queue: Bruce Dawson <brucedawson@chromium.org>

Bug: 1207012
Change-Id: If542cac21d8ec8704b28d03fd8407c5c2899ca2c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4317177
Reviewed-by: Aravind Vasudevan <aravindvasudev@google.com>
Commit-Queue: Aravind Vasudevan <aravindvasudev@google.com>
Auto-Submit: Josip Sokcevic <sokcevic@chromium.org>
2 years ago
Josip Sokcevic d4c6cbeb61 Revert "Remove Python 2 support for PRESUBMIT.py"
This reverts commit 8454fc2458.

Reason for revert: post submit hooks failing
https://crbug.com/1422416

Original change's description:
> Remove Python 2 support for PRESUBMIT.py
>
> The presubmit system still supports invoking PRESUBMIT.py files using
> Python 2. This has recently been turned off on the bots so this change
> removes support more completely.
>
> There are still some python3 parameters being passed around - it seemed
> better to do the simplest possible removal now, with a follow-up change
> to remove more support code after this has sat for a while.
>
> Tests run from PRESUBMIT.py files could still be run using Python 2, but
> those should also have been addressed already. Removing support for that
> will be done in a subsequent change.
>
> Bug: 1207012
> Change-Id: Id244d547a04438f83734dba269c3cc180c148b37
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4315183
> Reviewed-by: Aravind Vasudevan <aravindvasudev@google.com>
> Commit-Queue: Bruce Dawson <brucedawson@chromium.org>

Bug: 1207012
Bug: 1422416
Change-Id: Iaf3102e63ec3c698d0258fac5746dbd92c30edbb
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4317176
Auto-Submit: Josip Sokcevic <sokcevic@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
2 years ago
Bruce Dawson 8454fc2458 Remove Python 2 support for PRESUBMIT.py
The presubmit system still supports invoking PRESUBMIT.py files using
Python 2. This has recently been turned off on the bots so this change
removes support more completely.

There are still some python3 parameters being passed around - it seemed
better to do the simplest possible removal now, with a follow-up change
to remove more support code after this has sat for a while.

Tests run from PRESUBMIT.py files could still be run using Python 2, but
those should also have been addressed already. Removing support for that
will be done in a subsequent change.

Bug: 1207012
Change-Id: Id244d547a04438f83734dba269c3cc180c148b37
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4315183
Reviewed-by: Aravind Vasudevan <aravindvasudev@google.com>
Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
2 years ago
Josip Sokcevic 7958e30579 Revert "Move scm.py to lib/"
This reverts commit 688adfe276.

Reason for revert: breaks try jobs

Original change's description:
> Move scm.py to lib/
>
> It belongs there.
>
> Change-Id: I286b50c43c587c39557fc508175efbd4b0f51d51
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4289680
> Reviewed-by: Joanna Wang <jojwang@chromium.org>
> Commit-Queue: Josip Sokcevic <sokcevic@chromium.org>

Change-Id: I662907b8bb4b2e7db82409bd34c3905db7961a12
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4300261
Commit-Queue: Josip Sokcevic <sokcevic@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
2 years ago
Josip Sokcevic 688adfe276 Move scm.py to lib/
It belongs there.

Change-Id: I286b50c43c587c39557fc508175efbd4b0f51d51
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4289680
Reviewed-by: Joanna Wang <jojwang@chromium.org>
Commit-Queue: Josip Sokcevic <sokcevic@chromium.org>
2 years ago
Joanna Wang 5051ffee8a Enroll infra repos in stacked changes dogfood.
Bug: b/265929888
Change-Id: Ie4315fd110d5cdedb62dfc001ed5073c5bed4cfd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4300858
Commit-Queue: Joanna Wang <jojwang@chromium.org>
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
2 years ago
Joanna Wang 7603f04d42 Add external changes for stacked-changes dogfood.
Bug: b/265929888

Change-Id: Idc280549c7e41d6665173ef566637b48c2980e09
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4300530
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Joanna Wang <jojwang@chromium.org>
2 years ago
Joanna Wang 74c53b6222 Allow for reusing the `main`/`master` branch.
Bug: 1416631
Change-Id: I498e54e46c4ce97cb5f7f43f1f484640e74ada44
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4300529
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Joanna Wang <jojwang@chromium.org>
2 years ago
Joanna Wang d75fc885fd [stacked-changes] Enforce -f and add --cherry-pick-stacked to skip interaction.
Bug: 1420363
Change-Id: I9b58f0126e05a558b42721222014392e9b527a25
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4298829
Commit-Queue: Joanna Wang <jojwang@chromium.org>
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
2 years ago
Josip Sokcevic 512fd3bd85 Extract searching relevat files in utils function
This change introduces lib/ directory which will be used for classes
that are considered libraries and used by multiple executables.

Change-Id: I3da126778bf5ffdb28d7a3c2b966c85de08ba717
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4289679
Reviewed-by: Joanna Wang <jojwang@chromium.org>
Commit-Queue: Josip Sokcevic <sokcevic@chromium.org>
2 years ago
Joanna Wang b54d0f013b Only trigger stacked changes dogfood path when in squash mode.
Bug: 1419551
Change-Id: Idbc345798ba81c3e1abd2038db8fadbef0b7391e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4291331
Commit-Queue: Josip Sokcevic <sokcevic@chromium.org>
Auto-Submit: Joanna Wang <jojwang@chromium.org>
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
2 years ago
Victor Hugo Vianna Silva dd03016926 Don't prompt for confirmation in `git cl upload --dependencies`
This is a pretty intentional command, I don't see why the confirmation
would be required.

Bug: None
Change-Id: I111bb39e3b5f467901be5c986847ace3c6efa7ee
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4261467
Commit-Queue: Josip Sokcevic <sokcevic@chromium.org>
Auto-Submit: Victor Vianna <victorvianna@google.com>
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
2 years ago
Joanna Wang 6b98cdcbc1 Check for detached HEAD state.
Bug: 1416683
Change-Id: I538715d05170662001ac7193a86dbd2e7f50e3f2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4258505
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Josip Sokcevic <sokcevic@chromium.org>
Auto-Submit: Joanna Wang <jojwang@chromium.org>
2 years ago
Joanna Wang 6215dd0365 stacked-changes: Skip empty branches.
Changes:
- _UploadAllPrecheck() returns a list of cls to upload that skips any empty commits in the stack.
- If the current branch is empty, we throw an error.
- UploadAllSquashed() now computes the parent to use for the squashed and cherry-pick flow.
  - for cherry-pick it uses the gerrit_squash_hash of the next cl in `cls`. This means it could be the gerrit_squash_hash of the direct ancestor OR the closest non-empty ancestor branch.
  - for multiple squashed commits, the first parent passed in is either:
     - the closest ancestor with a gerrit_squash_hash OR the common ancestor shared with the root of the tree.
- PrepareSquashedCommit() and PrepareCherryPick() now both require a parent passed in.

Bug:1411878, b/265929888
Change-Id: I7dba289defb40ed0464eabdb7e90810353ef155f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4220412
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Joanna Wang <jojwang@chromium.org>
Reviewed-by: Gavin Mak <gavinmak@google.com>
2 years ago
Joanna Wang c4ac30261d Revert auto-cc behavior back to original and fix comments.
Bug: 1411521, b/265929888
Change-Id: I2d5908f4fb54ad11914d061539c4677e8320c163
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4205471
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Joanna Wang <jojwang@chromium.org>
2 years ago
Joanna Wang 562481d6a9 Add dogfood path.
- don't use `wip` as default for all dogfood changes
- don't use description hashtags for all dogfood changes

Bug: b/265929888
Change-Id: Ie19dedc980268e8a8d7ccf72c63b2a02790fb5bb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4198118
Commit-Queue: Joanna Wang <jojwang@chromium.org>
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
2 years ago
Joanna Wang dd12deb5f5 Check for stacked changes dogfood var.
Bug:b/265929888
Change-Id: Ibf1203994dea6e9db72fe4a954a2f6f24e30105b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4197875
Commit-Queue: Joanna Wang <jojwang@chromium.org>
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
2 years ago
Joanna Wang c023a6302f Always set issue for branch, not just when newbranch is passed.
Bug: 1410392
Change-Id: Ib9842a4924a6df486dc8b0ee37e673286139f62a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4196054
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Auto-Submit: Joanna Wang <jojwang@chromium.org>
Commit-Queue: Josip Sokcevic <sokcevic@chromium.org>
2 years ago
Joanna Wang 44e9bee34f Allow --force to be used in cl patch with --reapply
Bug: b/265929888
Change-Id: I7ed00d70d18463b3394915ae4c74f853d05cb88d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4191996
Commit-Queue: Joanna Wang <jojwang@chromium.org>
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
2 years ago
Joanna Wang c710e2d56a Connect new stacked changes implementation.
Bug: b/265929888
Change-Id: I89f669d9d0a11f09a89c378222e6780ac9fcec34
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4189199
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Joanna Wang <jojwang@chromium.org>
2 years ago
Joanna Wang 4049791e10 Create PostUploadUpdates func.
Bug: b/265929888
Change-Id: If74949bfb6aafefc789d4e5e025ec15e81197380
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4189838
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Joanna Wang <jojwang@chromium.org>
Reviewed-by: Gavin Mak <gavinmak@google.com>
2 years ago
Joanna Wang a8db0cbb86 Remove unused git cl upload args.
Bug: b/266235601

Change-Id: Iedefc213640faa664b05396565a4c158bfaa4403
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4166483
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Joanna Wang <jojwang@chromium.org>
2 years ago
Joanna Wang a1abbeda6b [stacked-changes] Add refspec func.
Bug: b/265929888
Change-Id: Ie8bd21b4f1b43a40f303dc1c93fc58becc76f9e4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4182845
Commit-Queue: Joanna Wang <jojwang@chromium.org>
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
2 years ago
Joanna Wang b88a4343de [stacked-changes] Prepare squashed commit
Bug: b/265929888
Change-Id: Ia492666a5707996d94a4b6f7668ceaeb0eda8c39
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4182841
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Joanna Wang <jojwang@chromium.org>
Reviewed-by: Gavin Mak <gavinmak@google.com>
2 years ago
mlcui 7a0b4cb1e7 git_cl: Fix crashes when using --no-squash with detached HEAD
Bug: None
Change-Id: If69d4f558bd01c439a68dfdab76755487b58dca0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4183546
Reviewed-by: Dirk Pranke <dpranke@google.com>
Commit-Queue: Michael Cui <mlcui@google.com>
2 years ago
Joanna Wang e852391441 [stacked_changes] Create cherry-picked commit.
Bug:b/265929888
Change-Id: I4277474c1f09e4ac6ea6ebb5d9d340f22365f542
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4178924
Reviewed-by: Gavin Mak <gavinmak@google.com>
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Joanna Wang <jojwang@chromium.org>
2 years ago
Joanna Wang b46232e729 [stacked_changes] Add Changelist._PrepareChange() common func called before creating commits.
Bug: b/265929888
Change-Id: I18a0c5ba6757aef91e750b9703079c96b090dc1e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4178920
Commit-Queue: Joanna Wang <jojwang@chromium.org>
Reviewed-by: Gavin Mak <gavinmak@google.com>
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
2 years ago