subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cmpil...@apache.org
Subject svn commit: r1383980 [4/6] - in /subversion/branches/master-passphrase: ./ build/ build/ac-macros/ build/generator/ build/generator/templates/ contrib/client-side/emacs/ subversion/ subversion/bindings/javahl/src/org/apache/subversion/javahl/ subversio...
Date Wed, 12 Sep 2012 14:43:59 GMT
Modified: subversion/branches/master-passphrase/subversion/libsvn_wc/update_editor.c
URL: http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/libsvn_wc/update_editor.c?rev=1383980&r1=1383979&r2=1383980&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/libsvn_wc/update_editor.c (original)
+++ subversion/branches/master-passphrase/subversion/libsvn_wc/update_editor.c Wed Sep 12
14:43:54 2012
@@ -1474,7 +1474,6 @@ check_tree_conflict(svn_skel_t **pconfli
   if (reason == svn_wc_conflict_reason_edited
       || reason == svn_wc_conflict_reason_deleted
       || reason == svn_wc_conflict_reason_moved_away
-      || reason == svn_wc_conflict_reason_moved_away_and_edited
       || reason == svn_wc_conflict_reason_replaced)
     /* When the node existed before (it was locally deleted, replaced or
      * edited), then 'update' cannot add it "again". So it can only send
@@ -1730,7 +1729,6 @@ delete_entry(const char *path,
         }
       else if (reason == svn_wc_conflict_reason_deleted
                || reason == svn_wc_conflict_reason_moved_away
-               || reason == svn_wc_conflict_reason_moved_away_and_edited
                || reason == svn_wc_conflict_reason_replaced)
         {
           /* The item does not exist locally because it was already shadowed.
@@ -2264,7 +2262,6 @@ open_directory(const char *path,
                                                   db->pool, db->pool));
       SVN_ERR_ASSERT(reason == svn_wc_conflict_reason_deleted
                      || reason == svn_wc_conflict_reason_moved_away
-                     || reason == svn_wc_conflict_reason_moved_away_and_edited
                      || reason == svn_wc_conflict_reason_replaced);
 
       /* Continue updating BASE */
@@ -3309,7 +3306,6 @@ open_file(const char *path,
                                                   fb->pool, fb->pool));
       SVN_ERR_ASSERT(reason == svn_wc_conflict_reason_deleted
                      || reason == svn_wc_conflict_reason_moved_away
-                     || reason == svn_wc_conflict_reason_moved_away_and_edited
                      || reason == svn_wc_conflict_reason_replaced);
 
       /* Continue updating BASE */

