You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by pb...@apache.org on 2012/03/21 02:48:23 UTC

svn commit: r1303251 - in /subversion/branches/inheritable-props/subversion: include/ libsvn_ra_local/ libsvn_ra_neon/ libsvn_ra_serf/ libsvn_ra_svn/ mod_dav_svn/ svnserve/

Author: pburba
Date: Wed Mar 21 01:48:23 2012
New Revision: 1303251

URL: http://svn.apache.org/viewvc?rev=1303251&view=rev
Log:
On the inheritable-props branch: Add a new capability signifying that a
server knows how to find inherited properties.

* subversion/include/svn_dav.h
  (SVN_DAV_NS_DAV_SVN_INHERITED_PROPS): New.

* subversion/include/svn_ra.h
  (SVN_RA_CAPABILITY_INHERITED_PROPS): New.

* subversion/include/svn_ra_svn.h
  (SVN_RA_SVN_CAP_INHERITED_PROPS): New.

* subversion/libsvn_ra_local/ra_plugin.c
  (svn_ra_local__has_capability): Handle SVN_RA_CAPABILITY_INHERITED_PROPS.

* subversion/libsvn_ra_neon/options.c
  (parse_capabilities): Map SVN_DAV_NS_DAV_SVN_INHERITED_PROPS to
   SVN_RA_CAPABILITY_INHERITED_PROPS.

* subversion/libsvn_ra_serf/options.c
  (capabilities_headers_iterator_callback): Map
   SVN_DAV_NS_DAV_SVN_INHERITED_PROPS to SVN_RA_CAPABILITY_INHERITED_PROPS.

* subversion/libsvn_ra_svn/client.c
  (ra_svn_has_capability): Map SVN_RA_SVN_CAP_INHERITED_PROPS to
   SVN_RA_CAPABILITY_INHERITED_PROPS.

* subversion/mod_dav_svn/version.c
  (get_vsn_options): Advertise SVN_DAV_NS_DAV_SVN_INHERITED_PROPS, which we
   don't actually support yet, but that's coming shortly. 

* subversion/svnserve/serve.c
  (serve): Advertise SVN_RA_SVN_CAP_INHERITED_PROPS, which like mod_dav_svn,
   we don't actually support yet. 

Modified:
    subversion/branches/inheritable-props/subversion/include/svn_dav.h
    subversion/branches/inheritable-props/subversion/include/svn_ra.h
    subversion/branches/inheritable-props/subversion/include/svn_ra_svn.h
    subversion/branches/inheritable-props/subversion/libsvn_ra_local/ra_plugin.c
    subversion/branches/inheritable-props/subversion/libsvn_ra_neon/options.c
    subversion/branches/inheritable-props/subversion/libsvn_ra_serf/options.c
    subversion/branches/inheritable-props/subversion/libsvn_ra_svn/client.c
    subversion/branches/inheritable-props/subversion/mod_dav_svn/version.c
    subversion/branches/inheritable-props/subversion/svnserve/serve.c

