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

Re: [PATCH] truncate EDITOR_EOF_PREFIX with previous EOL

From: C. Michael Pilato <cmpilato_at_collab.net>
Date: 2005-07-22 19:22:01 CEST

Michael W Thelen <mike@pietdepsi.com> writes:

> As far as I can tell from this thread, the only real problem is in the
> display produced by "svn log". When the log message ends in a
> newline, svn log displays one more newline than expected. If that's
> the problem, then I think the solution is to modify the svn log code
> that displays log messages (solution #2 in Karl's original response to
> this thread). Make it only add a newline if the log message doesn't
> already end in one. Would that behavior completely solve this problem?

It would solve some folks' complaints about seeing extra whitespace
after their log messages, yes. But it creates another more serious
problem -- data tainting. Right now, you can write a parser for 'svn
log' which can correctly reconstruct the original log message using
these simple rules:

   1. Always read the number of log lines dictated in the log header.
   2. Always remove one (1) trailing EOL from that log message.

If the output code becomes conditional, there's no post-facto way to
tell whether or not the condition was triggered.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Jul 22 19:24:57 2005

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.