subversion-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Branko ─îibej <br...@wandisco.com>
Subject Re: [VOTE] merge the log-message-templates branch to trunk
Date Tue, 16 Sep 2014 09:59:29 GMT
On 16.09.2014 11:14, Julian Foad wrote:
> 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 */

Perhaps we should fix that in the client regardless; i.e., if we fire up
an editor for the commit or for propedit, we should ask the user for
confirmation if the content of the tempfile changes.

-- Brane

Mime
View raw message