Age | Commit message (Collapse) | Author |
|
Original change: https://android-review.googlesource.com/c/platform/tools/repohooks/+/2621057
Change-Id: I86ab7851460c8499a38a513df1cbb9131172d67f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
|
|
|
|
Original change: https://android-review.googlesource.com/c/platform/tools/repohooks/+/2744953
Change-Id: Icc891c4b1a88baffc6a4aa5194033b41c0e66b09
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
|
|
This is a named tuple, so we need to replace the value, not set it.
Bug: 299373007
Test: None
Change-Id: I86eb65c484878c11c2f02b6a0c6212943895f922
|
|
am: 904ef56283
Original change: https://android-review.googlesource.com/c/platform/tools/repohooks/+/2713953
Change-Id: Iaf5f1859d0e6a581d47a9aea9b2b793eedd94b1d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
|
|
|
|
Stop treating warnings as errors, and fix the reporting to run if
the result is a warning or an error.
Bug: 294133100
Test: unittests
Change-Id: Ic238b910a215ae5ec7c7c590299b2403b77c99d5
|
|
into main am: ed904c8a33
Original change: https://android-review.googlesource.com/c/platform/tools/repohooks/+/2651170
Change-Id: I6a9b36bcc5dbdbc32c8644e7caa4d9187e53f4d6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
|
|
into main
|
|
The indent of the example message printed for a multiline commit
is misleading. Simply following the error message would cause
`repo upload` to fail since the subsequent lines are not indented.
Bug: 290051295
Change-Id: I613b4b51f6ff3a4ab3cde034362344519341abf9
|
|
6131d44085
Original change: https://android-review.googlesource.com/c/platform/tools/repohooks/+/2654201
Change-Id: If2a6dcb0563f32d51ca79791b1e4d22ef6b9952b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
|
|
|
|
c13f6bfa45
Original change: https://android-review.googlesource.com/c/platform/tools/repohooks/+/2654235
Change-Id: I64fde7f799265df3c702867032d89f9b2cf45c58
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
|
|
It wasn't matching files correctly when the `aidl_api` directory was at the base of the git repository. In those cases the file name shows up as `aidl_api/path/to/files` and doesn't have the path separator in front of `aidl_api/`.
Test: upload aosp/2653183
Bug: None
Change-Id: Id87a0111f76a46c8cc84a3af57d3cb1deeb54814
|
|
By defaulting mode to 'some', the user will have a prompt confirmation
before the hook being run.
Currently it is run silently by default
Bug: None
Test: upload change with single hook to run
Change-Id: Iacb7cb2b9b5d571ef10e61891545ceebfcf68a8e
|
|
Original change: https://android-review.googlesource.com/c/platform/tools/repohooks/+/2621055
Change-Id: I987c446c1533f85d38d5fb39cbb50f0e7d929853
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
|
|
Original change: https://android-review.googlesource.com/c/platform/tools/repohooks/+/2621054
Change-Id: I67c487401791efb38013fc29d3c2d0290d04f4d1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
|
|
Now that we accumulate & return all the hook results for all projects,
we can easily summarize & prompt the user whether they want to run any
or all of them. We still have the problem of some fixups might clash
(e.g. if multiple commits introduce multiple errors), but there can be
scenarios where the fixups don't clash. We leave this decision to the
user so they can figure out what makes sense for their setup.
Bug: 274529930
Test: unittests
Change-Id: Ib6a42cf4fdb0165d9cae779cef7599ef604fbf59
|
|
`bpfmt -l` just shows "<standard input>" when there's a formatting error
which isn't super useful to users. Switch to `bpfmt -d` to get an actual
diff of broken formatting.
Also hoist the definition of fixup_cmd outside the loop since it doesn't
change between runs anymore -- the set of files is passed via the results
object now.
Bug: 132785638
Test: unittests
Change-Id: I9d564ac4b7fd3801b73b5c6869a2529f337cc3f0
|
|
This allows people to quickly run fixup commands themselves if they
want. This is helpful as we only offer to run the command if there
is one fixup in the latest commit.
Show these as a summary at the end so hopefully it's a little easier
for users to access if they want to copy & paste the command.
Bug: 274529930
Test: unittests
Change-Id: I75b9c196a5369874fac94e822ec87e72f804cb9a
|
|
Original change: https://android-review.googlesource.com/c/platform/tools/repohooks/+/2636770
Change-Id: I33b276034c7e33bbe697fe11453ef93814c55666
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
|
|
Original change: https://android-review.googlesource.com/c/platform/tools/repohooks/+/2636769
Change-Id: I7a7a70192e5f2fa414d92352dceb03ff45d7ef55
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
|
|
Original change: https://android-review.googlesource.com/c/platform/tools/repohooks/+/2634960
Change-Id: Iab5aefda34830c12b96b547c21b1edae31fd2e88
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
|
|
Run all the hooks in parallel using Python futures. In the repohooks
tree with 12 commits, this cuts execution time from ~51 to ~31 secs.
In the libbrillo tree with 1 commit, it's still faster by a few
10's of msec. So this doesn't seem like it negatively impacts even
small sets of commits, while larger chains are a huge improvement.
Bug: None
Test: `./pre-upload.py` works and is faster
Change-Id: I347e5bdcd6206a768219769c51a6ddbaefefa44e
|
|
Currently the hook status line shows how many hooks have been run,
and what the current hook being executed is. This is fine for a
single-threaded model, but is confusing if we want to run hooks in
parallel. So flip the status to show all the running and pending
hooks. This is a bit more verbose, but it's the only way to really
represent the work that is being done.
In practice, many of the hooks are very fast, so the long line will
collapse very quickly to something more manageable. If the line is
too long for the current terminal, we will chop it.
Old:
[RUNNING 2/13] hooks_unittest
New:
[RUNNING 4/13] shell_unittest, config_unittest, utils_unittest, ...
Bug: None
Test: `./pre-upload.py` output
Change-Id: I280682c93ae4164adf210ba5d4a54867af377e85
|
|
Original change: https://android-review.googlesource.com/c/platform/tools/repohooks/+/2621058
Change-Id: I31c85fa5481a304bd4554405e934ddaaba0692b8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
|
|
Original change: https://android-review.googlesource.com/c/platform/tools/repohooks/+/2621056
Change-Id: If9aebb9652fa531f05aa5a5fd753eb3c6ed7311c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
|
|
Filter the set of hooks as soon as we have all the info we need.
If all the hooks are filtered, we can exit sooner. Otherwise,
present a more accurate summary to users as to how many hooks
we'll actually be running.
Since we no longer need the scope in the main loop, switch to
processing the NamedTuple directly so we don't have to unpack
every field in it.
Bug: 160223496
Test: unittests
Change-Id: I63d65a9034a6d4ca6d70b158ceab7c6f5861f326
|
|
|
|
Since gofmt iterates over the filtered set of files by hand, and
reads it from the git commit to run through the formatter, we don't
want to expand the list of files into the base command. If they
end up there, gofmt will run on them as they exist on disk, not on
the content as they exist in the git commit.
Also make sure to pass the set of custom gofmt arguments to the
fixup command so it gets run correctly.
Bug: 116112526
Test: unittests
Change-Id: I3615afa97817482c4e0482053fa308bed8c8d12b
|
|
Rely on the common framework to display & run fixup commands.
Bug: None
Test: unittests
Change-Id: I1242e0a9cf4bc160b0e20aed1bf16d606aa3ddc9
|
|
e7cbdee817
Original change: https://android-review.googlesource.com/c/platform/tools/repohooks/+/2621052
Change-Id: I9b1535a413ef7aa21c49cdcf879bd7db19318252
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
|
|
Original change: https://android-review.googlesource.com/c/platform/tools/repohooks/+/2621729
Change-Id: I2fe971a4fe53c58a3ed04a88903e24261bcc6b66
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
|
|
Rather than normalize everything into a bool early on, and then make
it hard to keep track of results across projects, and force creation
of a parallel structure to hold fixup commands, create a new results
object to hold everything and pass that back up the chain.
For now, this is just restructuring, and upload continues to behave
the same. But this will make it much easier to change the UX.
Bug: None
Test: unittests
Change-Id: Idfa545f02f3d26a893d6cbbdef6d9a2409e72813
|
|
Original change: https://android-review.googlesource.com/c/platform/tools/repohooks/+/2617576
Change-Id: I203bee471f75c44ce1450599614920e72f1ccf1c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
|
|
We might not be able to rebind signals if we're running in a thread,
so ignore ValueError when setting the handler.
Bug: None
Test: unittests
Change-Id: I81a222bf00ff433c8570bb7058871817f15da003
|
|
|
|
Original change: https://android-review.googlesource.com/c/platform/tools/repohooks/+/2621053
Change-Id: Icba5c60d20d61378123fce930eb0ad1e0c395b7d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
|
|
Original change: https://android-review.googlesource.com/c/platform/tools/repohooks/+/2617316
Change-Id: I96f7947692b5be53191b5f90f90527befa10ec80
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
|
|
Rely on the common framework to display & run fixup commands.
Bug: None
Test: unittests
Change-Id: Id3714df6b6c5c2654cf43cff78fb8226e4ec3629
|
|
Exit gracefully when the user interrupts us with direct execution.
Bug: None
Test: `./pre-upload.py` and then Ctrl+C
Change-Id: I43f0938e8f46d37048cfd8f8c050d0b8499538c1
|
|
Original change: https://android-review.googlesource.com/c/platform/tools/repohooks/+/2617658
Change-Id: I51a706d309d8b2666bc2508c891eb286e94bb84a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
|
|
Original change: https://android-review.googlesource.com/c/platform/tools/repohooks/+/2621051
Change-Id: I919534aa3db89e2290698d62e072a17be44f2648
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
|
|
Original change: https://android-review.googlesource.com/c/platform/tools/repohooks/+/2620900
Change-Id: I6938084663f4a5e4559b0e8aac500d4ce729c482
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
|
|
When uploading multiple commits, it can be nice to see how many
there are left to go.
Bug: None
Test: unittests
Change-Id: I2e9c84eabd5c364a4ac87a6d862678263d62b3da
|
|
All of the fixup funcs just run an external command. This makes it
difficult to harmonize output, and leads to duplicated logic. Switch
to storing the fixup command that would be run. This doesn't change
any behavior currently, just refactoring to make it easier to make
followup changes.
Bug: None
Test: unittests
Change-Id: Ib9e56bc46116997862b25362c49a617326b8909b
|
|
This will make it easier to add common behavior after we've processed
all projects regardless of how many there are.
Bug: None
Test: unittests
Change-Id: I890db0ed156eaa014a71aac813a1379465049041
|
|
Original change: https://android-review.googlesource.com/c/platform/tools/repohooks/+/2618674
Change-Id: I6aac87a02a787ea600bbe576d256f6cf5a13a650
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
|
|
Original change: https://android-review.googlesource.com/c/platform/tools/repohooks/+/2617656
Change-Id: I34f6c420c01516547da770648ed9e4f8ef187eed
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
|
|
Original change: https://android-review.googlesource.com/c/platform/tools/repohooks/+/2620897
Change-Id: I48b2af1abca9ad2e4caaf7815af1b63091bcdd23
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
|