diff options
Diffstat (limited to 'v4l/scripts/hghead.pl')
-rwxr-xr-x | v4l/scripts/hghead.pl | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/v4l/scripts/hghead.pl b/v4l/scripts/hghead.pl index 0f086294d..7dd40380a 100755 --- a/v4l/scripts/hghead.pl +++ b/v4l/scripts/hghead.pl @@ -19,6 +19,7 @@ my $maintainer_name=$ENV{CHANGE_LOG_NAME}; my $maintainer_email=$ENV{CHANGE_LOG_EMAIL_ADDRESS}; my $from=""; my $body=""; +my $priority=""; my $signed=""; my $fromname=""; @@ -64,8 +65,8 @@ while ($line = <IN>) { my $tag=$line; my $arg=$line; - $tag =~ s/\s*([^\s]+:)(.*)\n/\1/; - $arg =~ s/\s*([^\s]+:)(.*)\n/\2/; + $tag =~ s/\s*([^\s]+:)\s*(.*)\n/\1/; + $arg =~ s/\s*([^\s]+:)\s*(.*)\n/\2/; $tag =~ tr/A-Z/a-z/; @@ -96,6 +97,19 @@ while ($line = <IN>) { next; } + if ($tag =~ m/^priority:/) { + $arg =~ tr/A-Z/a-z/; + + # Replace the -git branch names for high/normal/low + $arg =~ s/^fixes$/high/; + $arg =~ s/^fix$/high/; + $arg =~ s/^working$/normal/; + $arg =~ s/^work$/normal/; + $arg =~ s/^pending$/low/; + $priority = "Priority: $arg"; + next; + } + if ($line =~ m;^ .*\/.*\| *[0-9]*;) { next; } @@ -196,9 +210,13 @@ $from=~s/[\n\s]+$//; $subject=~s/^[\n\s]+//; $subject=~s/[\n\s]+$//; -$body=~s/^[\n\s]+//; +$body=~s/^[\n]+//; $body=~s/[\n\s]+$//; +if ($priority ne "") { + $body="$body\n\n$priority"; +} + $body="$body\n\n$signed"; $body=~s/^[\n\s]+//; |