Page MenuHomeFreeBSD

D34208.id102509.diff
No OneTemporary

D34208.id102509.diff

Index: tools/tools/git/find-mfc.sh
===================================================================
--- /dev/null
+++ tools/tools/git/find-mfc.sh
@@ -0,0 +1,52 @@
+#!/bin/sh
+
+from_branch=freebsd/main
+to_branch=freebsd/stable/13
+author=$USER
+
+usage()
+{
+ echo "usage: $(basename $0) [-ah] [-f from_branch] [-t to_branch] [-u user] [path ...]"
+ exit 0
+}
+
+while getopts "af:ht:u:" opt; do
+ case $opt in
+ a)
+ author=
+ ;;
+ f)
+ from_branch=$OPTARG
+ ;;
+ h)
+ usage
+ ;;
+ t)
+ to_branch=$OPTARG
+ ;;
+ u)
+ author=$OPTARG
+ ;;
+ esac
+done
+shift $(($OPTIND - 1))
+
+authorarg=
+if [ -n "$author" ]; then
+ authorarg="--author $author --committer $author"
+fi
+
+# Commits in from_branch after branch point
+git rev-list --first-parent $authorarg $to_branch..$from_branch "$@" |\
+ sort > from_list
+
+# "cherry picked from" hashes from commits in to_branch after branch point
+git log $authorarg $from_branch..$to_branch --grep 'cherry picked from' "$@" |\
+ sed -E -n 's/^[[:space:]]*\(cherry picked from commit ([0-9a-f]+)\)[[:space:]]*$/\1/p' |\
+ sort > to_list
+
+comm -23 from_list to_list > candidates
+
+while read x; do
+ git show --pretty='%ct %h %s' --no-patch $x
+done < candidates | sort -n | cut -d ' ' -f 2-

File Metadata

Mime Type
text/plain
Expires
Tue, Apr 7, 6:38 AM (10 h, 53 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31016749
Default Alt Text
D34208.id102509.diff (1 KB)

Event Timeline