Page MenuHomeFreeBSD

find-mfc: add a tool to find MFC candidates

Authored by emaste on Feb 8 2022, 7:52 PM.
Referenced Files
F88387356: D34208.diff
Sun, Jul 14, 4:49 PM
Unknown Object (File)
Wed, Jul 10, 5:06 AM
Unknown Object (File)
Sun, Jun 23, 8:04 AM
Unknown Object (File)
Sat, Jun 22, 4:24 PM
Unknown Object (File)
Jun 11 2024, 1:55 PM
Unknown Object (File)
Jun 8 2024, 7:52 PM
Unknown Object (File)
May 25 2024, 10:18 PM
Unknown Object (File)
May 21 2024, 7:19 AM

Diff Detail

Lint Skipped
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/ 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

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

manu added inline comments.

to_branch needs to be modifiable without editing the script.


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


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


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


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).


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.


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


Extra t


Thanks, fixed locally

rpokala added inline comments.

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.