diff options
Diffstat (limited to 'v4l/scripts/hghead.pl')
-rwxr-xr-x | v4l/scripts/hghead.pl | 36 |
1 files changed, 24 insertions, 12 deletions
diff --git a/v4l/scripts/hghead.pl b/v4l/scripts/hghead.pl index 0f086294d..dc989dd61 100755 --- a/v4l/scripts/hghead.pl +++ b/v4l/scripts/hghead.pl @@ -1,6 +1,5 @@ #!/usr/bin/perl use strict; -use Date::Parse; ################################################################# # analyse diffs @@ -19,6 +18,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=""; @@ -45,18 +45,13 @@ while ($line = <IN>) { last; } - if ($line =~ m/^# Date\s*(.*)/) { + if ($line =~ m/^#\s*Date\s*(.*)/) { print "#Date: $1\n"; + next; } if ($line =~ m/^Date:\s*(.*)/) { - my $time = str2time($1); - - if ($time) { - print "#Date: $time 0\n"; - } else { - print "#Date: $1\n"; - } + print "#Date: $1\n"; next; } @@ -64,8 +59,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 +91,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 +204,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]+//; |