diff options
Diffstat (limited to 'v4l')
-rwxr-xr-x | v4l/scripts/hghead.pl | 31 |
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"; |