You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by sv...@apache.org on 2013/07/05 06:00:54 UTC
svn commit: r1499908 - in /subversion/branches/1.8.x: ./ STATUS
subversion/libsvn_ra_svn/client.c subversion/libsvn_ra_svn/protocol
subversion/svnserve/serve.c
Author: svn-role
Date: Fri Jul 5 04:00:54 2013
New Revision: 1499908
URL: http://svn.apache.org/r1499908
Log:
Merge the r1498550 group from trunk:
* r1498550, r1499727
ra_svn: Fix client-triggerable client segfault upon commit.
Justification:
Segfault. ra_local and ra_serf permit the commit.
Votes:
+1: danielsh, stefan2, philip
Modified:
subversion/branches/1.8.x/ (props changed)
subversion/branches/1.8.x/STATUS
subversion/branches/1.8.x/subversion/libsvn_ra_svn/client.c
subversion/branches/1.8.x/subversion/libsvn_ra_svn/protocol
subversion/branches/1.8.x/subversion/svnserve/serve.c
Propchange: subversion/branches/1.8.x/
------------------------------------------------------------------------------
Merged /subversion/trunk:r1498550,1499727
Modified: subversion/branches/1.8.x/STATUS
URL: http://svn.apache.org/viewvc/subversion/branches/1.8.x/STATUS?rev=1499908&r1=1499907&r2=1499908&view=diff
==============================================================================
--- subversion/branches/1.8.x/STATUS (original)
+++ subversion/branches/1.8.x/STATUS Fri Jul 5 04:00:54 2013
@@ -247,13 +247,6 @@ Veto-blocked changes:
Approved changes:
=================
- * r1498550, r1499727
- ra_svn: Fix client-triggerable client segfault upon commit.
- Justification:
- Segfault. ra_local and ra_serf permit the commit.
- Votes:
- +1: danielsh, stefan2, philip
-
* r1499095, r1499096
Fix issue #4388, crash during tree conflict resolution.
Justification:
Modified: subversion/branches/1.8.x/subversion/libsvn_ra_svn/client.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.8.x/subversion/libsvn_ra_svn/client.c?rev=1499908&r1=1499907&r2=1499908&view=diff
==============================================================================
--- subversion/branches/1.8.x/subversion/libsvn_ra_svn/client.c (original)
+++ subversion/branches/1.8.x/subversion/libsvn_ra_svn/client.c Fri Jul 5 04:00:54 2013
@@ -977,6 +977,28 @@ 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; on the server side,
+ only REVPROP_TABLE will be used, and LOG_MSG will be ignored. The
+ "svn:log" member of REVPROP_TABLE table is NULL, therefore the commit
+ will have a NULL log message (not just "", really NULL).
+
+ svnserve 1.5.x+ has always ignored LOG_MSG when REVPROP_TABLE was
+ present; this was elevated to a protocol promise in r1498550 (and
+ later documented in this comment) in order to fix the segmentation
+ fault bug described in the log message of r1498550.*/
+ 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/branches/1.8.x/subversion/libsvn_ra_svn/protocol
URL: http://svn.apache.org/viewvc/subversion/branches/1.8.x/subversion/libsvn_ra_svn/protocol?rev=1499908&r1=1499907&r2=1499908&view=diff
==============================================================================
--- subversion/branches/1.8.x/subversion/libsvn_ra_svn/protocol (original)
+++ subversion/branches/1.8.x/subversion/libsvn_ra_svn/protocol Fri Jul 5 04:00:54 2013
@@ -294,8 +294,12 @@ second place for auth-request point as n
Upon receiving response, client switches to editor command set.
Upon successful completion of edit, server sends auth-request.
After auth exchange completes, server sends commit-info.
+ If rev-props is present, logmsg is ignored. Only the svn:log entry in
+ rev-props (if any) will be used.
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
Modified: subversion/branches/1.8.x/subversion/svnserve/serve.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.8.x/subversion/svnserve/serve.c?rev=1499908&r1=1499907&r2=1499908&view=diff
==============================================================================
--- subversion/branches/1.8.x/subversion/svnserve/serve.c (original)
+++ subversion/branches/1.8.x/subversion/svnserve/serve.c Fri Jul 5 04:00:54 2013
@@ -1441,6 +1441,7 @@ static svn_error_t *commit(svn_ra_svn_co
if (lock_tokens && lock_tokens->nelts)
SVN_CMD_ERR(add_lock_tokens(conn, lock_tokens, b, pool));
+ /* Ignore LOG_MSG, per the protocol. See ra_svn_commit(). */
if (revprop_list)
SVN_ERR(svn_ra_svn__parse_proplist(revprop_list, pool, &revprop_table));
else