summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2008-06-27 10:30:04 -0300
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-06-27 10:30:04 -0300
commit605f1e11883603ebdff5393dba81e084dbd41f12 (patch)
tree54bd9a21f9f9d636fe76b7338554ddbdbb7ccf31
parent87e71092cf1f08102518d68361d81f7181c908f4 (diff)
downloadmediapointer-dvb-s2-605f1e11883603ebdff5393dba81e084dbd41f12.tar.gz
mediapointer-dvb-s2-605f1e11883603ebdff5393dba81e084dbd41f12.tar.bz2
Fix a few bugs at the script
From: Mauro Carvalho Chehab <mchehab@infradead.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
-rwxr-xr-xv4l/scripts/hghead.pl31
1 files changed, 14 insertions, 17 deletions
diff --git a/v4l/scripts/hghead.pl b/v4l/scripts/hghead.pl
index 6f8a814ad..7eacd7019 100755
--- a/v4l/scripts/hghead.pl
+++ b/v4l/scripts/hghead.pl
@@ -130,12 +130,8 @@ while ($line = <IN>) {
next;
}
- if ($line =~ m/^[a-zA-Z\-]*:/) {
- if ($line =~ m/Changeset:\s*(.*)\n/) {
- $num=$1;
- }
- print "# $line";
- next;
+ if ($tag =~ m/changeset:\s*(.*)\n/) {
+ $num=$1;
}
if ($line =~ m|^(V4L\/DVB\s*\(.+\)\s*:.*\n)|) {
@@ -155,13 +151,8 @@ while ($line = <IN>) {
if ($subject =~ m|V4L\/DVB\s*(.+)|) {
$subject=$1;
}
- if ($hgimport) {
- $subject=$line;
- next;
- }
- if ($line =~ m/^\n/) {
- next;
- }
+ $subject=$line;
+ next;
}
if ($noblank) {
@@ -191,11 +182,17 @@ if (!$signed =~ m/$from/) {
die;
}
-$body="$from\n$body";
-$body=~s/[\n\s]+$//;
+$from=~s/^[\n\s]+//;
+$from=~s/[\n\s]+$//;
+
+$subject=~s/^[\n\s]+//;
+$subject=~s/[\n\s]+$//;
+
+$body="$body\n\n$signed";
+
$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$body\n\n$signed";
-
+print "$subject\n\n$from\n\n$body\n";