Page MenuHomeFreeBSD

find-mfc: add a tool to find MFC candidates
ClosedPublic

Authored by emaste on Feb 8 2022, 7:52 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Oct 23, 12:03 PM
Unknown Object (File)
Oct 7 2024, 9:00 AM
Unknown Object (File)
Sep 30 2024, 2:11 PM
Unknown Object (File)
Sep 29 2024, 1:11 PM
Unknown Object (File)
Sep 26 2024, 6:48 PM
Unknown Object (File)
Sep 26 2024, 9:23 AM
Unknown Object (File)
Sep 23 2024, 1:28 PM
Unknown Object (File)
Sep 21 2024, 5:28 PM

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

emaste requested review of this revision.Feb 8 2022, 7:52 PM
emaste created this revision.

Example use - find my MFC candidates under sys/

$ sh tools/tools/git/find-mfc.sh sys
64a790d26480 DTrace: remove sparc64 remnants in non-contrib code
...
301b2b02dfcf snd_hda: restore pin patch for headphones on Lenovo X1 7th Gen
2075d00fabb6 hwpmc: drop 0x before %p printf format string
9c296a210573 geom: Add HiFive boot partitions
tools/tools/git/find-mfc.sh
51

This sorts by (but does not print) commit time - will comment

manu added inline comments.
tools/tools/git/find-mfc.sh
5

to_branch needs to be modifiable without editing the script.

42

Maybe uses mktemp for all the files created in this script ?

tools/tools/git/find-mfc.sh
5

cmd line: -t [to branch]

but perhaps we can invoke git symbolic-ref --short HEAD and if it looks like stable/X default to freebsd/stable/X

42

yeah, should do.
this started out as a one-off script in my working directory

tools/tools/git/find-mfc.sh
45

I probably want to drop $authorarg here, actually -- we also want to exclude from the list commits that were MFC'd by someone else.

use a tmpdir as manu suggests

As suggested on IRC: would be nice to have a '-X' option to take an input file that is a list of commits to ignore. I already use such a file now to manually filter. It would be nice if the format of this file was the same as the output of this tool so that one could just copy and paste lines for commits one wants to ignore in the future. (E.g. <hash> <descript> but just use cut or the like to pull the hash from the exclude file).

tools/tools/git/find-mfc.sh
39

Do you want similar logic for merging to releng/X.Y (default from_branch stable/X in that case?)

As suggested on IRC: would be nice to have a '-X' option to take an input file that is a list of commits to ignore.

Good idea, I'll work on that in a bit. If folks are happy enough with this in general I'll commit the current version and follow up with that.

tools/tools/git/find-mfc.sh
39

Ah yes

use releng branches as merge-to candidates also

emaste added subscribers: rew, andrew.

anchor user with < and @ so that -u rew matches only @rew, not @andrew or anyone else with "rew" in their author string

determine default stable branch corresponding to releng

tools/tools/git/find-mfc.sh
31

Extra t

tools/tools/git/find-mfc.sh
31

Thanks, fixed locally

rpokala added inline comments.
tools/tools/git/find-mfc.sh
108

Per IRC, these are patterns, so it's matching the name component of an email address. Please comment accordingly.

Thanks, definitely worth getting into the tree and iterating on further there if needed.

This revision is now accepted and ready to land.Apr 28 2022, 5:09 PM
This revision was automatically updated to reflect the committed changes.