subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cmpil...@apache.org
Subject svn commit: r1397073 - in /subversion/branches/http-dynamic-prop-namespaces/subversion/libsvn_ra_serf: property.c serf.c
Date Thu, 11 Oct 2012 14:26:30 GMT
Author: cmpilato
Date: Thu Oct 11 14:26:30 2012
New Revision: 1397073

URL: http://svn.apache.org/viewvc?rev=1397073&view=rev
Log:
On the 'http-dynamic-prop-namespaces' branch: teach libsvn_ra_serf to
recognize the extensible property XML namespace when parsing responses.

* subversion/libsvn_ra_serf/property.c
  (svn_ra_serf__svnname_from_wirename, select_revprops): If the
    property is delivered using a namespace URI within the extensible
    namespace, decode the extended section for use as the property prefix.

* subversion/libsvn_ra_serf/serf.c
  (dirent_walker): If the property is delivered using a namespace URI
    within the extensible namespace, note that this node has
    user-visible properties.

Modified:
    subversion/branches/http-dynamic-prop-namespaces/subversion/libsvn_ra_serf/property.c
    subversion/branches/http-dynamic-prop-namespaces/subversion/libsvn_ra_serf/serf.c

Modified: subversion/branches/http-dynamic-prop-namespaces/subversion/libsvn_ra_serf/property.c
URL: http://svn.apache.org/viewvc/subversion/branches/http-dynamic-prop-namespaces/subversion/libsvn_ra_serf/property.c?rev=1397073&r1=1397072&r2=1397073&view=diff
==============================================================================
--- subversion/branches/http-dynamic-prop-namespaces/subversion/libsvn_ra_serf/property.c
(original)
+++ subversion/branches/http-dynamic-prop-namespaces/subversion/libsvn_ra_serf/property.c
Thu Oct 11 14:26:30 2012
@@ -843,6 +843,15 @@ svn_ra_serf__svnname_from_wirename(const
   if (strcmp(ns, SVN_DAV_PROP_NS_SVN) == 0)
     return apr_pstrcat(result_pool, SVN_PROP_PREFIX, name, (char *)NULL);
 
+  /* Check for something within our extensible namespace. */
+  if (strncmp(ns, SVN_DAV_PROP_NS_EXTENSIBLE,
+              sizeof(SVN_DAV_PROP_NS_EXTENSIBLE) - 1) == 0)
+    {
+      const char *relpath = svn_uri_skip_ancestor(SVN_DAV_PROP_NS_EXTENSIBLE,
+                                                  ns, result_pool);
+      return apr_pstrcat(result_pool, relpath, ":", name, (char *)NULL);
+    }
+
   if (strcmp(ns, SVN_PROP_PREFIX) == 0)
     return apr_pstrcat(result_pool, SVN_PROP_PREFIX, name, (char *)NULL);
 
@@ -932,6 +941,13 @@ select_revprops(void *baton,
     prop_name = name;
   else if (strcmp(ns, SVN_DAV_PROP_NS_SVN) == 0)
     prop_name = apr_pstrcat(result_pool, SVN_PROP_PREFIX, name, (char *)NULL);
+  else if (strncmp(ns, SVN_DAV_PROP_NS_EXTENSIBLE,
+                   sizeof(SVN_DAV_PROP_NS_EXTENSIBLE) - 1) == 0)
+    {
+      const char *relpath = svn_uri_skip_ancestor(SVN_DAV_PROP_NS_EXTENSIBLE,
+                                                  ns, scratch_pool);
+      prop_name = apr_pstrcat(result_pool, relpath, ":", name, (char *)NULL);
+    }
   else if (strcmp(ns, SVN_PROP_PREFIX) == 0)
     prop_name = apr_pstrcat(result_pool, SVN_PROP_PREFIX, name, (char *)NULL);
   else if (strcmp(ns, "") == 0)

Modified: subversion/branches/http-dynamic-prop-namespaces/subversion/libsvn_ra_serf/serf.c
URL: http://svn.apache.org/viewvc/subversion/branches/http-dynamic-prop-namespaces/subversion/libsvn_ra_serf/serf.c?rev=1397073&r1=1397072&r2=1397073&view=diff
==============================================================================
--- subversion/branches/http-dynamic-prop-namespaces/subversion/libsvn_ra_serf/serf.c (original)
+++ subversion/branches/http-dynamic-prop-namespaces/subversion/libsvn_ra_serf/serf.c Thu
Oct 11 14:26:30 2012
@@ -676,6 +676,11 @@ dirent_walker(void *baton,
     {
       dwb->entry->has_props = TRUE;
     }
+  else if (strncmp(ns, SVN_DAV_PROP_NS_EXTENSIBLE,
+                   sizeof(SVN_DAV_PROP_NS_EXTENSIBLE) - 1) == 0)
+    {
+      dwb->entry->has_props = TRUE;
+    }
   else if (strcmp(ns, SVN_DAV_PROP_NS_DAV) == 0)
     {
       if(strcmp(name, "deadprop-count") == 0)



Mime
View raw message