Index: utils/release/list-merge-requests.sh =================================================================== --- /dev/null +++ utils/release/list-merge-requests.sh @@ -0,0 +1,104 @@ +# !/bin/bash +#===-- list-merge-requests.sh ---------------------------------------------===# +# +# The LLVM Compiler Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. +# +#===------------------------------------------------------------------------===# +# +# Helper routines for release scripts. +# +#===------------------------------------------------------------------------===# +source release-helpers.sh + +BUGZILLA_BIN=`which bugzilla` +bugzilla_url="https://bugs.llvm.org/xmlrpc.cgi" +BUGZILLA_CMD="$BUGZILLA_BIN --bugzilla=$bugzilla_url" +release_version="" +list_all=0 + +usage() { + echo "usage: `basename $0` -release x.y.z [OPTIONS]" + echo " -release Release version x.y.z" + echo " -emails Print the email addresses of bug assignees" + echo " -list-all List bugs that may be release blockers but don't " + echo " explictly block the metabug or may have been " + echo " accidently marked as resolved." +} + + +while [ $# -gt 0 ]; do + case $1 in + -release) + shift + release_version="$1" + ;; + -emails) + do_emails=1 + ;; + -list-all) + list_all=1 + ;; + *) + echo "unknown option: $1" + echo "" + usage + exit 1 + esac + shift +done + +set_release_metabug "$release_version" + +echo "Blocking Bugs:" +echo "" +base_query_string="$BUGZILLA_CMD query --blocked $release_metabug -s NEW,ASSIGNED,REOPENED" +$base_query_string \ + --outputformat "llvm.org/PR%{id}|%{assigned_to}|%{last_change_time}|%{summary}" \ + | sort -t '|' -k 3 \ + | column -s '|' -t \ + | cut -c -130 + +echo $bug_list + + +if [ "$do_emails" = "1" ]; then + $BUGZILLA_CMD query --blocked $release_metabug -s NEW,ASSIGNED,REOPENED \ + --outputformat "%{assigned_to}" | sort | uniq | paste -s -d ',' + echo "" +fi + +if [ "$list_all" = "1" ]; then + echo "Searching for potential blocker bugs..." + echo "" + bug_list=`$base_query_string --outputformat "PR%{id}"` + branch_log='' + + stable_branch="release_`echo $release_version | cut -d . -f 1,2 | sed 's/\.//g'`" + for proj in llvm cfe lldb lld libcxx; do + branch_log=$branch_log`svn log --stop-on-copy https://llvm.org/svn/llvm-project/$proj/branches/$stable_branch --xml | grep 'revision="[0-9]\+"'` + done + +$BUGZILLA_CMD query --blocked $release_metabug \ + --outputformat "%{id}|%{cf_fixed_by_commits}" | while read line +do + fix_merged=0 + for r in `echo $line | cut -d '|' -f 2`; do + rev_num=`echo $r | tail -c +2` + if echo $branch_log | grep -q $rev_num; then + fix_merged=1 + break + fi + done + + if [ "$fix_merged" = "0" ]; then + bug_id=`echo $line | cut -d '|' -f 1` + if echo $bug_list | grep -v -q $bug_id; then + echo "Possible missed bug: llvm.org/PR$bug_id" + fi + fi + +done +fi Index: utils/release/release-helpers.sh =================================================================== --- /dev/null +++ utils/release/release-helpers.sh @@ -0,0 +1,35 @@ +# !/bin/bash +#===-- release-helpers.sh -------------------------------------------------===# +# +# The LLVM Compiler Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. +# +#===------------------------------------------------------------------------===# +# +# Helper routines for release scripts. +# +#===------------------------------------------------------------------------===# + +function set_release_metabug { + stable_version="$1" + + case $stable_version in + 4.0.1) + release_metabug="32061" + ;; + 5.0.1) + release_metabug="34492" + ;; + 6.0.1) + release_metabug="36649" + ;; + 7.0.0) + release_metabug="38406" + ;; + *) + echo "error: invalid stable version: $stable_version" + exit 1 + esac +}