Re: [PATCH][repost] Don't add extra blank line to log messages
From: Julian Foad <julianfoad_at_btopenworld.com>
Date: 2004-03-28 13:01:39 CEST
Greg Hudson wrote:
Yes. We already do certain transformations, such as converting all of the line endings to the native type, and, if the message is provided from an editor, converting an all-white-space message to an empty message.
I agree that adding blank lines to log messages is generally an ugly thing to do. (If one wants an extra blank line before the row of dashes in "svn log" output, that's a separate thing that should not be counted in the log message line count nor be output by "svn propget svn:log" etc.)
> I'd say the best behavior would be to ensure at commit time that there
That sounds like a nice solution. "svn propget svn:log --strict" could still output the exact store message.
When I brought up something like this before, I was told that we wanted the exact form of the originally provided log message to be recoverable from "svn log" output, including whether it ended with a newline, but I am not sure that that is really a very useful thing to do.
I would very much like the "svn log" output to count a one-line log message as "1 line" and not add a blank line and count it as "2 lines".
I'd also say, make sure that there is _only_ one newline at the end of the message, and strip any extra white space. This particularly makes sense when the message has been written above the marker line.
The Subversion project has a policy of always writing a log message, but some projects don't and so I would like to see empty log messages handled more neatly in the "svn log" output: instead of
------------------------------------------------------------------------
------------------------------------------------------------------------
I would prefer to see
------------------------------------------------------------------------
------------------------------------------------------------------------
or, even better,
------------------------------------------------------------------------
Note that this latter form is still programmatically parseable, but requires an extra step: "if 0 lines then don't expect a blank separator line". The attached patch changes the display of blank log messages to this latter form, without affecting the display of other log messages. I haven't posted it before because I think we should form a consensus on all of these log message blank line issues before making a change.
I don't know whether we will alow ourselves to change this now until version 2, but those of us who are interested might as well discuss what we would like to see.
- Julian
If the log message is blank, then don't display it or the extra blank line.
Index: subversion/clients/cmdline/log-cmd.c
---------------------------------------------------------------------
|
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.