diff options
author | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-01-08 13:26:51 -0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-01-08 13:26:51 -0200 |
commit | 569fda25980e17a63c2a66b9271840a90502b5a5 (patch) | |
tree | 830f7b6fc752db862146a2f41a98776ea761f78a /v4l/scripts | |
parent | e9cdbc1f115e11c4f5fd6a60e922343e84489a33 (diff) | |
download | mediapointer-dvb-s2-569fda25980e17a63c2a66b9271840a90502b5a5.tar.gz mediapointer-dvb-s2-569fda25980e17a63c2a66b9271840a90502b5a5.tar.bz2 |
Improve script to handle also hg mq series of patches
From: Mauro Carvalho Chehab <mchehab@infradead.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'v4l/scripts')
-rwxr-xr-x | v4l/scripts/hghead.pl | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/v4l/scripts/hghead.pl b/v4l/scripts/hghead.pl index 7b3f3106d..af8b7914f 100755 --- a/v4l/scripts/hghead.pl +++ b/v4l/scripts/hghead.pl @@ -45,15 +45,23 @@ while ($line = <IN>) { last; } + if ($line =~ m/^# Date\s*(.*)/) { + print "#Date: $1\n"; + } + if ($line =~ m/^Date:\s*(.*)/) { my $time = str2time($1); if ($time) { + print "#Date: $time\n"; + } else { print "#Date: $1\n"; } next; } + $line =~ s/^#\sUser/From:/; + my $tag=$line; my $arg=$line; $tag =~ s/\s*([^\s]+:)(.*)\n/\1/; @@ -139,6 +147,9 @@ while ($line = <IN>) { next; } if ($sub_ok == 0) { + if ($line =~ m/^\s*\n/) { + next; + } $sub_ok=1; substr( $subject, 0, 1 ) = uc (substr ($subject, 0, 1)); if ($subject =~ m|V4L\/DVB\s*(.+)|) { @@ -180,10 +191,11 @@ if (!$signed =~ m/$from/) { die; } +$body="$from\n$body"; $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"; -print "$subject\n$from\n$body\n\n$signed"; +print "$subject\n$body\n\n$signed"; |