From d02b60987a9d04d3f7a58c04c1000797b8563b92 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Mon, 19 Jun 2006 19:49:57 -0300 Subject: Improved to accept also patches from akpm. From: Mauro Carvalho Chehab Signed-off-by: Mauro Carvalho Chehab --- v4l/scripts/hghead.pl | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) (limited to 'v4l') diff --git a/v4l/scripts/hghead.pl b/v4l/scripts/hghead.pl index 16e566ea9..3f8b4b0ba 100755 --- a/v4l/scripts/hghead.pl +++ b/v4l/scripts/hghead.pl @@ -12,6 +12,7 @@ my $sub_ok=0; my $init=0; my $num=0; my $hgimport=0; +my $mmimport=0; my $maint_ok=0; my $noblank=1; my $maintainer_name=$ENV{CHANGE_LOG_NAME}; @@ -33,6 +34,10 @@ while ($line = ) { if ($line =~ m/^\-\-\- .*/) { last; } + if ($line =~ m/^\-\-\-\-.*/) { + $body=""; + next; + } if ($line =~ m/^\-\-\-.*/) { last; } @@ -62,7 +67,11 @@ while ($line = ) { $from= "From: $fromname\n"; next; } - print "Bad: author line have a wrong syntax\n"; + if ($line =~ m/^From:\sakpm\@osdl.org/) { + $mmimport=1; + next; + } + print "Bad: author line have a wrong syntax: $line\n"; die; } @@ -87,11 +96,11 @@ while ($line = ) { $signed="$signed$line"; next; } - if ($line =~ m/^\# HG changeset patch/) { + if ( ($line =~ m/^\# HG changeset patch/) || + ($line =~ m/^has been added to the -mm tree. Its filename is/) ) { $sub_ok=0; $init=0; $num=0; - $hgimport=0; $maint_ok=0; $noblank=1; $from=""; @@ -100,6 +109,7 @@ while ($line = ) { $hgimport=1; next; } + if ($line =~ m/^Acked-by:.*/) { $signed="$signed$line"; @@ -164,8 +174,8 @@ if (!$signed =~ m/$from/) { die; } -$body=~s/\n+$//; -$body=~s/^\n+$//; +$body=~s/[\n\s]+$//; +$body=~s/^[\n\s]+//; # First from is used by hg to recognize commiter name print "#Committer: $maintainer_name <$maintainer_email>\n"; -- cgit v1.2.3