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

Re: svn commit: r39197 - trunk/subversion/libsvn_ra_svn

From: David Glasser <glasser_at_davidglasser.net>
Date: Tue, 8 Sep 2009 17:31:38 -0700

What is the i18n implication of these changes?

With this change, will "msg=NULL" and "msg!=NULL" errors be in the
same language, or might they end up different?

--dave

On Tue, Sep 8, 2009 at 5:09 PM, Bert Huijben<rhuijben_at_sharpsvn.net> wrote:
> Author: rhuijben
> Date: Tue Sep  8 17:09:25 2009
> New Revision: 39197
>
> Log:
> * subversion/libsvn_ra_svn/marshal.c
>  (svn_ra_svn_write_cmd_failure): Translate error codes to strings before
>    passing them over the wire. The other side may have a different OS,
>    with different apr error codes. Also handle the very unlikely case
>    of err->file being NULL, which would trigger an assertion.
>
> Modified:
>   trunk/subversion/libsvn_ra_svn/marshal.c
>
> Modified: trunk/subversion/libsvn_ra_svn/marshal.c
> URL: http://svn.collab.net/viewvc/svn/trunk/subversion/libsvn_ra_svn/marshal.c?pathrev=39197&r1=39196&r2=39197
> ==============================================================================
> --- trunk/subversion/libsvn_ra_svn/marshal.c    Tue Sep  8 13:54:35 2009        (r39196)
> +++ trunk/subversion/libsvn_ra_svn/marshal.c    Tue Sep  8 17:09:25 2009        (r39197)
> @@ -1002,17 +1002,24 @@ svn_error_t *svn_ra_svn_write_cmd_respon
>  svn_error_t *svn_ra_svn_write_cmd_failure(svn_ra_svn_conn_t *conn,
>                                           apr_pool_t *pool, svn_error_t *err)
>  {
> +  char buffer[128];
>   SVN_ERR(svn_ra_svn_start_list(conn, pool));
>   SVN_ERR(svn_ra_svn_write_word(conn, pool, "failure"));
>   SVN_ERR(svn_ra_svn_start_list(conn, pool));
>   for (; err; err = err->child)
>     {
> +      const char *msg = err->message;
> +
> +      if (msg == NULL)
> +        msg = svn_strerror(err->apr_err, buffer, sizeof(buffer));
> +
>       /* The message string should have been optional, but we can't
>          easily change that, so marshal nonexistent messages as "". */
>       SVN_ERR(svn_ra_svn_write_tuple(conn, pool, "nccn",
>                                      (apr_uint64_t) err->apr_err,
> -                                     err->message ? err->message : "",
> -                                     err->file, (apr_uint64_t) err->line));
> +                                     msg ? msg : "",
> +                                     err->file ? err->file : "",
> +                                     (apr_uint64_t) err->line));
>     }
>   SVN_ERR(svn_ra_svn_end_list(conn, pool));
>   SVN_ERR(svn_ra_svn_end_list(conn, pool));
>
> ------------------------------------------------------
> http://subversion.tigris.org/ds/viewMessage.do?dsForumId=495&dsMessageId=2392704
>

-- 
glasser_at_davidglasser.net | langtonlabs.org | flickr.com/photos/glasser/
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2392709
Received on 2009-09-09 02:32:31 CEST

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.