[Mesa-dev] [PATCH 1/2] mesa: Add a script to generate the list of fixed bugs

Ian Romanick idr at freedesktop.org
Wed Apr 17 15:16:23 PDT 2013


On 04/17/2013 01:02 PM, Andreas Boll wrote:
> This list appears in the fixed bugs section of the release notes.
>
> NOTE: This is a candidate for the stable branches.

That's really similar to the one I came up with for the 9.1.1 release 
(attached).  I think you want -n on sort, though.  I also had trouble 
getting wget to do what I wanted, so I used curl.  I don't know if that 
makes any difference one way or the other.

> ---
>   bin/bugzilla_mesa.sh |   43 +++++++++++++++++++++++++++++++++++++++++++
>   1 file changed, 43 insertions(+)
>   create mode 100755 bin/bugzilla_mesa.sh
>
> diff --git a/bin/bugzilla_mesa.sh b/bin/bugzilla_mesa.sh
> new file mode 100755
> index 0000000..fa6f100
> --- /dev/null
> +++ b/bin/bugzilla_mesa.sh
> @@ -0,0 +1,43 @@
> +#!/bin/bash
> +
> +# This script is used to generate the list of fixed bugs that
> +# appears in the release notes files, with HTML formatting.
> +#
> +# Note: This script could take a while until all details have
> +#       been fetched from bugzilla.
> +
> +# regex pattern: trim before url
> +trim_before='s/.*\(http\)/\1/'
> +
> +# regex pattern: trim after url
> +trim_after='s/\(show_bug.cgi?id=[0-9]*\).*/\1/'
> +
> +# regex pattern: always use https
> +use_https='s/http:/https:/'
> +
> +# extract fdo urls from commit log
> +urls=$(git log $* | grep 'bugs.freedesktop.org/show_bug' | sed -e $trim_before -e $trim_after -e $use_https | sort | uniq)
> +
> +# if DRYRUN is set to "yes", simply print the URLs and don't fetch the
> +# details from fdo bugzilla.
> +#DRYRUN=yes
> +
> +if [ "x$DRYRUN" = xyes ]; then
> +	for i in $urls
> +	do
> +		echo $i
> +	done
> +else
> +	echo "<ul>"
> +	echo ""
> +
> +	for i in $urls
> +	do
> +		id=$(echo $i | cut -d'=' -f2)
> +		summary=$(wget --quiet -O - $i | grep -e '<title>.*</title>' | sed -e 's/ *<title>Bug [0-9]\+ – \(.*\)<\/title>/\1/')
> +		echo "<li><a href=\"$i\">Bug $id</a> - $summary</li>"
> +		echo ""
> +	done
> +
> +	echo "</ul>"
> +fi
>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: bugfix-list.sh
Type: application/x-shellscript
Size: 271 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20130417/7bf18874/attachment.bin>


More information about the mesa-dev mailing list