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

Re: patch newline in log messages

From: Julian Foad <julianfoad_at_btopenworld.com>
Date: 2006-02-22 17:00:56 CET

Olleg Samoylov wrote:
> Julian Foad wrote:
>> Issue #1870 "Don't add extra blank line to log messages" is the right
>> one. It contains a patch to not add an extra line to an EMPTY log
>> message, but it should discuss the whole issue of trailing newlines.
>
> I already sent patch half year ago to remove trailing newlines at stage
> "svn commit". There was a great discussion about it. And you took part
> in it also. But in spite of your support, Karl Fogel rejected it. Reason
> was:
>
>> I am totally, completely opposed to Subversion taking the trailing
>> newline off my log messages. Take my house, take my car, take my
>> piano (well, no, leave the piano please) but DO NOT TAKE my trailing
>> newline.
>
> And from Greg Hudson:
>
>> in the ideal case, svn:log properties should be thought of as a series
>> of lines, and we should ensure that they are by requiring that they have
>> a final newline.
>>
>> Since we can't (or at least don't want to) modify the svn:log properties
>> of existing repositories, we would also append a final newline in the
>> display code to svn:log properties which don't have one.

OK, so Karl doesn't want his trailing newlines removed. Greg's quote is a
conditional suggestion ("we would ...") out of context so it doesn't mean much
by itself. These are only the opinions of certain people at a certain time,
and don't necessarily mean that we will or won't do anything in particular.

> Now I write patch worked at stage "svn log". What I need to do also to
> fix this very old issue?

Well, it's no good any of us just sending patches, because we haven't agreed on
what behaviour we want. We need to discuss the behavioural requirements, and
find solutions that are acceptable to everybody.

For example, if the problem is that you want consistent spacing at the end of
each log message in your own repositories, here is one solution that may be
acceptable to you and doesn't require changing Subversion at all: fix up all
the old log messages, and write a pre-commit hook script that trims off or
normalises any trailing newline(s) in the log message about to be committed.

If the problem is that you want to see log messages in a consistent style in
other people's repositories, then a different solution is required.

For those people who say the log message must be retrieved exactly as it was
provided, we can try arguing that as long as it is retrievable (e.g. with "svn
log --xml" or "svn propget svn:log") the default display of "svn log" need not
be in this exact form.

- Julian

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Feb 22 17:10:23 2006

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

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