diff options
author | Mauro Carvalho Chehab <mchehab@infradead.org> | 2006-01-28 14:13:12 -0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2006-01-28 14:13:12 -0200 |
commit | 73480875596fc17625c910f133b015bf514ac725 (patch) | |
tree | 1b12a9f8d46588252fd727148942a542af2d4ed9 /v4l/scripts/prep_commit_msg.pl | |
parent | f8fc072964e55fe2525046b45b899b838a979f6e (diff) | |
download | mediapointer-dvb-s2-73480875596fc17625c910f133b015bf514ac725.tar.gz mediapointer-dvb-s2-73480875596fc17625c910f133b015bf514ac725.tar.bz2 |
Several fixes for using with mercurial
From: Mauro Carvalho Chehab <mchehab@infradead.org>
cvs commands replaced to hg
created a new script to help commiting
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'v4l/scripts/prep_commit_msg.pl')
-rwxr-xr-x | v4l/scripts/prep_commit_msg.pl | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/v4l/scripts/prep_commit_msg.pl b/v4l/scripts/prep_commit_msg.pl new file mode 100755 index 000000000..239fb6092 --- /dev/null +++ b/v4l/scripts/prep_commit_msg.pl @@ -0,0 +1,41 @@ +#!/usr/bin/perl + +$f=shift; +open IN,"<$f"; +my $n=2; +my $from=""; +my $first=""; +my $changed=""; +$out=""; +while (<IN>) { + if (m/^[0-9]/) { + $n--; + next; + } + if ($n>0) { + s/[\t -]*//; + if (m/^\* (.*):/) { + $changed="#\t$1\n$changed"; + } else { + if ($first eq "") { + if ($_ eq "\n") { + next; + } + $first="$_"; + next; + } + if ($from eq "") { + if (m/Signed-off-by:/) { + $from = $_; + $from =~ s/Signed-off-by/From/; + $first="$first\n#\n# Then From line\n$from\n"; + } + } + $out="$out$_"; + } + } +} +printf "#Added/removed/changed files:\n%s" . + "# First line should be the subject, without Subject:\n%s" . + "# Then a detailed description followed by Signed-off-by: fields:\n%s", + $changed,$first,$out; |