Modified: subversion/branches/ev2-export/subversion/libsvn_wc/wc_db_wcroot.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/libsvn_wc/wc_db_wcroot.c?rev=1449262&r1=1449261&r2=1449262&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/libsvn_wc/wc_db_wcroot.c 
(original)
+++ subversion/branches/ev2-export/subversion/libsvn_wc/wc_db_wcroot.c Sat Feb 
23 01:25:38 2013
@@ -188,20 +188,36 @@ close_wcroot(void *data)
 svn_error_t *
 svn_wc__db_open(svn_wc__db_t **db,
                 svn_config_t *config,
-                svn_boolean_t auto_upgrade,
+                svn_boolean_t open_without_upgrade,
                 svn_boolean_t enforce_empty_wq,
                 apr_pool_t *result_pool,
                 apr_pool_t *scratch_pool)
 {
   *db = apr_pcalloc(result_pool, sizeof(**db));
   (*db)->config = config;
-  (*db)->auto_upgrade = auto_upgrade;
+  (*db)->verify_format = !open_without_upgrade;
   (*db)->enforce_empty_wq = enforce_empty_wq;
   (*db)->dir_data = apr_hash_make(result_pool);
 
+  (*db)->state_pool = result_pool;
+
   /* Don't need to initialize (*db)->parse_cache, due to the calloc above */
+  if (config)
+    {
+      svn_error_t *err;
+      svn_boolean_t sqlite_exclusive = FALSE;
 
-  (*db)->state_pool = result_pool;
+      err = svn_config_get_bool(config, &sqlite_exclusive,
+                                SVN_CONFIG_SECTION_WORKING_COPY,
+                                SVN_CONFIG_OPTION_SQLITE_EXCLUSIVE,
+                                FALSE);
+      if (err)
+        {
+          svn_error_clear(err);
+        }
+      else
+        (*db)->exclusive = sqlite_exclusive;
+    }
 
   return SVN_NO_ERROR;
 }
@@ -240,7 +256,7 @@ svn_wc__db_pdh_create_wcroot(svn_wc__db_
                              svn_sqlite__db_t *sdb,
                              apr_int64_t wc_id,
                              int format,
-                             svn_boolean_t auto_upgrade,
+                             svn_boolean_t verify_format,
                              svn_boolean_t enforce_empty_wq,
                              apr_pool_t *result_pool,
                              apr_pool_t *scratch_pool)
