summaryrefslogtreecommitdiff
path: root/v4l/scripts/hghead.pl
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2006-03-15 17:50:31 -0300
committerMauro Carvalho Chehab <mchehab@infradead.org>2006-03-15 17:50:31 -0300
commit414f27d03fbdabf5130702fd8326c1ed03859c71 (patch)
treea4153e114b818f47e06541ca937451e1c3262a73 /v4l/scripts/hghead.pl
parent00dfa8f7921968231eb846621009b4cf89ab0054 (diff)
parent860f43664b728edbd09625faf68b6277e4342969 (diff)
downloadmediapointer-dvb-s2-414f27d03fbdabf5130702fd8326c1ed03859c71.tar.gz
mediapointer-dvb-s2-414f27d03fbdabf5130702fd8326c1ed03859c71.tar.bz2
Merging from mchehab vivi branch
From: Mauro Carvalho Chehab <mchehab@infradead.org> merge: Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'v4l/scripts/hghead.pl')
-rwxr-xr-xv4l/scripts/hghead.pl23
1 files changed, 16 insertions, 7 deletions
diff --git a/v4l/scripts/hghead.pl b/v4l/scripts/hghead.pl
index c495abc8b..ddaef0767 100755
--- a/v4l/scripts/hghead.pl
+++ b/v4l/scripts/hghead.pl
@@ -19,6 +19,7 @@ my $maintainer_email=$ENV{CHANGE_LOG_EMAIL_ADDRESS};
my $from="";
my $body="";
my $signed="";
+my $fromname="";
open IN, "<$in";
@@ -57,14 +58,15 @@ while ($line = <IN>) {
my $email=$2;
$name =~ s/\s+$//;
$email =~ s/\s+$//;
- $from= "From: $name <$email>\n";
+ $fromname="$name <$email>";
+ $from= "From: $fromname\n";
next;
}
- print "Bad formed author\n";
+ print "Bad: author line have a wrong syntax\n";
die;
}
- if ($line =~ m/^Subject:\s*(.*)\n/) {
+ if ($line =~ m/^Subject:\s*(.*\n)/) {
$subject=$1;
next;
}
@@ -86,7 +88,7 @@ while ($line = <IN>) {
next;
}
if ($line =~ m/^Acked-by:.*/) {
- print $line;
+ $signed="$signed$line";
next;
}
@@ -98,7 +100,7 @@ while ($line = <IN>) {
next;
}
- if ($line =~ m|^(V4L\/DVB\s*\(.+\)\s*:.*)\n|) {
+ if ($line =~ m|^(V4L\/DVB\s*\(.+\)\s*:.*\n)|) {
$subject=$1;
$line="\n";
}
@@ -128,16 +130,23 @@ while ($line = <IN>) {
close IN;
if ($from eq "") {
- print "Bad formed author\n";
+ print "Bad: author doesn't exist!\n";
die;
}
+
if (!$maint_ok) {
$signed=$signed."Signed-off-by: $maintainer_name <$maintainer_email>\n";
}
+
+if (!$signed =~ m/$from/) {
+ print "Bad: Author didn't signed his patch!\n";
+ die;
+}
+
$body=~s/\n+$//;
$body=~s/^\n+$//;
# First from is used by hg to recognize commiter name
-print "From: $maintainer_name <$maintainer_email>\n";
+print "#Committer: $maintainer_name <$maintainer_email>\n";
print "$subject\n$from\n$body\n\n$signed";