summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorPetr Mladek <pmladek@suse.cz>2011-03-01 21:16:48 +0100
committerPetr Mladek <pmladek@suse.cz>2011-03-01 21:16:48 +0100
commit5c42f5dc684efd1a43472c4113ab66093b3d971d (patch)
treee20192de78c683d52929f86fafcbff8faec327ec /bin
parent265cfde593ef4181ae8d9ef06258129743dda49e (diff)
lo-commit-stat: replace "n#" with "bnc#"
the "bnc#" prefix is required by SUSE package conventions
Diffstat (limited to 'bin')
-rwxr-xr-xbin/lo-commit-stat7
1 files changed, 7 insertions, 0 deletions
diff --git a/bin/lo-commit-stat b/bin/lo-commit-stat
index ba88956abc18..4320bd558f7c 100755
--- a/bin/lo-commit-stat
+++ b/bin/lo-commit-stat
@@ -18,6 +18,7 @@ sub search_bugs($$$$)
my $bug = "";
my $bug_orig;
while (defined $bug) {
+
# match fdo#123, rhz#123, i#123
if ( $line =~ m/(\w*\#+\d+)/ ) {
$bug_orig = $1;
@@ -30,11 +31,17 @@ sub search_bugs($$$$)
$bug = undef;
next;
}
+
# print " found $bug\n";
+ # remove bug number from the comment; it will be added later a standardized way
$bug_orig =~ s/\#/\\#/;
$line =~ s/[Rr]esolves:\s*$bug_orig\s*//;
$line =~ s/\s*-\s*$bug_orig\s*//;
$line =~ s/\(?$bug_orig\)?[:,]?\s*//;
+
+ # bnc# is prefered over n# for novell bugs
+ $bug =~ s/^n\#/bnc#/;
+ # save the bug number
%{$pdata->{$piece}{$commit_id}{'bugs'}} = () if (! defined %{$pdata->{$piece}{$commit_id}{'bugs'}});
$pdata->{$piece}{$commit_id}{'bugs'}{$bug} = 1;
$pdata->{$piece}{$commit_id}{'flags'}{'bug'} = 1;