@@ -278,7 +294,7 @@ svn_wc__db_pdh_create_wcroot(svn_wc__db_
   /* Verify that no work items exists. If they do, then our integrity is
      suspect and, thus, we cannot use this database.  */
   if (format >= SVN_WC__HAS_WORK_QUEUE
-      && (enforce_empty_wq || (format < SVN_WC__VERSION && auto_upgrade)))
+      && (enforce_empty_wq || (format < SVN_WC__VERSION && verify_format)))
     {
       svn_error_t *err = verify_no_work(sdb);
       if (err)
@@ -286,7 +302,7 @@ svn_wc__db_pdh_create_wcroot(svn_wc__db_
           /* Special message for attempts to upgrade a 1.7-dev wc with
              outstanding workqueue items. */
           if (err->apr_err == SVN_ERR_WC_CLEANUP_REQUIRED
-              && format < SVN_WC__VERSION && auto_upgrade)
+              && format < SVN_WC__VERSION && verify_format)
             err = svn_error_quick_wrap(err, _("Cleanup with an older 1.7 "
                                               "client before upgrading with "
                                               "this client"));
@@ -295,23 +311,16 @@ svn_wc__db_pdh_create_wcroot(svn_wc__db_
     }
 
   /* Auto-upgrade the SDB if possible.  */
-  if (format < SVN_WC__VERSION)
+  if (format < SVN_WC__VERSION && verify_format)
     {
-      if (auto_upgrade)
-        {
-          if (format >= SVN_WC__WC_NG_VERSION)
-            SVN_ERR(svn_wc__upgrade_sdb(&format, wcroot_abspath, sdb, format,
-                                        scratch_pool));
-        }
-      else
-        return svn_error_createf(SVN_ERR_WC_UPGRADE_REQUIRED, NULL,
-                                 _("The working copy at '%s'\nis too old "
-                                   "(format %d) to work with client version "
-                                   "'%s' (expects format %d). You need to "
-                                   "upgrade the working copy first.\n"),
-                                   svn_dirent_local_style(wcroot_abspath,
-                                   scratch_pool), format, SVN_VERSION,
-                                   SVN_WC__VERSION);
+      return svn_error_createf(SVN_ERR_WC_UPGRADE_REQUIRED, NULL,
+                               _("The working copy at '%s'\nis too old "
+                                 "(format %d) to work with client version "
+                                 "'%s' (expects format %d). You need to "
+                                 "upgrade the working copy first.\n"),
+                               svn_dirent_local_style(wcroot_abspath,
+                                                      scratch_pool),
+                               format, SVN_VERSION, SVN_WC__VERSION);
     }
 
   *wcroot = apr_palloc(result_pool, sizeof(**wcroot));
@@ -524,18 +533,6 @@ svn_wc__db_wcroot_parse_local_abspath(sv
 
       if (adm_subdir_kind == svn_node_dir)
         {
-          svn_boolean_t sqlite_exclusive = FALSE;
-
-          err = svn_config_get_bool(db->config, &sqlite_exclusive,
-                                    SVN_CONFIG_SECTION_WORKING_COPY,
-                                    SVN_CONFIG_OPTION_SQLITE_EXCLUSIVE,
-                                    FALSE);
-          if (err)
-            {
-              svn_error_clear(err);
-              sqlite_exclusive = FALSE;
-            }
-
           /* We always open the database in read/write mode.  If the database
              isn't writable in the filesystem, SQLite will internally open
              it as read-only, and we'll get an error if we try to do a write
@@ -546,7 +543,7 @@ svn_wc__db_wcroot_parse_local_abspath(sv
              as the filesystem allows. */
           err = svn_wc__db_util_open_db(&sdb, local_abspath, SDB_FILE,
                                         svn_sqlite__mode_readwrite,
-                                        sqlite_exclusive, NULL,
+                                        db->exclusive, NULL,
                                         db->state_pool, scratch_pool);
           if (err == NULL)
             {
@@ -668,7 +665,7 @@ try_symlink_as_dir:
       err = svn_wc__db_pdh_create_wcroot(wcroot,
                             apr_pstrdup(db->state_pool, local_abspath),
                             sdb, wc_id, FORMAT_FROM_SDB,
-                            db->auto_upgrade, db->enforce_empty_wq,
+                            db->verify_format, db->enforce_empty_wq,
                             db->state_pool, scratch_pool);
       if (err && (err->apr_err == SVN_ERR_WC_UNSUPPORTED_FORMAT ||
                   err->apr_err == SVN_ERR_WC_UPGRADE_REQUIRED) &&
@@ -736,7 +733,7 @@ try_symlink_as_dir:
       SVN_ERR(svn_wc__db_pdh_create_wcroot(wcroot,
                             apr_pstrdup(db->state_pool, local_abspath),
                             NULL, UNKNOWN_WC_ID, wc_format,
-                            db->auto_upgrade, db->enforce_empty_wq,
+                            db->verify_format, db->enforce_empty_wq,
                             db->state_pool, scratch_pool));
     }
 

Modified: subversion/branches/ev2-export/subversion/libsvn_wc/workqueue.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/libsvn_wc/workqueue.c?rev=1449262&r1=1449261&r2=1449262&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/libsvn_wc/workqueue.c (original)
+++ subversion/branches/ev2-export/subversion/libsvn_wc/workqueue.c Sat Feb 23 
01:25:38 2013
@@ -416,6 +416,8 @@ run_postupgrade(svn_wc__db_t *db,
   if (err && err->apr_err == SVN_ERR_ENTRY_NOT_FOUND)
     /* No entry, this can happen when the wq item is rerun. */
     svn_error_clear(err);
+  else
+    SVN_ERR(err);
 
   SVN_ERR(svn_wc__db_get_wcroot(&wcroot_abspath, db, wri_abspath,
                                 scratch_pool, scratch_pool));

Modified: subversion/branches/ev2-export/subversion/mod_authz_svn/INSTALL
URL: 
http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/mod_authz_svn/INSTALL?rev=1449262&r1=1449261&r2=1449262&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/mod_authz_svn/INSTALL (original)
+++ subversion/branches/ev2-export/subversion/mod_authz_svn/INSTALL Sat Feb 23 
01:25:38 2013
@@ -186,6 +186,24 @@ II.   Configuration
          The "Require" statement in the previous example is not strictly
          needed, but has been included for clarity.
 
+      H. Example 8: Separate authz and groups files.
+
+         This configuration allows storing the groups separately from the
+         main authz file with the authorization rules.
+
+         <Location /svn>
+           DAV svn
+           SVNParentPath /path/to/reposparent
+
+           AuthType Basic
+           AuthName "Subversion repository"
+           AuthUserFile /path/to/htpasswd/file
+
+           AuthzSVNAccessFile /path/to/access/file
+           AuthzSVNGroupsFile /path/to/groups/file
+
+           Require valid-user
+         </Location>
 
    2. Specifying permissions
 

Modified: 
subversion/branches/ev2-export/subversion/mod_authz_svn/mod_authz_svn.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/mod_authz_svn/mod_authz_svn.c?rev=1449262&r1=1449261&r2=1449262&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/mod_authz_svn/mod_authz_svn.c 
(original)
+++ subversion/branches/ev2-export/subversion/mod_authz_svn/mod_authz_svn.c Sat 
Feb 23 01:25:38 2013
@@ -63,6 +63,7 @@ typedef struct authz_svn_config_rec {
   const char *base_path;
   const char *access_file;
   const char *repo_relative_access_file;
+  const char *groups_file;
   const char *force_username_case;
 } authz_svn_config_rec;
 
@@ -147,6 +148,16 @@ AuthzSVNReposRelativeAccessFile_cmd(cmd_
   return NULL;
 }
 
+static const char *
+AuthzSVNGroupsFile_cmd(cmd_parms *cmd, void *config, const char *arg1)
+{
+  authz_svn_config_rec *conf = config;
+
+  conf->groups_file = canonicalize_access_file(arg1, TRUE, cmd->pool);
+
+  return NULL;
+}
+
 /* Implements the #cmds member of Apache's #module vtable. */
 static const command_rec authz_svn_cmds[] =
 {
@@ -170,6 +181,14 @@ static const command_rec authz_svn_cmds[
                 "file containing permissions of repository paths. Path may "
                 "be an repository relative URL (^/) or absolute file:// URL "
                 "to a text file in a Subversion repository."),
+  AP_INIT_TAKE1("AuthzSVNGroupsFile",
+                AuthzSVNGroupsFile_cmd,
+                NULL,
+                OR_AUTHCFG,
+                "Path to text file containing group definitions for all "
+                "repositories.  Path may be an repository relative URL (^/) "
+                "or absolute file:// URL to a text file in a Subversion "
+                "repository."),
   AP_INIT_FLAG("AuthzSVNAnonymous", ap_set_flag_slot,
                (void *)APR_OFFSETOF(authz_svn_config_rec, anonymous),
                OR_AUTHCFG,
@@ -331,6 +350,12 @@ get_access_conf(request_rec *r, authz_sv
   ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
                 "Path to authz file is %s", access_file);
 
+  if (conf->groups_file)
+    {
+      ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
+                    "Path to groups file is %s", conf->groups_file);
+    }
+
   cache_key = apr_pstrcat(scratch_pool, "mod_authz_svn:",
                           access_file, (char *)NULL);
   apr_pool_userdata_get(&user_data, cache_key, r->connection->pool);
@@ -338,7 +363,8 @@ get_access_conf(request_rec *r, authz_sv
   if (access_conf == NULL)
     {
       svn_err = svn_repos_authz_read2(&access_conf, access_file,
-                                      TRUE, repos_path, r->connection->pool);
+                                      conf->groups_file, TRUE, repos_path,
+                                      r->connection->pool);
       if (svn_err)
         {
           log_svn_error(APLOG_MARK, r,

Modified: subversion/branches/ev2-export/subversion/mod_dav_svn/deadprops.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/mod_dav_svn/deadprops.c?rev=1449262&r1=1449261&r2=1449262&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/mod_dav_svn/deadprops.c (original)
+++ subversion/branches/ev2-export/subversion/mod_dav_svn/deadprops.c Sat Feb 
23 01:25:38 2013
@@ -170,6 +170,7 @@ save_value(dav_db *db, const dav_prop_na
   const char *propname;
   svn_error_t *serr;
   const dav_resource *resource = db->resource;
+  apr_pool_t *subpool;
 
   /* get the repos-local name */
   get_repos_propname(db, name, &propname);
@@ -204,13 +205,16 @@ save_value(dav_db *db, const dav_prop_na
 
   */
 
+  /* A subpool to cope with mod_dav making multiple calls, e.g. during
+     PROPPATCH with multiple values. */
+  subpool = svn_pool_create(db->resource->pool);
   if (db->resource->baselined)
     {
       if (db->resource->working)
         {
           serr = svn_repos_fs_change_txn_prop(resource->info->root.txn,
                                               propname, value,
-                                              resource->pool);
+                                              subpool);
         }
       else
         {
@@ -221,7 +225,7 @@ save_value(dav_db *db, const dav_prop_na
                                                TRUE, TRUE,
                                                db->authz_read_func,
                                                db->authz_read_baton,
-                                               resource->pool);
+                                               subpool);
 
           /* Prepare any hook failure message to get sent over the wire */
           if (serr)
@@ -244,20 +248,21 @@ save_value(dav_db *db, const dav_prop_na
           dav_svn__operational_log(resource->info,
                                    svn_log__change_rev_prop(
                                       resource->info->root.rev,
-                                      propname, resource->pool));
+                                      propname, subpool));
         }
     }
   else if (resource->info->restype == DAV_SVN_RESTYPE_TXN_COLLECTION)
     {
       serr = svn_repos_fs_change_txn_prop(resource->info->root.txn,
-                                          propname, value, resource->pool);
+                                          propname, value, subpool);
     }
   else
     {
       serr = svn_repos_fs_change_node_prop(resource->info->root.root,
                                            get_repos_path(resource->info),
-                                           propname, value, resource->pool);
+                                           propname, value, subpool);
     }
+  svn_pool_destroy(subpool);
 
   if (serr != NULL)
     return dav_svn__convert_err(serr, HTTP_INTERNAL_SERVER_ERROR,
@@ -538,6 +543,7 @@ db_remove(dav_db *db, const dav_prop_nam
 {
   svn_error_t *serr;
   const char *propname;
+  apr_pool_t *subpool;
 
   /* get the repos-local name */
   get_repos_propname(db, name, &propname);
@@ -546,11 +552,15 @@ db_remove(dav_db *db, const dav_prop_nam
   if (propname == NULL)
     return NULL;
 
+  /* A subpool to cope with mod_dav making multiple calls, e.g. during
+     PROPPATCH with multiple values. */
+  subpool = svn_pool_create(db->resource->pool);
+
   /* Working Baseline or Working (Version) Resource */
   if (db->resource->baselined)
     if (db->resource->working)
       serr = svn_repos_fs_change_txn_prop(db->resource->info->root.txn,
-                                          propname, NULL, db->resource->pool);
+                                          propname, NULL, subpool);
     else
       /* ### VIOLATING deltaV: you can't proppatch a baseline, it's
          not a working resource!  But this is how we currently
@@ -562,11 +572,12 @@ db_remove(dav_db *db, const dav_prop_nam
                                            propname, NULL, NULL, TRUE, TRUE,
                                            db->authz_read_func,
                                            db->authz_read_baton,
-                                           db->resource->pool);
+                                           subpool);
   else
     serr = svn_repos_fs_change_node_prop(db->resource->info->root.root,
                                          get_repos_path(db->resource->info),
-                                         propname, NULL, db->resource->pool);
+                                         propname, NULL, subpool);
+  svn_pool_destroy(subpool);
   if (serr != NULL)
     return dav_svn__convert_err(serr, HTTP_INTERNAL_SERVER_ERROR,
                                 "could not remove a property",

Modified: subversion/branches/ev2-export/subversion/mod_dav_svn/version.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/mod_dav_svn/version.c?rev=1449262&r1=1449261&r2=1449262&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/mod_dav_svn/version.c (original)
+++ subversion/branches/ev2-export/subversion/mod_dav_svn/version.c Sat Feb 23 
01:25:38 2013
@@ -150,6 +150,7 @@ get_vsn_options(apr_pool_t *p, apr_text_
   apr_text_append(p, phdr, SVN_DAV_NS_DAV_SVN_PARTIAL_REPLAY);
   apr_text_append(p, phdr, SVN_DAV_NS_DAV_SVN_INHERITED_PROPS);
   apr_text_append(p, phdr, SVN_DAV_NS_DAV_SVN_INLINE_PROPS);
+  apr_text_append(p, phdr, SVN_DAV_NS_DAV_SVN_GET_FILE_REVS_REVERSE);
   /* 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.
@@ -242,6 +243,24 @@ get_option(const dav_resource *resource,
         }
     }
 
+  if (resource->info->repos->repos)
+    {
+        svn_error_t *serr;
+        svn_boolean_t has;
+
+        serr = svn_repos_has_capability(resource->info->repos->repos, &has,
+                                        SVN_REPOS_CAPABILITY_MERGEINFO,
+                                        r->pool);
+        if (serr)
+        return dav_svn__convert_err
+                    (serr, HTTP_INTERNAL_SERVER_ERROR,
+                    "Error fetching repository capabilities",
+                    resource->pool);
+
+        apr_table_set(r->headers_out, SVN_DAV_REPOSITORY_MERGEINFO,
+                    has ? "yes" : "no");
+    }
+
   /* Welcome to the 2nd generation of the svn HTTP protocol, now
      DeltaV-free!  If we're configured to advise this support, do so.  */
   if (resource->info->repos->v2_protocol)


Reply via email to