[RFC] Updating patchwork patches on commit
Siddhesh Poyarekar
siddhesh@gotplt.org
Mon Dec 7 05:48:22 GMT 2020
[Re-sending because I don't know how to type email addresses.]
Hi,
I have been running some hacked up scripts to update patch state on
patchwork for every commit that goes into the glibc repository. The
script simply walks through commits in a date range, hashes the diffs
from each ref (using patchwork/hasher.py) and compares it with hashes on
patchwork. If the patch as been committed with the diff unchanged, the
hashes match. This is very similar to the git hook that patchwork
ships[1], so I hope to eventually add this into the glibc git hook.
In the last run (2020-12-07), of the 33 commits went in since
2020-12-01, 19 were found in patchwork and 14 were missing. The week
before (2020-11-23 - 2020-12-01) it was 19 found and 9 missing.
This means that diffs of 14 patches were modified before committing. Our
commit policy explicitly allows this and trusts committers to limit
these changes to trivial fixes. However for patchwork usage to be
valuable (and in the process, improve transparency), a 1:1
correspondence between git commits and patchwork would be ideal. That
is, every commit on git should have at least one[2] patchwork entry.
This also solves the question "What finally went in?" I've had to ask
myself repeatedly when cleaning up patchwork state.
We could achieve this without additional busy work by having the git
hook send out [pushed] emails to the list in addition to glibc-cvs
(libc-alpha should be spared the private branch traffic of course)
whenever it sees a commit that it can't find on patchwork. A nightly
script can then trivially mark all [pushed] patches as committed.
Thoughts?
Siddhesh
[1]
https://github.com/getpatchwork/patchwork/blob/master/tools/post-receive.hook
[2] People have been known to send out identical patches repeatedly as
part of a series.
More information about the Libc-alpha
mailing list