Subversion Repositories Kolibri OS

Rev

Rev 4358 | Blame | Last modification | View Log | RSS feed

  1. #!/bin/sh
  2.  
  3. # Script for generating a list of candidates for cherry-picking to a stable branch
  4. #
  5. # Usage examples:
  6. #
  7. # $ bin/get-pick-list.sh
  8. # $ bin/get-pick-list.sh > picklist
  9. # $ bin/get-pick-list.sh | tee picklist
  10.  
  11. # Grep for commits with "cherry picked from commit" in the commit message.
  12. git log --reverse --grep="cherry picked from commit" origin/master..HEAD |\
  13.         grep "cherry picked from commit" |\
  14.         sed -e 's/^[[:space:]]*(cherry picked from commit[[:space:]]*//' -e 's/)//' > already_picked
  15.  
  16. # Grep for commits that were marked as a candidate for the stable tree.
  17. git log --reverse --pretty=%H -i --grep='^\([[:space:]]*NOTE: .*[Cc]andidate.*9\.2\|CC:.*9\.2.*mesa-stable\)' HEAD..origin/master |\
  18. while read sha
  19. do
  20.         # Check to see whether the patch is on the ignore list.
  21.         if [ -f bin/.cherry-ignore ] ; then
  22.                 if grep -q ^$sha bin/.cherry-ignore ; then
  23.                         continue
  24.                 fi
  25.         fi
  26.  
  27.         # Check to see if it has already been picked over.
  28.         if grep -q ^$sha already_picked ; then
  29.                 continue
  30.         fi
  31.  
  32.         git log -n1 --pretty=oneline $sha | cat
  33. done
  34.  
  35. rm -f already_picked
  36.