From: Fabian Groffen Date: Wed, 28 Mar 2007 19:35:07 +0000 (-0000) Subject: Adding this script because .... well... we love open source and stuff. X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=e6c07ef405fdd51a070eaf962b42aa86efd2378e;p=portage.git Adding this script because .... well... we love open source and stuff. A little script to turn an SVN range (revision1:revision2) into a "Merged from trunk" message, used when merging changes from the trunk into the prefix branch. svn path=/main/branches/prefix/; revision=6315 --- diff --git a/svnlogmsg.awk b/svnlogmsg.awk new file mode 100755 index 000000000..0fdd721a0 --- /dev/null +++ b/svnlogmsg.awk @@ -0,0 +1,43 @@ +#!/usr/bin/env bash + +# bla bla +# probably can be done much better, but I got tired of copy 'n' paste +# from mutt into a commit message ... + +[[ -z $1 ]] && exit -1 + +svn log ../../trunk -r$1 | awk -v revs=$1 ' +BEGIN { + term = 0 + print "" + print "Merged from trunk " revs + print "" +} +{ + if ($0 ~ /^--*$/) { + if (term == 1) { + print "" + } + print "" + } else if ($0 ~ /^r[0-9][0-9]* \| .*$/) { + print "" + } + print "
" substr($1, 2) "
" + if ($3 == "vapier") { + $3 = "SpankMan" + } else if ($3 == "antarus") { + $3 = "WarnerBro" + } + print $3 "
" + } else if ($0 ~ /^..*$/) { + if (noprint == 0) { + print $0 + term = 1 + } + } +} +END { + if (term == 1) { + print "
" +} +' | elinks -dump