subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From phi...@apache.org
Subject svn commit: r1578875 - in /subversion/trunk/subversion: libsvn_ra_svn/protocol svnserve/serve.c
Date Tue, 18 Mar 2014 13:37:41 GMT
Author: philip
Date: Tue Mar 18 13:37:40 2014
New Revision: 1578875

URL: http://svn.apache.org/r1578875
Log:
Followup to r1578853, optimize svnserve to only get properties from
the FS layer when needed.

* subversion/svnserve/serve.c
  (get_file, get_dir): Only build property hashes when the properties
   are going to be sent.

* subversion/libsvn_ra_svn/protocol: Add get-dir and get-file NOTE.

Modified:
    subversion/trunk/subversion/libsvn_ra_svn/protocol
    subversion/trunk/subversion/svnserve/serve.c

Modified: subversion/trunk/subversion/libsvn_ra_svn/protocol
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_svn/protocol?rev=1578875&r1=1578874&r2=1578875&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_ra_svn/protocol (original)
+++ subversion/trunk/subversion/libsvn_ra_svn/protocol Tue Mar 18 13:37:40 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/trunk/subversion/svnserve/serve.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svnserve/serve.c?rev=1578875&r1=1578874&r2=1578875&view=diff
==============================================================================
--- subversion/trunk/subversion/svnserve/serve.c (original)
+++ subversion/trunk/subversion/svnserve/serve.c Tue Mar 18 13:37:40 2014
@@ -1558,8 +1558,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));
@@ -1705,10 +1711,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->repository->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 ... */



Mime
View raw message