Modified: subversion/branches/master-passphrase/subversion/mod_dav_svn/activity.c
URL: http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/mod_dav_svn/activity.c?rev=1383980&r1=1383979&r2=1383980&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/mod_dav_svn/activity.c (original)
+++ subversion/branches/master-passphrase/subversion/mod_dav_svn/activity.c Wed Sep 12 14:43:54
2012
@@ -240,16 +240,21 @@ dav_svn__store_activity(const dav_svn_re
 dav_error *
 dav_svn__create_txn(const dav_svn_repos *repos,
                     const char **ptxn_name,
+                    apr_hash_t *revprops,
                     apr_pool_t *pool)
 {
   svn_revnum_t rev;
   svn_fs_txn_t *txn;
   svn_error_t *serr;
-  apr_hash_t *revprop_table = apr_hash_make(pool);
+
+  if (! revprops)
+    {
+      revprops = apr_hash_make(pool);
+    }
 
   if (repos->username)
     {
-      apr_hash_set(revprop_table, SVN_PROP_REVISION_AUTHOR, APR_HASH_KEY_STRING,
+      apr_hash_set(revprops, SVN_PROP_REVISION_AUTHOR, APR_HASH_KEY_STRING,
                    svn_string_create(repos->username, pool));
     }
 
@@ -262,8 +267,7 @@ dav_svn__create_txn(const dav_svn_repos 
     }
 
   serr = svn_repos_fs_begin_txn_for_commit2(&txn, repos->repos, rev,
-                                            revprop_table,
-                                            repos->pool);
+                                            revprops, repos->pool);
   if (serr != NULL)
     {
       return dav_svn__convert_err(serr, HTTP_INTERNAL_SERVER_ERROR,

Modified: subversion/branches/master-passphrase/subversion/mod_dav_svn/dav_svn.h
URL: http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/mod_dav_svn/dav_svn.h?rev=1383980&r1=1383979&r2=1383980&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/mod_dav_svn/dav_svn.h (original)
+++ subversion/branches/master-passphrase/subversion/mod_dav_svn/dav_svn.h Wed Sep 12 14:43:54
2012
@@ -389,7 +389,7 @@ const char *dav_svn__get_root_dir(reques
 int dav_svn__get_compression_level(void);
 
 /* Return the hook script environment parsed from the configuration. */
-apr_hash_t *dav_svn__get_hooks_env(request_rec *r);
+const char *dav_svn__get_hooks_env(request_rec *r);
 
 /** For HTTP protocol v2, these are the new URIs and URI stubs
     returned to the client in our OPTIONS response.  They all depend
@@ -420,10 +420,17 @@ const char *dav_svn__get_vtxn_root_stub(
 /*** activity.c ***/
 
 /* Create a new transaction based on HEAD in REPOS, setting *PTXN_NAME
-   to the name of that transaction.  Use POOL for allocations. */
+   to the name of that transaction.  REVPROPS is an optional hash of
+   const char * property names and const svn_string_t * values which
+   will be set as transactions properties on the transaction this
+   function creates.  Use POOL for allocations.
+
+   NOTE:  This function will overwrite the svn:author property, if
+   any, found in REVPROPS.  */
 dav_error *
 dav_svn__create_txn(const dav_svn_repos *repos,
                     const char **ptxn_name,
+                    apr_hash_t *revprops,
                     apr_pool_t *pool);
 
 /* If it exists, abort the transaction named TXN_NAME from REPOS.  Use
@@ -670,20 +677,15 @@ dav_svn__get_deleted_rev_report(const da
 
 /*** posts/ ***/
 
-/* The list of Subversion's custom POSTs. */
-/* ### TODO:  Populate this list and transmit its contents in the
-   ### OPTIONS response.
-static const char * dav_svn__posts_list[] = {
-  "create-txn",
-  NULL
-};
-*/
-
 /* The various POST handlers, defined in posts/, and used by repos.c.  */
 dav_error *
 dav_svn__post_create_txn(const dav_resource *resource,
                          svn_skel_t *request_skel,
                          ap_filter_t *output);
+dav_error *
+dav_svn__post_create_txn_with_props(const dav_resource *resource,
+                                    svn_skel_t *request_skel,
+                                    ap_filter_t *output);
 
 /*** authz.c ***/
 

Modified: subversion/branches/master-passphrase/subversion/mod_dav_svn/mod_dav_svn.c
URL: http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/mod_dav_svn/mod_dav_svn.c?rev=1383980&r1=1383979&r2=1383980&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/mod_dav_svn/mod_dav_svn.c (original)
+++ subversion/branches/master-passphrase/subversion/mod_dav_svn/mod_dav_svn.c Wed Sep 12
14:43:54 2012
@@ -96,7 +96,7 @@ typedef struct dir_conf_t {
   enum conf_flag txdelta_cache;      /* whether to enable txdelta caching */
   enum conf_flag fulltext_cache;     /* whether to enable fulltext caching */
   enum conf_flag revprop_cache;      /* whether to enable revprop caching */
-  apr_hash_t *hooks_env;             /* environment for hook scripts */
+  const char *hooks_env;             /* path to hook script env config file */
 } dir_conf_t;
 
 
@@ -550,43 +550,9 @@ SVNUseUTF8_cmd(cmd_parms *cmd, void *con
 static const char *
 SVNHooksEnv_cmd(cmd_parms *cmd, void *config, const char *arg1)
 {
-  apr_array_header_t *var;
-
-  var = svn_cstring_split(arg1, "=", TRUE, cmd->pool);
-  if (var && var->nelts >= 2)
-    {
-      dir_conf_t *conf = config;
-      const char *name;
-      const char *val;
-
-      if (! conf->hooks_env)
-        conf->hooks_env = apr_hash_make(cmd->pool);
-
-      name = apr_pstrdup(apr_hash_pool_get(conf->hooks_env),
-                         APR_ARRAY_IDX(var, 0, const char *));
-
-      /* Special case for values which contain '='. */
-      if (var->nelts > 2)
-        {
-          svn_stringbuf_t *buf;
-          int i;
-
-          buf = svn_stringbuf_create(APR_ARRAY_IDX(var, 1, const char *),
-                                     cmd->pool);
-          for (i = 2; i < var->nelts; i++)
-            {
-              svn_stringbuf_appendbyte(buf, '=');
-              svn_stringbuf_appendcstr(buf, APR_ARRAY_IDX(var, i, const char *));
-            }
-
-          val = apr_pstrdup(apr_hash_pool_get(conf->hooks_env), buf->data);
-        }
-      else
-        val = apr_pstrdup(apr_hash_pool_get(conf->hooks_env),
-                          APR_ARRAY_IDX(var, 1, const char *));
+  dir_conf_t *conf = config;
 
-      apr_hash_set(conf->hooks_env, name, APR_HASH_KEY_STRING, val);
-    }
+  conf->hooks_env = svn_dirent_internal_style(arg1, cmd->pool);
 
   return NULL;
 }
@@ -878,7 +844,7 @@ dav_svn__get_compression_level(void)
   return svn__compression_level;
 }
 
-apr_hash_t *
+const char *
 dav_svn__get_hooks_env(request_rec *r)
 {
   dir_conf_t *conf;
@@ -1136,10 +1102,12 @@ static const command_rec cmds[] =
                "use UTF-8 as native character encoding (default is ASCII)."),
 
   /* per directory/location */
-  AP_INIT_ITERATE("SVNHooksEnv", SVNHooksEnv_cmd, NULL,
-                  ACCESS_CONF|RSRC_CONF,
-                  "Set the environment of hook scripts via any number of "
-                  "VAR=VAL arguments (the default hook environment is empty)."),
+  AP_INIT_TAKE1("SVNHooksEnv", SVNHooksEnv_cmd, NULL,
+                ACCESS_CONF|RSRC_CONF,
+                "Sets the path to the configuration file for the environment "
+                "of hook scripts. If not absolute, the path is relative to "
+                "the repository's conf directory (by default the hooks-env "
+                "file in the repository is used)."),
   { NULL }
 };
 

Modified: subversion/branches/master-passphrase/subversion/mod_dav_svn/posts/create_txn.c
URL: http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/mod_dav_svn/posts/create_txn.c?rev=1383980&r1=1383979&r2=1383980&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/mod_dav_svn/posts/create_txn.c (original)
+++ subversion/branches/master-passphrase/subversion/mod_dav_svn/posts/create_txn.c Wed Sep
12 14:43:54 2012
@@ -42,13 +42,64 @@ dav_svn__post_create_txn(const dav_resou
   request_rec *r = resource->info->r;
 
   /* Create a Subversion repository transaction based on HEAD. */
-  if ((derr = dav_svn__create_txn(resource->info->repos, &txn_name,
+  if ((derr = dav_svn__create_txn(resource->info->repos, &txn_name, NULL,
                                   resource->pool)))
     return derr;
 
   /* Build a "201 Created" response with header that tells the
      client our new transaction's name. */
-  vtxn_name =  apr_table_get(r->headers_in, SVN_DAV_VTXN_NAME_HEADER);
+  vtxn_name = apr_table_get(r->headers_in, SVN_DAV_VTXN_NAME_HEADER);
+  if (vtxn_name && vtxn_name[0])
+    {
+      /* If the client supplied a vtxn name then store a mapping from
+         the client name to the FS transaction name in the activity
+         database. */
+      if ((derr  = dav_svn__store_activity(resource->info->repos,
+                                           vtxn_name, txn_name)))
+        return derr;
+      apr_table_set(r->headers_out, SVN_DAV_VTXN_NAME_HEADER, vtxn_name);
+    }
+  else
+    apr_table_set(r->headers_out, SVN_DAV_TXN_NAME_HEADER, txn_name);
+
+  r->status = HTTP_CREATED;
+
+  return NULL;
+}
+
+
+/* Respond to a "create-txn-with-props" POST request.
+ *
+ * Syntax:  ( create-txn-with-props (PROPNAME PROPVAL [PROPNAME PROPVAL ...])
+ */
+dav_error *
+dav_svn__post_create_txn_with_props(const dav_resource *resource,
+                                    svn_skel_t *request_skel,
+                                    ap_filter_t *output)
+{
+  const char *txn_name;
+  const char *vtxn_name;
+  dav_error *derr;
+  svn_error_t *err;
+  request_rec *r = resource->info->r;
+  apr_hash_t *revprops;
+  svn_skel_t *proplist_skel = request_skel->children->next;
+
+  if ((err = svn_skel__parse_proplist(&revprops, proplist_skel,
+                                      resource->pool)))
+    {
+      return dav_svn__convert_err(err, HTTP_BAD_REQUEST,
+                                  "Malformatted request skel", resource->pool);
+    }
+  
+  /* Create a Subversion repository transaction based on HEAD. */
+  if ((derr = dav_svn__create_txn(resource->info->repos, &txn_name,
+                                  revprops, resource->pool)))
+    return derr;
+
+  /* Build a "201 Created" response with header that tells the
+     client our new transaction's name. */
+  vtxn_name = apr_table_get(r->headers_in, SVN_DAV_VTXN_NAME_HEADER);
   if (vtxn_name && vtxn_name[0])
     {
       /* If the client supplied a vtxn name then store a mapping from

Modified: subversion/branches/master-passphrase/subversion/mod_dav_svn/reports/update.c
URL: http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/mod_dav_svn/reports/update.c?rev=1383980&r1=1383979&r2=1383980&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/mod_dav_svn/reports/update.c (original)
+++ subversion/branches/master-passphrase/subversion/mod_dav_svn/reports/update.c Wed Sep
12 14:43:54 2012
@@ -81,6 +81,10 @@ typedef struct update_ctx_t {
   /* True iff client requested all data inline in the report. */
   svn_boolean_t send_all;
 
+  /* True iff client requested that properties be transmitted
+     inline.  (This is implied when "send_all" is set.)  */
+  svn_boolean_t include_props;
+
   /* SVNDIFF version to send to client.  */
   int svndiff_version;
 
@@ -119,6 +123,10 @@ typedef struct item_baton_t {
   /* File/dir copied? */
   svn_boolean_t copyfrom;
 
+  /* Does the client need to fetch additional properties for this
+     item? */
+  svn_boolean_t fetch_props;
+
   /* Array of const char * names of removed properties.  (Used only
      for copied files/dirs in skelta mode.)  */
   apr_array_header_t *removed_props;
@@ -432,7 +440,7 @@ open_helper(svn_boolean_t is_dir,
 
 
 static svn_error_t *
-close_helper(svn_boolean_t is_dir, item_baton_t *baton)
+close_helper(svn_boolean_t is_dir, item_baton_t *baton, apr_pool_t *pool)
 {
   if (baton->uc->resource_walk)
     return SVN_NO_ERROR;
@@ -446,14 +454,21 @@ close_helper(svn_boolean_t is_dir, item_
 
       for (i = 0; i < baton->removed_props->nelts; i++)
         {
-          /* We already XML-escaped the property name in change_xxx_prop. */
           qname = APR_ARRAY_IDX(baton->removed_props, i, const char *);
+          qname = apr_xml_quote_string(pool, qname, 1);
           SVN_ERR(dav_svn__brigade_printf(baton->uc->bb, baton->uc->output,
                                           "<S:remove-prop name=\"%s\"/>"
                                           DEBUG_CR, qname));
         }
     }
 
+  /* If our client need to fetch properties, let it know. */
+  if (baton->fetch_props)
+    SVN_ERR(dav_svn__brigade_printf(baton->uc->bb, baton->uc->output,
+                                    "<S:fetch-props/>" DEBUG_CR));
+    
+
+  /* Let's tie it off, nurse. */
   if (baton->added)
     SVN_ERR(dav_svn__brigade_printf(baton->uc->bb, baton->uc->output,
                                     "</S:add-%s>" DEBUG_CR,
@@ -473,13 +488,13 @@ maybe_start_update_report(update_ctx_t *
 {
   if ((! uc->resource_walk) && (! uc->started_update))
     {
-      SVN_ERR(dav_svn__brigade_printf(uc->bb, uc->output,
-                                      DAV_XML_HEADER DEBUG_CR
-                                      "<S:update-report xmlns:S=\""
-                                      SVN_XML_NAMESPACE "\" "
-                                      "xmlns:V=\"" SVN_DAV_PROP_NS_DAV "\" "
-                                      "xmlns:D=\"DAV:\" %s>" DEBUG_CR,
-                                      uc->send_all ? "send-all=\"true\"" : ""));
+      SVN_ERR(dav_svn__brigade_printf(
+                  uc->bb, uc->output,
+                  DAV_XML_HEADER DEBUG_CR "<S:update-report xmlns:S=\""
+                  SVN_XML_NAMESPACE "\" xmlns:V=\"" SVN_DAV_PROP_NS_DAV "\" "
+                  "xmlns:D=\"DAV:\" %s %s>" DEBUG_CR,
+                  uc->send_all ? "send-all=\"true\"" : "",
+                  uc->include_props ? "inline-props=\"true\"" : ""));
 
       uc->started_update = TRUE;
     }
@@ -593,87 +608,117 @@ upd_open_directory(const char *path,
 
 
 static svn_error_t *
+send_propchange(item_baton_t *b,
+                const char *name,
+                const svn_string_t *value,
+                apr_pool_t *pool)
+{
+  const char *qname;
+
+  /* Ensure that the property name is XML-safe.
+     apr_xml_quote_string() doesn't realloc if there is nothing to
+     quote, so dup the name, but only if necessary. */
+  qname = apr_xml_quote_string(b->pool, name, 1);
+  if (qname == name)
+    qname = apr_pstrdup(b->pool, name);
+
+  if (value)
+    {
+      const char *qval;
+
+      if (svn_xml_is_xml_safe(value->data, value->len))
+        {
+          svn_stringbuf_t *tmp = NULL;
+          svn_xml_escape_cdata_string(&tmp, value, pool);
+          qval = tmp->data;
+          SVN_ERR(dav_svn__brigade_printf(b->uc->bb, b->uc->output,
+                                          "<S:set-prop name=\"%s\">",
+                                          qname));
+        }
+      else
+        {
+          qval = svn_base64_encode_string2(value, TRUE, pool)->data;
+          SVN_ERR(dav_svn__brigade_printf(b->uc->bb, b->uc->output,
+                                          "<S:set-prop name=\"%s\" "
+                                          "encoding=\"base64\">" DEBUG_CR,
+                                          qname));
+        }
+
+      SVN_ERR(dav_svn__brigade_puts(b->uc->bb, b->uc->output, qval));
+      SVN_ERR(dav_svn__brigade_puts(b->uc->bb, b->uc->output,
+                                    "</S:set-prop>" DEBUG_CR));
+    }
+  else  /* value is null, so this is a prop removal */
+    {
+      SVN_ERR(dav_svn__brigade_printf(b->uc->bb, b->uc->output,
+                                      "<S:remove-prop name=\"%s\"/>"
+                                      DEBUG_CR,
+                                      qname));
+    }
+  
+  return SVN_NO_ERROR;
+}
+
+static svn_error_t *
 upd_change_xxx_prop(void *baton,
                     const char *name,
                     const svn_string_t *value,
                     apr_pool_t *pool)
 {
   item_baton_t *b = baton;
-  const char *qname;
 
   /* Resource walks say nothing about props. */
   if (b->uc->resource_walk)
     return SVN_NO_ERROR;
 
-  /* Else this not a resource walk, so either send props or cache them
-     to send later, depending on whether this is a modern report
-     response or not. */
-
-  qname = apr_xml_quote_string(b->pool, name, 1);
-
-  /* apr_xml_quote_string doesn't realloc if there is nothing to
-     quote, so dup the name, but only if necessary. */
-  if (qname == name)
-    qname = apr_pstrdup(b->pool, name);
+  /* If we get here, this not a resource walk, so either send props or
+     cache them to send later, depending on whether this is a modern
+     report response or not. */
 
   /* Even if we are not in send-all mode we have the prop changes already,
      so send them to the client now instead of telling the client to fetch
      them later. */
-  if (b->uc->send_all || !b->added)
+  if (b->uc->send_all)
     {
-      if (value)
+      SVN_ERR(send_propchange(b, name, value, pool));
+    }
+  else
+    {
+      if (b->added)
         {
-          const char *qval;
-
-          if (svn_xml_is_xml_safe(value->data, value->len))
+          /* This is an addition in "skelta" (that is, "not send-all")
+             mode so there is no strict need for an inline response.
+             Clients will assume that added objects need all to have
+             all their properties explicitly fetched from the
+             server. */
+
+          /* That said, beginning in Subversion 1.8, clients might
+             request even in skelta mode that we transmit properties
+             on newly added files explicitly. */
+          if ((! b->copyfrom) && value && b->uc->include_props)
             {
-              svn_stringbuf_t *tmp = NULL;
-              svn_xml_escape_cdata_string(&tmp, value, pool);
-              qval = tmp->data;
-              SVN_ERR(dav_svn__brigade_printf(b->uc->bb, b->uc->output,
-                                              "<S:set-prop name=\"%s\">",
-                                              qname));
+              SVN_ERR(send_propchange(b, name, value, pool));
             }
-          else
+
+          /* Now, if the object is actually a copy and this is a
+             property removal, we'll still need to cache (and later
+             transmit) property removals, because fetching the
+             object's current property set alone isn't sufficient to
+             communicate the fact that additional properties were, in
+             fact, removed from the copied base object in order to
+             arrive at that set. */
+          if (b->copyfrom && (! value))
             {
-              qval = svn_base64_encode_string2(value, TRUE, pool)->data;
-              SVN_ERR(dav_svn__brigade_printf(b->uc->bb, b->uc->output,
-                                              "<S:set-prop name=\"%s\" "
-                                              "encoding=\"base64\">" DEBUG_CR,
-                                              qname));
+              if (! b->removed_props)
+                b->removed_props = apr_array_make(b->pool, 1, sizeof(name));
+              
+              APR_ARRAY_PUSH(b->removed_props, const char *) = name;
             }
-
-          SVN_ERR(dav_svn__brigade_puts(b->uc->bb, b->uc->output, qval));
-          SVN_ERR(dav_svn__brigade_puts(b->uc->bb, b->uc->output,
-                                        "</S:set-prop>" DEBUG_CR));
         }
-      else  /* value is null, so this is a prop removal */
-        {
-          SVN_ERR(dav_svn__brigade_printf(b->uc->bb, b->uc->output,
-                                          "<S:remove-prop name=\"%s\"/>"
-                                          DEBUG_CR,
-                                          qname));
-        }
-    }
-  else if (!value)
-    {
-      /* This is an addition in "skelta" (that is, "not send-all")
-         mode so there is no strict need for an inline response.
-         Clients will assume that added objects need all to have all
-         their properties explicitly fetched from the server. */
-
-      /* Now, if the object is actually a copy, we'll still need to
-         cache (and later transmit) property removals, because
-         fetching the object's current property set alone isn't
-         sufficient to communicate the fact that additional properties
-         were, in fact, removed from the copied base object in order
-         to arrive at that set. */
-      if (b->copyfrom)
+      else
         {
-          if (! b->removed_props)
-            b->removed_props = apr_array_make(b->pool, 1, sizeof(name));
-
-          APR_ARRAY_PUSH(b->removed_props, const char *) = qname;
+          /* "skelta" mode non-addition.  Just send the change. */
+          SVN_ERR(send_propchange(b, name, value, pool));
         }
     }
 
@@ -684,7 +729,7 @@ upd_change_xxx_prop(void *baton,
 static svn_error_t *
 upd_close_directory(void *dir_baton, apr_pool_t *pool)
 {
-  return close_helper(TRUE /* is_dir */, dir_baton);
+  return close_helper(TRUE /* is_dir */, dir_baton, pool);
 }
 
 
@@ -845,7 +890,7 @@ upd_close_file(void *file_baton, const c
                                       text_checksum));
     }
 
-  return close_helper(FALSE /* is_dir */, file);
+  return close_helper(FALSE /* is_dir */, file, pool);
 }
 
 
@@ -944,6 +989,7 @@ dav_svn__update_report(const dav_resourc
               && (strcmp(this_attr->value, "true") == 0))
             {
               uc.send_all = TRUE;
+              uc.include_props = TRUE;
               break;
             }
         }
@@ -1066,6 +1112,14 @@ dav_svn__update_report(const dav_resourc
           if (strcmp(cdata, "no") == 0)
             text_deltas = FALSE;
         }
+      if (child->ns == ns && strcmp(child->name, "include-props") == 0)
+        {
+          cdata = dav_xml_get_cdata(child, resource->pool, 1);
+          if (! *cdata)
+            return malformed_element_error(child->name, resource->pool);
+          if (strcmp(cdata, "no") != 0)
+            uc.include_props = TRUE;
+        }
     }
 
   if (!saw_depth && !saw_recursive && (requested_depth == svn_depth_unknown))

Modified: subversion/branches/master-passphrase/subversion/mod_dav_svn/repos.c
URL: http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/mod_dav_svn/repos.c?rev=1383980&r1=1383979&r2=1383980&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/mod_dav_svn/repos.c (original)
+++ subversion/branches/master-passphrase/subversion/mod_dav_svn/repos.c Wed Sep 12 14:43:54
2012
@@ -2217,8 +2217,9 @@ get_resource(request_rec *r,
                                          HTTP_INTERNAL_SERVER_ERROR, r);
         }
 
-      /* Configure the hooks environment, if not empty. */
-      svn_repos_hooks_setenv(repos->repos, dav_svn__get_hooks_env(r));
+      /* Configure hook script environment variables. */
+      svn_repos_hooks_setenv(repos->repos, dav_svn__get_hooks_env(r),
+                             r->connection->pool, r->pool);
     }
 
   /* cache the filesystem object */
@@ -4444,7 +4445,7 @@ handle_post_request(request_rec *r,
                     dav_resource *resource,
                     ap_filter_t *output)
 {
-  svn_skel_t *request_skel;
+  svn_skel_t *request_skel, *post_skel;
   int status;
   apr_pool_t *pool = resource->pool;
 
@@ -4461,16 +4462,23 @@ handle_post_request(request_rec *r,
     return dav_svn__new_error(pool, HTTP_BAD_REQUEST, 0,
                               "Unable to identify skel POST request flavor.");
 
-  if (svn_skel__matches_atom(request_skel->children, "create-txn"))
+  post_skel = request_skel->children;
+
+  /* NOTE: If you add POST handlers here, you'll want to advertise
+     that the server supports them, too.  See version.c:get_option(). */
+
+  if (svn_skel__matches_atom(post_skel, "create-txn"))
     {
       return dav_svn__post_create_txn(resource, request_skel, output);
     }
-  else
+  else if (svn_skel__matches_atom(post_skel, "create-txn-with-props"))
     {
-      return dav_svn__new_error(pool, HTTP_BAD_REQUEST, 0,
-                                "Unsupported skel POST request flavor.");
+      return dav_svn__post_create_txn_with_props(resource,
+                                                 request_skel, output);
     }
-  /* NOTREACHED */
+
+  return dav_svn__new_error(pool, HTTP_BAD_REQUEST, 0,
+                            "Unsupported skel POST request flavor.");
 }
 
 int dav_svn__method_post(request_rec *r)

Modified: subversion/branches/master-passphrase/subversion/mod_dav_svn/version.c
URL: http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/mod_dav_svn/version.c?rev=1383980&r1=1383979&r2=1383980&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/mod_dav_svn/version.c (original)
+++ subversion/branches/master-passphrase/subversion/mod_dav_svn/version.c Wed Sep 12 14:43:54
2012
@@ -234,6 +234,16 @@ get_option(const dav_resource *resource,
      DeltaV-free!  If we're configured to advise this support, do so.  */
   if (resource->info->repos->v2_protocol)
     {
+      /* The list of Subversion's custom POSTs.  You'll want to keep
+         this in sync with the handling of these suckers in
+         handle_post_request().  */
+      static const char * posts_list[] = {
+        "create-txn",
+        "create-txn-with-props",
+        NULL
+      };
+      const char **this_post = posts_list;
+
       apr_table_set(r->headers_out, SVN_DAV_ROOT_URI_HEADER, repos_root_uri);
       apr_table_set(r->headers_out, SVN_DAV_ME_RESOURCE_HEADER,
                     apr_pstrcat(resource->pool, repos_root_uri, "/",
@@ -256,6 +266,15 @@ get_option(const dav_resource *resource,
       apr_table_set(r->headers_out, SVN_DAV_VTXN_STUB_HEADER,
                     apr_pstrcat(resource->pool, repos_root_uri, "/",
                                 dav_svn__get_vtxn_stub(r), (char *)NULL));
+
+      /* Report the supported POST types. */
+      while (*this_post)
+        {
+          apr_table_addn(r->headers_out, SVN_DAV_SUPPORTED_POSTS_HEADER,
+                         apr_pstrcat(resource->pool, *this_post,
+                                     (char *)NULL));
+          this_post++;
+        }
     }
 
   return NULL;
@@ -398,7 +417,7 @@ dav_svn__checkout(dav_resource *resource
           shared_activity = apr_pstrdup(resource->info->r->pool, uuid_buf);
 
           derr = dav_svn__create_txn(resource->info->repos, &shared_txn_name,
-                                     resource->info->r->pool);
+                                     NULL, resource->info->r->pool);
           if (derr) return derr;
 
           derr = dav_svn__store_activity(resource->info->repos,
@@ -1138,7 +1157,8 @@ make_activity(dav_resource *resource)
                                   SVN_DAV_ERROR_NAMESPACE,
                                   SVN_DAV_ERROR_TAG);
 
-  err = dav_svn__create_txn(resource->info->repos, &txn_name, resource->pool);
+  err = dav_svn__create_txn(resource->info->repos, &txn_name, 
+                            NULL, resource->pool);
   if (err != NULL)
     return err;
 



Mime
View raw message