Correcting BUG/WL identifier extraction to allow multiple references to auxilary

bugs/wls in cset's comments. The targetted BUG's or WL's identifier must be specified
the first in the comments. The referred bugs wls can be typed in same as the targeted
clickable format.
If the the target of the fix is a WL and there are some references to bugs
then the first found reference is regarded as "co-target" so that the bug's identifier
comes up on the subject line along with the WL's and commit mail will update
the bug page. The latter feature can be disarmed (if there is no need to update
the referred bug's page) with typing the first a pseudo-bug pattern (bug#0).

This paticular cset will generate subject line containing bug#0 (as it was the first
referred) whereas the old version would put in the subject line the last referred
pattern (e.g bug#2147483648).
parent bd2529d0
......@@ -28,9 +28,17 @@ fi
CHANGESET=`bk -R prs -r+ -h -d':P:::I:' ChangeSet`
CSETKEY=`bk -R prs -r+ -h -d':KEY:' ChangeSet`
BUG=`bk -R prs -r+ -h -d':C:' ChangeSet | sed -ne 's/^.*[Bb][Uu][Gg] *# *\([0-9][0-9]*\).*$/\1/p'`
WL=`bk -R prs -r+ -h -d':C:' ChangeSet | sed -ne 's/^.*[Ww][Ll] *# *\([0-9][0-9]*\).*$/ WL#\1/p'`
#
# composing subject lines of commit mails.
# if a fix targets to a WL and there is a bug referred
# then X-Bug mail header will contain the first found bug's number
#
BUG=`bk -R prs -r+ -h -d':C:' ChangeSet | \
sed -ne 's/[Bb][Uu][Gg] *# *\([0-9][0-9]*\).*$/BUG#\1/
s/.*BUG#\([0-9][0-9]*\)/\1/p'`
WL=`bk -R prs -r+ -h -d':C:' ChangeSet | \
sed -ne 's/[Ww][Ll] *# *\([0-9][0-9]*\).*$/WL#\1/
s/.*\(WL#[0-9][0-9]*\)/ \1/p'`
if [ "$BUG" = "" ]
then
TO=dev-public@mysql.com
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment