You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by hw...@apache.org on 2010/08/11 18:43:31 UTC

svn commit: r984468 [18/25] - in /subversion/branches/ignore-mergeinfo: ./ build/ build/generator/ build/generator/templates/ notes/ notes/tree-conflicts/ notes/wc-ng/ subversion/bindings/javahl/native/ subversion/bindings/javahl/src/org/apache/subvers...

Modified: subversion/branches/ignore-mergeinfo/subversion/mod_dav_svn/deadprops.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/mod_dav_svn/deadprops.c?rev=984468&r1=984467&r2=984468&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/mod_dav_svn/deadprops.c (original)
+++ subversion/branches/ignore-mergeinfo/subversion/mod_dav_svn/deadprops.c Wed Aug 11 16:43:22 2010
@@ -424,23 +424,15 @@ db_map_namespaces(dav_db *db,
 
 
 static dav_error *
-db_store(dav_db *db,
-         const dav_prop_name *name,
-         const apr_xml_elem *elem,
-         dav_namespace_map *mapping)
+decode_property_value(const svn_string_t **out_propval_p,
+                      const svn_string_t *maybe_encoded_propval,
+                      const apr_xml_elem *elem,
+                      apr_pool_t *pool)
 {
-  const svn_string_t *propval;
-  apr_pool_t *pool = db->p;
   apr_xml_attr *attr = elem->attr;
 
-  /* SVN sends property values as a big blob of bytes. Thus, there should be
-     no child elements of the property-name element. That also means that
-     the entire contents of the blob is located in elem->first_cdata. The
-     dav_xml_get_cdata() will figure it all out for us, but (normally) it
-     should be awfully fast and not need to copy any data. */
-
-  propval = svn_string_create
-    (dav_xml_get_cdata(elem, pool, 0 /* strip_white */), pool);
+  /* Default: no "encoding" attribute. */
+  *out_propval_p = maybe_encoded_propval;
 
   /* Check for special encodings of the property value. */
   while (attr)
@@ -451,7 +443,7 @@ db_store(dav_db *db,
 
           /* Handle known encodings here. */
           if (enc_type && (strcmp(enc_type, "base64") == 0))
-            propval = svn_base64_decode_string(propval, pool);
+            *out_propval_p = svn_base64_decode_string(maybe_encoded_propval, pool);
           else
             return dav_new_error(pool, HTTP_INTERNAL_SERVER_ERROR, 0,
                                  "Unknown property encoding");
@@ -461,6 +453,32 @@ db_store(dav_db *db,
       attr = attr->next;
     }
 
+  return NULL;
+}
+
+static dav_error *
+db_store(dav_db *db,
+         const dav_prop_name *name,
+         const apr_xml_elem *elem,
+         dav_namespace_map *mapping)
+{
+  const svn_string_t *propval;
+  apr_pool_t *pool = db->p;
+  dav_error *derr;
+
+  /* SVN sends property values as a big blob of bytes. Thus, there should be
+     no child elements of the property-name element. That also means that
+     the entire contents of the blob is located in elem->first_cdata. The
+     dav_xml_get_cdata() will figure it all out for us, but (normally) it
+     should be awfully fast and not need to copy any data. */
+
+  propval = svn_string_create
+    (dav_xml_get_cdata(elem, pool, 0 /* strip_white */), pool);
+
+  derr = decode_property_value(&propval, propval, elem, pool);
+  if (derr)
+    return derr;
+
   return save_value(db, name, propval);
 }
 

Modified: subversion/branches/ignore-mergeinfo/subversion/mod_dav_svn/reports/update.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/mod_dav_svn/reports/update.c?rev=984468&r1=984467&r2=984468&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/mod_dav_svn/reports/update.c (original)
+++ subversion/branches/ignore-mergeinfo/subversion/mod_dav_svn/reports/update.c Wed Aug 11 16:43:22 2010
@@ -782,6 +782,8 @@ struct window_handler_baton
   svn_boolean_t seen_first_window;  /* False until first window seen. */
   update_ctx_t *uc;
 
+  const char *base_checksum; /* For transfer as part of the S:txdelta element */
+
   /* The _real_ window handler and baton. */
   svn_txdelta_window_handler_t handler;
   void *handler_baton;
@@ -797,7 +799,14 @@ window_handler(svn_txdelta_window_t *win
   if (! wb->seen_first_window)
     {
       wb->seen_first_window = TRUE;
-      SVN_ERR(dav_svn__brigade_puts(wb->uc->bb, wb->uc->output, "<S:txdelta>"));
+
+      if (!wb->base_checksum)
+        SVN_ERR(dav_svn__brigade_puts(wb->uc->bb, wb->uc->output,
+                                      "<S:txdelta>"));
+      else
+        SVN_ERR(dav_svn__brigade_printf(wb->uc->bb, wb->uc->output,
+                                        "<S:txdelta base-checksum=\"%s\">",
+                                        wb->base_checksum));
     }
 
   SVN_ERR(wb->handler(window, wb->handler_baton));
@@ -850,6 +859,7 @@ upd_apply_textdelta(void *file_baton,
   wb = apr_palloc(file->pool, sizeof(*wb));
   wb->seen_first_window = FALSE;
   wb->uc = file->uc;
+  wb->base_checksum = file->base_checksum;
   base64_stream = dav_svn__make_base64_output_stream(wb->uc->bb,
                                                      wb->uc->output,
                                                      file->pool);

Modified: subversion/branches/ignore-mergeinfo/subversion/mod_dav_svn/repos.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/mod_dav_svn/repos.c?rev=984468&r1=984467&r2=984468&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/mod_dav_svn/repos.c (original)
+++ subversion/branches/ignore-mergeinfo/subversion/mod_dav_svn/repos.c Wed Aug 11 16:43:22 2010
@@ -3163,7 +3163,8 @@ deliver(const dav_resource *resource, ap
           const char *fs_parent_path =
             dav_svn__get_fs_parent_path(resource->info->r);
 
-          serr = svn_io_get_dirents2(&dirents, fs_parent_path, resource->pool);
+          serr = svn_io_get_dirents3(&dirents, fs_parent_path, TRUE,
+                                     resource->pool, resource->pool);
           if (serr != NULL)
             return dav_svn__convert_err(serr, HTTP_INTERNAL_SERVER_ERROR,
                                         "couldn't fetch dirents of SVNParentPath",
@@ -3389,7 +3390,8 @@ deliver(const dav_resource *resource, ap
               */
               ap_fputs(output, bb,
                        " </ul>\n <hr noshade><em>Powered by "
-                       "<a href=\"http://subversion.apache.org/\">Subversion"
+                       "<a href=\"http://subversion.apache.org/\">"
+                       "Apache Subversion"
                        "</a> version " SVN_VERSION "."
                        "</em>\n</body></html>");
             }