From 34f12b3603c725aeb8f2710d14fc2c0feec20a96 Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 12 Nov 2006 13:38:13 +0200 Subject: 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). BitKeeper/triggers/post-commit: fixing greedyness of old extraction --- BitKeeper/triggers/post-commit | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'BitKeeper') diff --git a/BitKeeper/triggers/post-commit b/BitKeeper/triggers/post-commit index a09da93adaf..229553cdccf 100755 --- a/BitKeeper/triggers/post-commit +++ b/BitKeeper/triggers/post-commit @@ -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 -- cgit v1.2.1