You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by iv...@apache.org on 2013/12/05 13:09:54 UTC

svn commit: r1548105 - in /subversion/trunk/subversion/mod_dav_svn: dav_svn.h mod_dav_svn.c

Author: ivan
Date: Thu Dec  5 12:09:54 2013
New Revision: 1548105

URL: http://svn.apache.org/r1548105
Log:
mod_dav_svn: Fix SVNAllowBulkUpdates directive merging.

* subversion/mod_dav_svn/dav_svn.h
  (dav_svn__bulk_upd_conf): Add CONF_BULKUPD_DEFAULT.
* subversion/mod_dav_svn/mod_dav_svn.c
  (create_dir_config): Initialize BULK_UPDATES to CONF_BULKUPD_DEFAULT.
  (dav_svn__get_bulk_updates_flag): Handle CONF_BULKUPD_DEFAULT value.

Modified:
    subversion/trunk/subversion/mod_dav_svn/dav_svn.h
    subversion/trunk/subversion/mod_dav_svn/mod_dav_svn.c

Modified: subversion/trunk/subversion/mod_dav_svn/dav_svn.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/mod_dav_svn/dav_svn.h?rev=1548105&r1=1548104&r2=1548105&view=diff
==============================================================================
--- subversion/trunk/subversion/mod_dav_svn/dav_svn.h (original)
+++ subversion/trunk/subversion/mod_dav_svn/dav_svn.h Thu Dec  5 12:09:54 2013
@@ -52,8 +52,11 @@ extern "C" {
 /* a pool-key for the shared dav_svn_root used by autoversioning  */
 #define DAV_SVN__AUTOVERSIONING_ACTIVITY "svn-autoversioning-activity"
 
-/* Option values for SVNAllowBulkUpdates */
+/* Option values for SVNAllowBulkUpdates.  Note that
+   it's important that CONF_BULKUPD_DEFAULT is 0 to make
+   dav_svn_merge_dir_config do the right thing. */
 typedef enum dav_svn__bulk_upd_conf {
+    CONF_BULKUPD_DEFAULT,
     CONF_BULKUPD_ON,
     CONF_BULKUPD_OFF,
     CONF_BULKUPD_PREFER

Modified: subversion/trunk/subversion/mod_dav_svn/mod_dav_svn.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/mod_dav_svn/mod_dav_svn.c?rev=1548105&r1=1548104&r2=1548105&view=diff
==============================================================================
--- subversion/trunk/subversion/mod_dav_svn/mod_dav_svn.c (original)
+++ subversion/trunk/subversion/mod_dav_svn/mod_dav_svn.c Thu Dec  5 12:09:54 2013
@@ -214,7 +214,7 @@ create_dir_config(apr_pool_t *p, char *d
      <Location /blah> directive. So we treat it as a urlpath. */
   if (dir)
     conf->root_dir = svn_urlpath__canonicalize(dir, p);
-  conf->bulk_updates = CONF_BULKUPD_ON;
+  conf->bulk_updates = CONF_BULKUPD_DEFAULT;
   conf->v2_protocol = CONF_FLAG_ON;
   conf->hooks_env = NULL;
   conf->txdelta_cache = CONF_FLAG_ON;
@@ -813,7 +813,12 @@ dav_svn__get_bulk_updates_flag(request_r
   dir_conf_t *conf;
 
   conf = ap_get_module_config(r->per_dir_config, &dav_svn_module);
-  return conf->bulk_updates;
+
+  /* SVNAllowBulkUpdates is 'on' by default. */
+  if (conf->bulk_updates == CONF_BULKUPD_DEFAULT)
+    return CONF_BULKUPD_ON;
+  else
+    return conf->bulk_updates;
 }