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

Re: svn commit: r10652 - trunk/subversion/clients/cmdline

From: Peter N. Lundblad <peter_at_famlundblad.se>
Date: 2004-08-15 23:12:13 CEST

On Sun, 15 Aug 2004 dionisos@tigris.org wrote:

> Author: dionisos
> Date: Sun Aug 15 15:01:58 2004
> New Revision: 10652
>
> Modified:
> trunk/subversion/clients/cmdline/log-cmd.c
> Log:
> Fix 'svn log' part of issue #1997.
>
> * subversion/clients/cmdline/log-cmd.c
> (struct log_receiver_baton): Remove out stream field.
> (log_message_receiver, log_message_receiver_xml):
> Remove UTF8->locale conversions. Replace calls
> to svn_stream_printf with svn_cmdline_printf which does the translation.
> Also eliminate now obsolete variables.
> (svn_cl__log): Don't setup stdout stream in (now removed) baton's out field.
>
>
> Modified: trunk/subversion/clients/cmdline/log-cmd.c
> Url: http://svn.collab.net/viewcvs/svn/trunk/subversion/clients/cmdline/log-cmd.c?view=diff&rev=10652&p1=trunk/subversion/clients/cmdline/log-cmd.c&r1=10651&p2=trunk/subversion/clients/cmdline/log-cmd.c&r2=10652
> ==============================================================================
> --- trunk/subversion/clients/cmdline/log-cmd.c (original)
> +++ trunk/subversion/clients/cmdline/log-cmd.c Sun Aug 15 15:01:58 2004
> @@ -86,9 +86,6 @@
>
> /* Don't print log message body nor its line count. */
> svn_boolean_t omit_log_message;
> -
> - /* Output stream */
> - svn_stream_t *out;
> };
>
>
> @@ -185,9 +182,6 @@
> apr_pool_t *pool)
> {
> struct log_receiver_baton *lb = baton;
> - const char *author_stdout, *date_stdout;
> - const char *msg_stdout = NULL; /* Silence a gcc uninitialized warning */
> - svn_error_t *err;
>
> /* Number of lines in the msg. */
> int lines;
> @@ -197,9 +191,9 @@
>
> if (rev == 0)
> {
> - return svn_stream_printf (lb->out, pool,
> - _("No commit for revision 0.%s"),
> - APR_EOL_STR);
> + return svn_cmdline_printf (pool,
> + _("No commit for revision 0.%s"),
> + APR_EOL_STR);

You shouldn't use APR_EOL_STR when writing through the C standard library,
which svn_cmdline_* do, since that will take care of LF -> local EOL
sequence.

...
> - /* Convert log message from UTF8/LF to native locale and eol-style. */
> + /* Convert log message from LF to native eol-style. */
> svn_string_t *logmsg = svn_string_create (msg, pool);
> - SVN_ERR (svn_subst_detranslate_string (&logmsg, logmsg, TRUE, pool));
> - msg_stdout = logmsg->data;
> + SVN_ERR (svn_subst_detranslate_string (&logmsg, logmsg, FALSE, pool));
> + msg = logmsg->data;

Since we are always on ASSCI-based systems, LF will be == '\n', so I think
this is wrong for the same reason as above.

Regards,
//Peter

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sun Aug 15 22:59:07 2004

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.