summaryrefslogtreecommitdiff
path: root/v4l
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2006-06-12 17:05:52 -0300
committerMauro Carvalho Chehab <mchehab@infradead.org>2006-06-12 17:05:52 -0300
commitda4bf4260d1fe9964768ced721f2cbcb8c740850 (patch)
tree257ffd782fba7106a80a4d4424cbed9f6d18cd81 /v4l
parente36b7b260ab8cee00f043cfcd64a4bec046997df (diff)
downloadmediapointer-dvb-s2-da4bf4260d1fe9964768ced721f2cbcb8c740850.tar.gz
mediapointer-dvb-s2-da4bf4260d1fe9964768ced721f2cbcb8c740850.tar.bz2
mailimport improved to accept "hg export" patches
From: Mauro Carvalho Chehab <mchehab@infradead.org> Now, script will detect "hg export" patches inside emails, removing non-pertinent headers, keeping only the original commit message and the patch. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'v4l')
-rwxr-xr-xv4l/scripts/hghead.pl25
1 files changed, 23 insertions, 2 deletions
diff --git a/v4l/scripts/hghead.pl b/v4l/scripts/hghead.pl
index ddaef0767..16e566ea9 100755
--- a/v4l/scripts/hghead.pl
+++ b/v4l/scripts/hghead.pl
@@ -8,10 +8,10 @@ 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 $maint_ok=0;
my $noblank=1;
my $maintainer_name=$ENV{CHANGE_LOG_NAME};
@@ -87,6 +87,20 @@ while ($line = <IN>) {
$signed="$signed$line";
next;
}
+ if ($line =~ m/^\# HG changeset patch/) {
+ $sub_ok=0;
+ $init=0;
+ $num=0;
+ $hgimport=0;
+ $maint_ok=0;
+ $noblank=1;
+ $from="";
+ $body="";
+ $subject="";
+ $hgimport=1;
+ next;
+ }
+
if ($line =~ m/^Acked-by:.*/) {
$signed="$signed$line";
next;
@@ -96,7 +110,7 @@ while ($line = <IN>) {
if ($line =~ m/Changeset:\s*(.*)\n/) {
$num=$1;
}
- print "# $line";
+# print "# $line";
next;
}
@@ -105,12 +119,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;
}