You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Julian Foad <ju...@btopenworld.com> on 2012/06/11 15:41:32 UTC
Shell script to make a log message template
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.
- Julian
Re: AW: Shell script to make a log message template
Posted by Carlos Andrade <ca...@gmail.com>.
Dears, could anyone please provide a pointer to the script and the original email? I am not being able to locate it.
Thanks,
--
Carlos Andrade
http://carlosandrade.co
Sent from my iPad
On Jun 15, 2012, at 1:06 AM, Markus Schaber <m....@3s-software.com> wrote:
> Hi!
>
> Von: Stefan Fuhrmann [eqfox@web.de]
>> 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.
>>> [...]
>
>> That script is brilliant! I hated writing log messages
>> but now it's just a ~/svnlogmsg.sh | gedit &
>
> It even works when using cygwin bash and having the native windows svn.exe (sliksvn) in your path, without any slash vs backslash issues.
>
> Thanks a lot!
>
>
> Markus Schaber
> --
> We software Automation.
>
> 3S-Smart Software Solutions GmbH
> Markus Schaber | Developer
> Memminger Str. 151 | 87439 Kempten | Germany | Tel. +49-831-54031-0 | Fax +49-831-54031-50
>
> Email: m.schaber@3s-software.com | Web: http://www.3s-software.com
> CoDeSys internet forum: http://forum.3s-software.com
> Download CoDeSys sample projects: http://www.3s-software.com/index.shtml?sample_projects
> Managing Directors: Dipl.Inf. Dieter Hess, Dipl.Inf. Manfred Werner | Trade register: Kempten HRB 6186 | Tax ID No.: DE 167014915
AW: Shell script to make a log message template
Posted by Markus Schaber <m....@3s-software.com>.
Hi!
Von: Stefan Fuhrmann [eqfox@web.de]
> 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.
>> [...]
> That script is brilliant! I hated writing log messages
> but now it's just a ~/svnlogmsg.sh | gedit &
It even works when using cygwin bash and having the native windows svn.exe (sliksvn) in your path, without any slash vs backslash issues.
Thanks a lot!
Markus Schaber
--
We software Automation.
3S-Smart Software Solutions GmbH
Markus Schaber | Developer
Memminger Str. 151 | 87439 Kempten | Germany | Tel. +49-831-54031-0 | Fax +49-831-54031-50
Email: m.schaber@3s-software.com | Web: http://www.3s-software.com
CoDeSys internet forum: http://forum.3s-software.com
Download CoDeSys sample projects: http://www.3s-software.com/index.shtml?sample_projects
Managing Directors: Dipl.Inf. Dieter Hess, Dipl.Inf. Manfred Werner | Trade register: Kempten HRB 6186 | Tax ID No.: DE 167014915
Re: Shell script to make a log message template
Posted by Stefan Fuhrmann <eq...@web.de>.
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.