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

Re: [VOTE] merge the log-message-templates branch to trunk

From: Julian Foad <julianfoad_at_btopenworld.com>
Date: Tue, 16 Sep 2014 10:14:51 +0100

Stefan Sperling wrote:
> On Mon, Sep 15, 2014 at 03:56:07PM +0100, Julian Foad wrote:
> http://stackoverflow.com/questions/983026/how-do-i-create-a-svn-commit-message-template-and-hook-to-verify
>>
>> The script in the answer by JoeRandomUser highlights a problem with putting
>> template text above the 'ignored' line: aborting the commit by exiting the
>> editor then doesn't work as expected.
>
> Can you clarify what you mean exactly?
>
> On the log-message-templates branch, if you quit the editor without
> making any changes to the template and you'll get the
> "(a)bort, (c)ontinue, (e)dit:" menu.

That only happens if the editor doesn't write the file before exiting, and that depends on what editor you use.

Subversion goes ahead with the commit, with no confirmation, if the editor rewrites the log message file on disk and then exits. Subversion strips off the "ignored" part of the message and examines the rest to see if it is "empty", and only if it is "empty" asks for confirmation. This happens about half way down the function svn_cl__get_log_message(), with the comment

/* We did get message, now check if it is anything more than just
white space as we will consider white space only as empty */

- Julian
Received on 2014-09-16 11:15:24 CEST

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