summaryrefslogtreecommitdiff
path: root/v4l/scripts/hghead.pl
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2008-08-22 10:34:29 -0300
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-08-22 10:34:29 -0300
commit4d3f684d3b6ab28ec9e251fff156d0b0f53d0517 (patch)
treef82a2ae2dc042d6d1de61f62babeb8c5f28b22a1 /v4l/scripts/hghead.pl
parent87eb1f67e4981f3a09825012f16af0107a7adb45 (diff)
parentb5ff2cd5cc913156858a0b15a186144f146c89d7 (diff)
downloadmediapointer-dvb-s2-4d3f684d3b6ab28ec9e251fff156d0b0f53d0517.tar.gz
mediapointer-dvb-s2-4d3f684d3b6ab28ec9e251fff156d0b0f53d0517.tar.bz2
merge: http://linuxtv.org/hg/~mkrufky/sms1xxx
From: Mauro Carvalho Chehab <mchehab@infradead.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'v4l/scripts/hghead.pl')
-rwxr-xr-xv4l/scripts/hghead.pl36
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]+//;