]>
git.proxmox.com Git - mirror_qemu.git/blob - scripts/show-fixed-bugs.sh
3 # This script checks the git log for URLs to the QEMU launchpad bugtracker
4 # and optionally checks whether the corresponding bugs are not closed yet.
8 echo " -s <commit> : Start searching at this commit"
9 echo " -e <commit> : End searching at this commit"
10 echo " -c : Check if bugs are still open"
11 echo " -b : Open bugs in browser"
14 while getopts "s:e:cbh" opt
; do
19 b
) show_in_browser
=1 ;;
20 h
) show_help
; exit 0 ;;
21 *) echo "Use -h for help." ; exit 1 ;;
25 if [ "x$start" = "x" ]; then
26 start
=$
(git tag
-l 'v[0-9]*\.[0-9]*\.0' |
tail -n 2 |
head -n 1)
28 if [ "x$end" = "x" ]; then
29 end
=$
(git tag
-l 'v[0-9]*\.[0-9]*\.0' |
tail -n 1)
32 if [ "x$start" = "x" ] ||
[ "x$end" = "x" ]; then
33 echo "Could not determine start or end revision ... Please note that this"
34 echo "script must be run from a checked out git repository of QEMU."
38 echo "Searching git log for bugs in the range $start..$end"
40 urlstr
='https://bugs.launchpad.net/\(bugs\|qemu/+bug\)/'
41 bug_urls
=$
(git log
$start..
$end \
42 |
sed -n '\,'"$urlstr"', s,\(.*\)\('"$urlstr"'\)\([0-9]*\).*,\2\4,p' \
46 for i
in $bug_urls ; do echo " $i" ; done
48 if [ "x$check_if_open" = "x1" ]; then
50 echo "Checking which ones are still open..."
51 for i
in $bug_urls ; do
52 if ! curl
-s -L "$i" |
grep "value status" |
grep -q "Fix Released" ; then
54 final_bug_urls
="$final_bug_urls $i"
58 final_bug_urls
=$bug_urls
61 if [ "x$final_bug_urls" = "x" ]; then
62 echo "No open bugs found."
63 elif [ "x$show_in_browser" = "x1" ]; then
64 # Try to determine which browser we should use
65 if [ "x$BROWSER" != "x" ]; then
67 elif command -v xdg-open
>/dev
/null
2>&1; then
69 elif command -v gnome-open
>/dev
/null
2>&1; then
71 elif [ "$(uname)" = "Darwin" ]; then
73 elif command -v sensible-browser
>/dev
/null
2>&1; then
74 bugbrowser
=sensible-browser
76 echo "Please set the BROWSER variable to the browser of your choice."
79 # Now show the bugs in the browser
81 for i
in $final_bug_urls; do
83 if [ $first = 1 ]; then
84 # if it is the first entry, give the browser some time to start
85 # (to avoid messages like "Firefox is already running, but is