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

Re: Log messages have an extra blank line when autoedited

From: DervishD <privado_at_dervishd.net>
Date: 2005-04-18 16:32:14 CEST

    Hi Max, and thanks for your answer :)

 * Max Bowsher <maxb@ukf.net> dixit:
> > The cause is at clients/cmdline/util.c, in function
> >truncate_buffer_at_prefix. After truncation it should remove the last
> >newline character, if any. Since this may have lateral effects I
> >don't provide a patch, I don't want to screw things O:)
> Do you mean *subversion* is adding an extra line, or *your editor* is
> adding an extra line?

    It's subversion, I'm sure of that. The editor cannot do it
because you edit something like that:

    Whatever comment
    --This line, and those below...

    If you put a blank line between the comment and the '--This
line' thing, then you get *two* blank lines in the log message. If
you don't put any (like in my example above) you still get one). The
editor could add empty blank lines at the end of the file (that is,
after the '--This line' separator and the rest of *ignored* lines).

    The editor can cause blank lines when using 'svn commit -F' or
'svnadmin setlog' because any blank line at the end of the used file
is obviously honored, but if you just do 'svn commit' and subversion
starts the editor, then no blank lines at the end of the file may
alter the log comment.

    The problem is that subversion starts the editor and filters the
contents of the saved file just removing from '--This line...' to the
end of the file. That means that the newline after 'comment' in my
example above is not removed and so it's present in the output of
'svn log', for example.

    I hope I've made it clear now :)

    Raúl Núñez de Arenas Coronado

Linux Registered User 88736
http://www.dervishd.net & http://www.pleyades.net/
It's my PC and I'll cry if I want to...
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Mon Apr 18 16:33:41 2005

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.