Re: svn commit: r39197 - trunk/subversion/libsvn_ra_svn
David Glasser <glasser-tVyF8B/[email protected]>
| Newsgroups | gmane.comp.version-control.subversion.rapidsvn.devel,gmane.comp.version-control.subversion.svn |
|---|---|
| Message-ID | <1ea387f60909081731r426e6d98ie5eff9efab76bdc5__46736.4613818519$1252456353$gmane$org@mail.gmail.com> |
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<[email protected]> 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-tVyF8B/[email protected] | langtonlabs.org | flickr.com/photos/glasser/ ------------------------------------------------------ http://subversion.tigris.org/ds/viewMessage.do?dsForumId=495&dsMessageId=2392710