Age | Commit message (Collapse) | Author |
|
After any sort of modification, we have to conduct a full cleanup
of the workspace. While it's still possible to have a panic
cause no cleanup, this is an improvement over the previous work,
where cleanup could fail during the transpose stage.
Also add a --wip mode to prevent spamming people with emails
during testing.
BUG=b:209493133
TEST=Running patch_sync transpose locally
Change-Id: I01e8a5897ec8eeed8f90c528c567b2ba55613b23
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/3407914
Reviewed-by: George Burgess <gbiv@chromium.org>
Tested-by: Jordan Abrahams-Whitehead <ajordanr@google.com>
Commit-Queue: Jordan Abrahams-Whitehead <ajordanr@google.com>
|
|
On chrotomation, we still use Rust 1.55.
Rust 1.55 does not have the "from" implementation for arrays,
so we must build the BTrees by hand.
Additionally, this removes the requirement for having the
review strings be set.
BUG=b:209493133
TEST=cargo check
Change-Id: I6bc16e96cd56775c8c80667395f3dc3fb4857356
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/3403387
Tested-by: Jordan Abrahams-Whitehead <ajordanr@google.com>
Reviewed-by: George Burgess <gbiv@chromium.org>
Commit-Queue: Jordan Abrahams-Whitehead <ajordanr@google.com>
|
|
At present, patch_sync show merges two PATCHES.json files by
merging their platform contents. However, because of timing,
review latency, or just patches being denied, it's possible that
one repo recommends a patch being applied to a certain platform,
and the other denies that same patch.
To resolve this conflict, this commit by default only considers
patches that exist in the PATCHES.json file at the present time.
The original behaviour can be enabled by turning on --keep-unmerged.
BUG=b:209493133
TEST=patch_sync show <...cros> <...android>
TEST=patch_sync transpose --dry-run -s <...>
Change-Id: I3bdf6c36b4dbfe26d4221191b5c22363a7f0dfe0
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/3388390
Reviewed-by: George Burgess <gbiv@chromium.org>
Tested-by: Jordan Abrahams-Whitehead <ajordanr@google.com>
Commit-Queue: Jordan Abrahams-Whitehead <ajordanr@google.com>
|
|
This commit introduces better patch filtering. Specifically,
* it prevents patches from being reintroduced to repos which
already have those patches in their own PATCHES.json.
* it only applies android patches which are within the
desired version range.
BUG=b:209493133
TEST=patch_sync transpose --no-commit -s <...>
Change-Id: I667a095395a36edf290e5e652ae40efaa2df7d57
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/3382194
Reviewed-by: George Burgess <gbiv@chromium.org>
Tested-by: Jordan Abrahams-Whitehead <ajordanr@google.com>
Commit-Queue: Jordan Abrahams-Whitehead <ajordanr@google.com>
|
|
Previously, the find_ebuild function could return the original
ebuild instead of the llvm symlink. This would lead to incorrect
uprevs, depending on how the file system returned the order of
the files.
Adds a test case to prevent this from happening in the future.
BUG=b:209493133
TEST=cargo test
Change-Id: Ia47ecee2a9c5b6ce0559e316c5227f70dcf87833
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/3379482
Reviewed-by: George Burgess <gbiv@chromium.org>
Tested-by: Jordan Abrahams-Whitehead <ajordanr@google.com>
Commit-Queue: Jordan Abrahams-Whitehead <ajordanr@google.com>
|
|
This commit attempts to remove duplicated code between
Android and CrOS, as the complexity between this duplicated
code exceeded the scope of the main file.
Also adds display_patches code.
This is to pretty print what patches are getting applied and
to where. Only enabled if --verbose is on.
Also does some minor function cleanup in version_control.rs.
BUG=b:209493133
TEST=cargo test
TEST=patch_sync transpose --dry-run --verbose <...>
Change-Id: I63410160ff5159f4c079ac1cc189674fe3fc02a0
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/3379481
Reviewed-by: George Burgess <gbiv@chromium.org>
Tested-by: Jordan Abrahams-Whitehead <ajordanr@google.com>
Commit-Queue: Jordan Abrahams-Whitehead <ajordanr@google.com>
|
|
These were out of alphabetical order, and serde_json would write
them in the incorrect order to the PATCHES.json file.
Additionally, the `platforms` field may end up
being null after some discussion with the Android team.
This converts platforms to an Optional accordingly.
BUG=b:209493133
TEST=patch_sync transpose <...>
Change-Id: I7c0b2e984d713698a0ed53e7f36b38bef1a49d1c
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/3379480
Reviewed-by: George Burgess <gbiv@chromium.org>
Tested-by: Jordan Abrahams-Whitehead <ajordanr@google.com>
Commit-Queue: Jordan Abrahams-Whitehead <ajordanr@google.com>
|
|
This adds several important version control features:
* Changes branches on set up.
* Cleans up any changes made, even if upload fails.
* Sends commits for review (enabled via CLI).
* Enables CQ for CrOS.
BUG=b:209493133
TEST=cargo test
Change-Id: I8ab2650aae301c08fd80358162a285e46d44e3e1
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/3379479
Reviewed-by: George Burgess <gbiv@chromium.org>
Commit-Queue: Jordan Abrahams-Whitehead <ajordanr@google.com>
Tested-by: Jordan Abrahams-Whitehead <ajordanr@google.com>
|
|
This commit allows the git commands to print out
what the command was that they failed at. This
is pretty helpful in debugging what went wrong.
We don't capture the repo output ever, so that
can remained piped to the terminal. But we
need to do some trickery for the git cmd.
BUG=b:209493133
TEST=None
Change-Id: I389257fef1e3bf394fb4013588df6c78e83b733a
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/3379478
Reviewed-by: George Burgess <gbiv@chromium.org>
Reviewed-by: Michael Benfield <mbenfield@google.com>
Tested-by: Jordan Abrahams-Whitehead <ajordanr@google.com>
Commit-Queue: Jordan Abrahams-Whitehead <ajordanr@google.com>
|
|
Because some patch collections may contain
patches which don't apply to our given platform,
we don't want to attempt to lookup their hashes.
If we do, we may encounter a file-not-found error,
as those patches haven't been ported to this
platform.
Also fixes a bug where no_commit was inverted.
BUG=b:209493133
TEST=N/A
Change-Id: I8b86133dfc6361919174f9f9b392d756b4304d2b
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/3364792
Reviewed-by: George Burgess <gbiv@chromium.org>
Tested-by: Jordan Abrahams-Whitehead <ajordanr@google.com>
Commit-Queue: Jordan Abrahams-Whitehead <ajordanr@google.com>
|
|
This allows users to view the combined PATCHES.json,
also known as the source of truth.
Also makes some changes so that serializing the patches
vec to a string is more natural.
BUG=b:209493133
TEST=cargo test
TEST=patch_sync show -s <cros_checkout> <android_checkout>
Change-Id: Ic2054c0c3c7e0bb03b698339b75e9ccc6dd68c74
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/3355361
Reviewed-by: Michael Benfield <mbenfield@google.com>
Tested-by: Jordan Abrahams <ajordanr@google.com>
Commit-Queue: Jordan Abrahams <ajordanr@google.com>
|
|
At present, the patch_sync code does nothing as the base version
only sets up the code for future reviews.
This adds in the ability to parse the PATCHES.json files, check
the differences across past versions, and transpose those patches
to another repo.
This parsing assumes the PATCHES.json now use the uniform schema,
which the AOSP currently does, but CrOS may not by the time this
commit lands.
BUG=b:209493133
TEST=cargo build
TEST=cargo test
Change-Id: I8de01eae3d9555dbb000378516a5bf38e29fea8e
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/3339405
Reviewed-by: George Burgess <gbiv@chromium.org>
Tested-by: Jordan Abrahams <ajordanr@google.com>
Commit-Queue: Jordan Abrahams <ajordanr@google.com>
|
|
This is the base code addition for the patch_sync project. This
project attempts to synchronize LLVM patches and ChromeOS. This
code is not meant to run, but simply be the starting point so
that we break up the large code dump.
This code is meant to compile, but is not meant to be run. It
only adds the version control code which manages `repo`
interactions.
Additionally, this adds the full Cargo.toml (at least for
the current patch stack).
BUG=b:209493133
TEST=cargo build
Change-Id: I903edba6e633ec53a7fa4d2e7b0c2aac1094933a
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/3339404
Reviewed-by: George Burgess <gbiv@chromium.org>
Tested-by: Jordan Abrahams <ajordanr@google.com>
Commit-Queue: Jordan Abrahams <ajordanr@google.com>
|