3 # Script for generating a list of candidates for cherry-picking to a stable branch
7 # $ bin/get-pick-list.sh
8 # $ bin/get-pick-list.sh > picklist
9 # $ bin/get-pick-list.sh | tee picklist
11 # The output is as follows:
12 # [nomination_type] commit_sha commit summary
14 is_stable_nomination
()
16 git show
--summary "$1" |
grep -q -i -o "CC:.*mesa-stable"
21 git show
--summary "$1" |
grep -q -i -o "CC:.*mesa-dev"
24 # Use the last branchpoint as our limit for the search
25 latest_branchpoint
=`git merge-base origin/master HEAD`
27 # Grep for commits with "cherry picked from commit" in the commit message.
28 git log
--reverse --pretty=medium
--grep="cherry picked from commit" $latest_branchpoint..HEAD |\
29 grep "cherry picked from commit" |\
30 sed -e 's/^[[:space:]]*(cherry picked from commit[[:space:]]*//' -e 's/)//' > already_picked
32 # Grep for commits that were marked as a candidate for the stable tree.
33 git log
--reverse --pretty=%H
-i --grep='^CC:.*mesa-stable\|^CC:.*mesa-dev' $latest_branchpoint..origin
/master |\
36 # Check to see whether the patch is on the ignore list.
37 if [ -f bin
/.cherry-ignore
] ; then
38 if grep -q ^
$sha bin
/.cherry-ignore
; then
43 # Check to see if it has already been picked over.
44 if grep -q ^
$sha already_picked
; then
48 if is_stable_nomination
"$sha"; then
50 elif is_typod_nomination
"$sha"; then
56 printf "[ %8s ] " "$tag"
57 git
--no-pager show
--summary --oneline $sha