Shell script to make a log message template
From: Julian Foad <julianfoad_at_btopenworld.com>
Date: Mon, 11 Jun 2012 14:41:32 +0100 (BST)
For anyone interested, attached is the shell script I use to generate a log message template for a particular svn diff.
It runs 'svn status' on the given target(s) to find what files to include, then 'svn diff' for each file, and writes to stdout a log message and diff in the following format:
--- This line and [...] will be ignored ---
The "This line ..." line allows me to use this whole text as the log message input file when committing.
By using diff options "no context lines" and "show C function names" for generating the template part of the output, it gets most function names right in C files, but get lots of them wrong in header files where the edits are in a comment preceding a declaration.
This is an archived mail posted to the Subversion Dev mailing list.