Modified: subversion/branches/inheritable-props/subversion/include/svn_dav.h
URL: http://svn.apache.org/viewvc/subversion/branches/inheritable-props/subversion/include/svn_dav.h?rev=1303251&r1=1303250&r2=1303251&view=diff
==============================================================================
--- subversion/branches/inheritable-props/subversion/include/svn_dav.h (original)
+++ subversion/branches/inheritable-props/subversion/include/svn_dav.h Wed Mar 21 01:48:23 2012
@@ -283,6 +283,12 @@ extern "C" {
 #define SVN_DAV_NS_DAV_SVN_PARTIAL_REPLAY\
             SVN_DAV_PROP_NS_DAV "svn/partial-replay"
 
+/** Presence of this in a DAV header in an OPTIONS response indicates
+ * that the transmitter (in this case, the server) knows how to get
+ * inherited properties. */
+#define SVN_DAV_NS_DAV_SVN_INHERITED_PROPS \
+  SVN_DAV_PROP_NS_DAV "svn/inherited-props"
+
 /** @} */
 
 /** @} */

Modified: subversion/branches/inheritable-props/subversion/include/svn_ra.h
URL: http://svn.apache.org/viewvc/subversion/branches/inheritable-props/subversion/include/svn_ra.h?rev=1303251&r1=1303250&r2=1303251&view=diff
==============================================================================
--- subversion/branches/inheritable-props/subversion/include/svn_ra.h (original)
+++ subversion/branches/inheritable-props/subversion/include/svn_ra.h Wed Mar 21 01:48:23 2012
@@ -2013,6 +2013,13 @@ svn_ra_has_capability(svn_ra_session_t *
  */
 #define SVN_RA_CAPABILITY_ATOMIC_REVPROPS "atomic-revprops"
 
+/**
+ * The capability to get inherited properties.
+ *
+ * @since New in 1.8.
+ */
+#define SVN_RA_CAPABILITY_INHERITED_PROPS "inherited-props"
+
 /*       *** PLEASE READ THIS IF YOU ADD A NEW CAPABILITY ***
  *
  * RA layers generally fetch all capabilities when asked about any

Modified: subversion/branches/inheritable-props/subversion/include/svn_ra_svn.h
URL: http://svn.apache.org/viewvc/subversion/branches/inheritable-props/subversion/include/svn_ra_svn.h?rev=1303251&r1=1303250&r2=1303251&view=diff
==============================================================================
--- subversion/branches/inheritable-props/subversion/include/svn_ra_svn.h (original)
+++ subversion/branches/inheritable-props/subversion/include/svn_ra_svn.h Wed Mar 21 01:48:23 2012
@@ -62,6 +62,8 @@ extern "C" {
 #define SVN_RA_SVN_CAP_PARTIAL_REPLAY "partial-replay"
 /* maps to SVN_RA_CAPABILITY_ATOMIC_REVPROPS */
 #define SVN_RA_SVN_CAP_ATOMIC_REVPROPS "atomic-revprops"
+/* maps to SVN_RA_CAPABILITY_INHERITED_PROPERTIES: */
+#define SVN_RA_SVN_CAP_INHERITED_PROPS "inherited-props"
 
 /** ra_svn passes @c svn_dirent_t fields over the wire as a list of
  * words, these are the values used to represent each field.

Modified: subversion/branches/inheritable-props/subversion/libsvn_ra_local/ra_plugin.c
URL: http://svn.apache.org/viewvc/subversion/branches/inheritable-props/subversion/libsvn_ra_local/ra_plugin.c?rev=1303251&r1=1303250&r2=1303251&view=diff
==============================================================================
--- subversion/branches/inheritable-props/subversion/libsvn_ra_local/ra_plugin.c (original)
+++ subversion/branches/inheritable-props/subversion/libsvn_ra_local/ra_plugin.c Wed Mar 21 01:48:23 2012
@@ -1482,7 +1482,8 @@ svn_ra_local__has_capability(svn_ra_sess
       || strcmp(capability, SVN_RA_CAPABILITY_LOG_REVPROPS) == 0
       || strcmp(capability, SVN_RA_CAPABILITY_PARTIAL_REPLAY) == 0
       || strcmp(capability, SVN_RA_CAPABILITY_COMMIT_REVPROPS) == 0
-      || strcmp(capability, SVN_RA_CAPABILITY_ATOMIC_REVPROPS) == 0)
+      || strcmp(capability, SVN_RA_CAPABILITY_ATOMIC_REVPROPS) == 0
+      || strcmp(capability, SVN_RA_CAPABILITY_INHERITED_PROPS) == 0)
     {
       *has = TRUE;
     }

Modified: subversion/branches/inheritable-props/subversion/libsvn_ra_neon/options.c
URL: http://svn.apache.org/viewvc/subversion/branches/inheritable-props/subversion/libsvn_ra_neon/options.c?rev=1303251&r1=1303250&r2=1303251&view=diff
==============================================================================
--- subversion/branches/inheritable-props/subversion/libsvn_ra_neon/options.c (original)
+++ subversion/branches/inheritable-props/subversion/libsvn_ra_neon/options.c Wed Mar 21 01:48:23 2012
@@ -161,6 +161,8 @@ parse_capabilities(ne_request *req,
                APR_HASH_KEY_STRING, capability_no);
   apr_hash_set(ras->capabilities, SVN_RA_CAPABILITY_ATOMIC_REVPROPS,
                APR_HASH_KEY_STRING, capability_no);
+  apr_hash_set(ras->capabilities, SVN_RA_CAPABILITY_INHERITED_PROPS,
+               APR_HASH_KEY_STRING, capability_no);
 
   /* Then find out which ones are supported. */
   val = ne_get_response_header(req, "dav");
@@ -215,6 +217,10 @@ parse_capabilities(ne_request *req,
       if (svn_cstring_match_list(SVN_DAV_NS_DAV_SVN_PARTIAL_REPLAY, vals))
         apr_hash_set(ras->capabilities, SVN_RA_CAPABILITY_PARTIAL_REPLAY,
                      APR_HASH_KEY_STRING, capability_yes);
+
+      if (svn_cstring_match_list(SVN_DAV_NS_DAV_SVN_INHERITED_PROPS, vals))
+        apr_hash_set(ras->capabilities, SVN_RA_CAPABILITY_INHERITED_PROPS,
+                     APR_HASH_KEY_STRING, capability_yes);
     }
 
   /* Not strictly capabilities, but while we're here, we might as well... */

Modified: subversion/branches/inheritable-props/subversion/libsvn_ra_serf/options.c
URL: http://svn.apache.org/viewvc/subversion/branches/inheritable-props/subversion/libsvn_ra_serf/options.c?rev=1303251&r1=1303250&r2=1303251&view=diff
==============================================================================
--- subversion/branches/inheritable-props/subversion/libsvn_ra_serf/options.c (original)
+++ subversion/branches/inheritable-props/subversion/libsvn_ra_serf/options.c Wed Mar 21 01:48:23 2012
@@ -324,6 +324,12 @@ capabilities_headers_iterator_callback(v
                        SVN_RA_CAPABILITY_PARTIAL_REPLAY,
                        APR_HASH_KEY_STRING, capability_yes);
         }
+      if (svn_cstring_match_list(SVN_DAV_NS_DAV_SVN_INHERITED_PROPS, vals))
+        {
+          apr_hash_set(orc->session->capabilities,
+                       SVN_RA_CAPABILITY_INHERITED_PROPS,
+                       APR_HASH_KEY_STRING, capability_yes);
+        }
     }
 
   /* SVN-specific headers -- if present, server supports HTTP protocol v2 */

