On 06/11/2012 03:41 PM, Julian Foad wrote:
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:

[[[

* file/.../name.c
  (func_name):

[...]

--- This line and [...] will be ignored ---

Index: file/.../name.c
==================
[...]

]]]

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.


That script is brilliant! I hated writing log messages
but now it's just a ~/svnlogmsg.sh | gedit &

Thanks.

-- Stefan^2.

Reply via email to