[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: commit templates

From: Neels J Hofmeyr <neels_at_elego.de>
Date: Thu, 11 Feb 2010 13:19:59 +0100

Ryan Schmidt wrote:
> On Feb 8, 2010, at 15:17, Edward Peschko wrote:
>
>> I'm looking for a clean way to use the command line client and have
>> the ability to specify a commit template when adding a comment on
>> checkin:
>>
>> BUG_ID: xxxxx
>> BUG_DESC: xxxxx
>> CHANGE_DESC: xxxxx
>>
>> or somesuch, prefilled in my editor of choice. I know about the
>> SVN_EDITOR workaround (setting SVN_EDITOR in such a way that a
>> template is made), but that is a horrid horrid hack and doesn't work
>> across the board on different subversion revlevels.
>>
>> So - is there a better fix for this?
>
> As far as I know, there is not.

Edward, you could also setup a script "the other way round". e.g., to
commit, call your script, which first composes a message and then passes it
via the -F option. Something like:

#!/bin/bash
msgfile=$(tempfile)
cat /var/etc/opt/svn-commit-template > "$msgfile"
svn commit -F "$msgfile" $@

Then you must remember to call your script when you want to commit instead
of calling svn directly, and you would not have Subversion's listing of
modified files in there.

But there is currently no way to tell Subversion to use a given commit
message template. Might be a nice feature to add, as a per-user
configuration option probably.

Patches welcome! This would be the place:
trunk/subversion/svn/util.c: svn_cl__get_log_message()

~Neels

Received on 2010-02-11 13:20:39 CET

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.