Modified: subversion/branches/inheritable-props/subversion/libsvn_ra_svn/client.c
URL: http://svn.apache.org/viewvc/subversion/branches/inheritable-props/subversion/libsvn_ra_svn/client.c?rev=1303251&r1=1303250&r2=1303251&view=diff
==============================================================================
--- subversion/branches/inheritable-props/subversion/libsvn_ra_svn/client.c (original)
+++ subversion/branches/inheritable-props/subversion/libsvn_ra_svn/client.c Wed Mar 21 01:48:23 2012
@@ -2465,6 +2465,9 @@ static svn_error_t *ra_svn_has_capabilit
   else if (strcmp(capability, SVN_RA_CAPABILITY_ATOMIC_REVPROPS) == 0)
     *has = svn_ra_svn_has_capability(sess->conn,
                                      SVN_RA_SVN_CAP_ATOMIC_REVPROPS);
+  else if (strcmp(capability, SVN_RA_CAPABILITY_INHERITED_PROPS) == 0)
+    *has = svn_ra_svn_has_capability(sess->conn,
+                                     SVN_RA_SVN_CAP_INHERITED_PROPS);
   else  /* Don't know any other capabilities, so error. */
     {
       return svn_error_createf

Modified: subversion/branches/inheritable-props/subversion/mod_dav_svn/version.c
URL: http://svn.apache.org/viewvc/subversion/branches/inheritable-props/subversion/mod_dav_svn/version.c?rev=1303251&r1=1303250&r2=1303251&view=diff
==============================================================================
--- subversion/branches/inheritable-props/subversion/mod_dav_svn/version.c (original)
+++ subversion/branches/inheritable-props/subversion/mod_dav_svn/version.c Wed Mar 21 01:48:23 2012
@@ -146,6 +146,7 @@ get_vsn_options(apr_pool_t *p, apr_text_
   apr_text_append(p, phdr, SVN_DAV_NS_DAV_SVN_LOG_REVPROPS);
   apr_text_append(p, phdr, SVN_DAV_NS_DAV_SVN_ATOMIC_REVPROPS);
   apr_text_append(p, phdr, SVN_DAV_NS_DAV_SVN_PARTIAL_REPLAY);
+  apr_text_append(p, phdr, SVN_DAV_NS_DAV_SVN_INHERITED_PROPS);
   /* Mergeinfo is a special case: here we merely say that the server
    * knows how to handle mergeinfo -- whether the repository does too
    * is a separate matter.

Modified: subversion/branches/inheritable-props/subversion/svnserve/serve.c
URL: http://svn.apache.org/viewvc/subversion/branches/inheritable-props/subversion/svnserve/serve.c?rev=1303251&r1=1303250&r2=1303251&view=diff
==============================================================================
--- subversion/branches/inheritable-props/subversion/svnserve/serve.c (original)
+++ subversion/branches/inheritable-props/subversion/svnserve/serve.c Wed Mar 21 01:48:23 2012
@@ -3240,7 +3240,7 @@ svn_error_t *serve(svn_ra_svn_conn_t *co
   /* Send greeting.  We don't support version 1 any more, so we can
    * send an empty mechlist. */
   if (params->compression_level > 0)
-    SVN_ERR(svn_ra_svn_write_cmd_response(conn, pool, "nn()(wwwwwwww)",
+    SVN_ERR(svn_ra_svn_write_cmd_response(conn, pool, "nn()(wwwwwwwww)",
                                           (apr_uint64_t) 2, (apr_uint64_t) 2,
                                           SVN_RA_SVN_CAP_EDIT_PIPELINE,
                                           SVN_RA_SVN_CAP_SVNDIFF1,
@@ -3249,9 +3249,10 @@ svn_error_t *serve(svn_ra_svn_conn_t *co
                                           SVN_RA_SVN_CAP_DEPTH,
                                           SVN_RA_SVN_CAP_LOG_REVPROPS,
                                           SVN_RA_SVN_CAP_ATOMIC_REVPROPS,
-                                          SVN_RA_SVN_CAP_PARTIAL_REPLAY));
+                                          SVN_RA_SVN_CAP_PARTIAL_REPLAY,
+                                          SVN_RA_SVN_CAP_INHERITED_PROPS));
   else
-    SVN_ERR(svn_ra_svn_write_cmd_response(conn, pool, "nn()(wwwwwww)",
+    SVN_ERR(svn_ra_svn_write_cmd_response(conn, pool, "nn()(wwwwwwww)",
                                           (apr_uint64_t) 2, (apr_uint64_t) 2,
                                           SVN_RA_SVN_CAP_EDIT_PIPELINE,
                                           SVN_RA_SVN_CAP_ABSENT_ENTRIES,
@@ -3259,7 +3260,8 @@ svn_error_t *serve(svn_ra_svn_conn_t *co
                                           SVN_RA_SVN_CAP_DEPTH,
                                           SVN_RA_SVN_CAP_LOG_REVPROPS,
                                           SVN_RA_SVN_CAP_ATOMIC_REVPROPS,
-                                          SVN_RA_SVN_CAP_PARTIAL_REPLAY));
+                                          SVN_RA_SVN_CAP_PARTIAL_REPLAY,
+                                          SVN_RA_SVN_CAP_INHERITED_PROPS));
 
   /* Read client response, which we assume to be in version 2 format:
    * version, capability list, and client URL; then we do an auth