You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by da...@apache.org on 2013/07/01 18:27:33 UTC
svn commit: r1498550 - in /subversion/trunk/subversion/libsvn_ra_svn:
client.c protocol
Author: danielsh
Date: Mon Jul 1 16:27:33 2013
New Revision: 1498550
URL: http://svn.apache.org/r1498550
Log:
Fix a client segfault in svn_ra_get_commit_editor3() with a NULL log message.
* subversion/libsvn_ra_svn/client.c
(ra_svn_commit): Handle a NULL log message.
* subversion/libsvn_ra_svn/protocol
(commit): Note an API change to do when next revving this protocol command.
Modified:
subversion/trunk/subversion/libsvn_ra_svn/client.c
subversion/trunk/subversion/libsvn_ra_svn/protocol
Modified: subversion/trunk/subversion/libsvn_ra_svn/client.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_svn/client.c?rev=1498550&r1=1498549&r2=1498550&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_ra_svn/client.c (original)
+++ subversion/trunk/subversion/libsvn_ra_svn/client.c Mon Jul 1 16:27:33 2013
@@ -978,6 +978,21 @@ static svn_error_t *ra_svn_commit(svn_ra
const svn_string_t *log_msg = svn_hash_gets(revprop_table,
SVN_PROP_REVISION_LOG);
+ if (log_msg == NULL &&
+ ! svn_ra_svn_has_capability(conn, SVN_RA_SVN_CAP_COMMIT_REVPROPS))
+ {
+ return svn_error_createf(SVN_ERR_BAD_PROPERTY_VALUE, NULL,
+ _("ra_svn does not support not specifying "
+ "a log message with pre-1.5 servers; "
+ "consider passing an empty one, or upgrading "
+ "the server"));
+ }
+ else if (log_msg == NULL)
+ /* 1.5+ server. Set LOG_MSG to something, since the 'logmsg' argument
+ to the 'commit' protocol command is non-optional; later, REVPROP_TABLE
+ (which has NULL for svn:log) will override this value. */
+ log_msg = svn_string_create("", pool);
+
/* If we're sending revprops other than svn:log, make sure the server won't
silently ignore them. */
if (apr_hash_count(revprop_table) > 1 &&
Modified: subversion/trunk/subversion/libsvn_ra_svn/protocol
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_svn/protocol?rev=1498550&r1=1498549&r2=1498550&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_ra_svn/protocol (original)
+++ subversion/trunk/subversion/libsvn_ra_svn/protocol Mon Jul 1 16:27:33 2013
@@ -296,6 +296,8 @@ second place for auth-request point as n
After auth exchange completes, server sends commit-info.
commit-info: ( new-rev:number date:string author:string
? ( post-commit-err:string ) )
+ NOTE: when revving this, make 'logmsg' optional, or delete that parameter
+ and have the log message specified in 'rev-props'.
get-file
params: ( path:string [ rev:number ] want-props:bool want-contents:bool