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 2014/03/26 05:00:57 UTC
svn commit: r1581683 - in /subversion/branches/1.8.x: ./ STATUS
subversion/libsvn_ra_svn/protocol subversion/svnserve/serve.c
Author: svn-role
Date: Wed Mar 26 04:00:57 2014
New Revision: 1581683
URL: http://svn.apache.org/r1581683
Log:
Merge the 1.8.x-r1578853 branch:
* r1578853, r1578875
Fix svnserve to only send inherited properties when necessary.
Justification:
Performance regression from 1.7, reported by a user.
Branch:
^/subversion/branches/1.8.x-r1578853
Votes:
+1: philip, rhuijben, ivan
Modified:
subversion/branches/1.8.x/ (props changed)
subversion/branches/1.8.x/STATUS
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/branches/1.8.x-r1578853:r1578879-1581682
Merged /subversion/trunk:r1578853,1578875
Modified: subversion/branches/1.8.x/STATUS
URL: http://svn.apache.org/viewvc/subversion/branches/1.8.x/STATUS?rev=1581683&r1=1581682&r2=1581683&view=diff
==============================================================================
--- subversion/branches/1.8.x/STATUS (original)
+++ subversion/branches/1.8.x/STATUS Wed Mar 26 04:00:57 2014
@@ -331,12 +331,3 @@ Veto-blocked changes:
Approved changes:
=================
-
- * r1578853, r1578875
- Fix svnserve to only send inherited properties when necessary.
- Justification:
- Performance regression from 1.7, reported by a user.
- Branch:
- ^/subversion/branches/1.8.x-r1578853
- Votes:
- +1: philip, rhuijben, ivan
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=1581683&r1=1581682&r2=1581683&view=diff
==============================================================================
--- subversion/branches/1.8.x/subversion/libsvn_ra_svn/protocol (original)
+++ subversion/branches/1.8.x/subversion/libsvn_ra_svn/protocol Wed Mar 26 04:00:57 2014
@@ -310,6 +310,7 @@ second place for auth-request point as n
sends file contents as a series of strings, terminated by the empty
string, followed by a second empty command response to indicate
whether an error occurred during the sending of the file.
+ NOTE: the standard client never sends want-iprops, it uses get-iprops.
get-dir
params: ( path:string [ rev:number ] want-props:bool want-contents:bool
@@ -321,6 +322,7 @@ second place for auth-request point as n
[ last-author:string ] )
dirent-field: kind | size | has-props | created-rev | time | last-author
| word
+ NOTE: the standard client never sends want-iprops, it uses get-iprops.
check-path
params: ( path:string [ rev:number ] )
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=1581683&r1=1581682&r2=1581683&view=diff
==============================================================================
--- subversion/branches/1.8.x/subversion/svnserve/serve.c (original)
+++ subversion/branches/1.8.x/subversion/svnserve/serve.c Wed Mar 26 04:00:57 2014
@@ -1526,6 +1526,9 @@ static svn_error_t *get_file(svn_ra_svn_
&want_props, &want_contents,
&wants_inherited_props));
+ if (wants_inherited_props == SVN_RA_SVN_UNSPECIFIED_NUMBER)
+ wants_inherited_props = FALSE;
+
full_path = svn_fspath__join(b->fs_path->data,
svn_relpath_canonicalize(path, pool), pool);
@@ -1545,8 +1548,14 @@ static svn_error_t *get_file(svn_ra_svn_
SVN_CMD_ERR(svn_fs_file_checksum(&checksum, svn_checksum_md5, root,
full_path, TRUE, pool));
hex_digest = svn_checksum_to_cstring_display(checksum, pool);
+
+ /* Fetch the file's explicit and/or inherited properties if
+ requested. Although the wants-iprops boolean was added to the
+ protocol in 1.8 a standard 1.8 client never requests iprops. */
if (want_props || wants_inherited_props)
- SVN_CMD_ERR(get_props(&props, &inherited_props, &ab, root, full_path,
+ SVN_CMD_ERR(get_props(want_props ? &props : NULL,
+ wants_inherited_props ? &inherited_props : NULL,
+ &ab, root, full_path,
pool));
if (want_contents)
SVN_CMD_ERR(svn_fs_file_contents(&contents, root, full_path, pool));
@@ -1640,6 +1649,9 @@ static svn_error_t *get_dir(svn_ra_svn_c
&dirent_fields_list,
&wants_inherited_props));
+ if (wants_inherited_props == SVN_RA_SVN_UNSPECIFIED_NUMBER)
+ wants_inherited_props = FALSE;
+
if (! dirent_fields_list)
{
dirent_fields = SVN_DIRENT_ALL;
@@ -1689,10 +1701,13 @@ static svn_error_t *get_dir(svn_ra_svn_c
/* Fetch the root of the appropriate revision. */
SVN_CMD_ERR(svn_fs_revision_root(&root, b->fs, rev, pool));
- /* Fetch the directory's explicit and/or inherited properties
- if requested. */
+ /* Fetch the directory's explicit and/or inherited properties if
+ requested. Although the wants-iprops boolean was added to the
+ protocol in 1.8 a standard 1.8 client never requests iprops. */
if (want_props || wants_inherited_props)
- SVN_CMD_ERR(get_props(&props, &inherited_props, &ab, root, full_path,
+ SVN_CMD_ERR(get_props(want_props ? &props : NULL,
+ wants_inherited_props ? &inherited_props : NULL,
+ &ab, root, full_path,
pool));
/* Begin response ... */