On 1.8.x-r1578853 branch, merge r1578853 and r1578875 and resolve text conflict.
git-svn-id: https://svn.apache.org/repos/asf/subversion/branches/1.8.x-r1578853@1578885 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/subversion/libsvn_ra_svn/protocol b/subversion/libsvn_ra_svn/protocol
index d056b74..4d98b2b 100644
--- a/subversion/libsvn_ra_svn/protocol
+++ b/subversion/libsvn_ra_svn/protocol
@@ -310,6 +310,7 @@
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 @@
[ 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 ] )
diff --git a/subversion/svnserve/serve.c b/subversion/svnserve/serve.c
index 6b66b19..a3fd938 100644
--- a/subversion/svnserve/serve.c
+++ b/subversion/svnserve/serve.c
@@ -1526,6 +1526,9 @@
&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 @@
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 @@
&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 @@
/* 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 ... */