summaryrefslogtreecommitdiff
path: root/v4l/scripts/hghead.pl
diff options
context:
space:
mode:
authorPatrick Boettcher <pb@linuxtv.org>2006-07-04 17:58:23 +0200
committerPatrick Boettcher <pb@linuxtv.org>2006-07-04 17:58:23 +0200
commit8fbac88a9c801be025c283275f2eb6585a5cc454 (patch)
treebd82f6b1848d218e56f57805fdc569b9574e8089 /v4l/scripts/hghead.pl
parentc0b0560a9ed6e97eca6da5f8432c0dbb2fe471ad (diff)
parent54b507ede0a1c5349b47f84af7d3d0b417467e3a (diff)
downloadmediapointer-dvb-s2-8fbac88a9c801be025c283275f2eb6585a5cc454.tar.gz
mediapointer-dvb-s2-8fbac88a9c801be025c283275f2eb6585a5cc454.tar.bz2
sync with master
From: Patrick Boettcher <pb@linuxtv.org> sync with master Signed-off-by: Patrick Boettcher <pb@linuxtv.org>
Diffstat (limited to 'v4l/scripts/hghead.pl')
-rwxr-xr-xv4l/scripts/hghead.pl41
1 files changed, 36 insertions, 5 deletions
diff --git a/v4l/scripts/hghead.pl b/v4l/scripts/hghead.pl
index ddaef0767..fdc9720c6 100755
--- a/v4l/scripts/hghead.pl
+++ b/v4l/scripts/hghead.pl
@@ -8,10 +8,11 @@ use Date::Parse;
my $in = shift;
my $line;
my $subject;
-my $from=0;
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 = <IN>) {
if ($line =~ m/^\-\-\- .*/) {
last;
}
+ if ($line =~ m/^\-\-\-\-.*/) {
+ $body="";
+ next;
+ }
if ($line =~ m/^\-\-\-.*/) {
last;
}
@@ -62,7 +67,11 @@ while ($line = <IN>) {
$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,6 +96,21 @@ while ($line = <IN>) {
$signed="$signed$line";
next;
}
+ 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;
+ $maint_ok=0;
+ $noblank=1;
+ $from="";
+ $body="";
+ $subject="";
+ $hgimport=1;
+ next;
+ }
+
+
if ($line =~ m/^Acked-by:.*/) {
$signed="$signed$line";
next;
@@ -96,7 +120,7 @@ while ($line = <IN>) {
if ($line =~ m/Changeset:\s*(.*)\n/) {
$num=$1;
}
- print "# $line";
+# print "# $line";
next;
}
@@ -105,12 +129,19 @@ while ($line = <IN>) {
$line="\n";
}
+ if ($line =~ m/^#/) {
+ next;
+ }
if ($sub_ok == 0) {
$sub_ok=1;
substr( $subject, 0, 1 ) = uc (substr ($subject, 0, 1));
if ($subject =~ m|V4L\/DVB\s*(.+)|) {
$subject=$1;
}
+ if ($hgimport) {
+ $subject=$line;
+ next;
+ }
if ($line =~ m/^\n/) {
next;
}
@@ -143,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";