subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From prabh...@apache.org
Subject svn commit: r1465596 [4/5] - in /subversion/branches/verify-keep-going: ./ contrib/server-side/svncutter/ subversion/bindings/cxxhl/include/ subversion/bindings/cxxhl/include/svncxxhl/ subversion/bindings/cxxhl/src/ subversion/bindings/cxxhl/tests/ sub...
Date Mon, 08 Apr 2013 11:47:04 GMT
Modified: subversion/branches/verify-keep-going/subversion/libsvn_repos/load-fs-vtable.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_repos/load-fs-vtable.c?rev=1465596&r1=1465595&r2=1465596&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_repos/load-fs-vtable.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_repos/load-fs-vtable.c Mon Apr  8 11:47:02 2013
@@ -912,16 +912,20 @@ close_revision(void *baton)
   const char *conflict_msg = NULL;
   svn_revnum_t committed_rev;
   svn_error_t *err;
-  const char *txn_name;
+  const char *txn_name = NULL;
+  apr_hash_t *hooks_env;
 
   /* If we're skipping this revision or it has an invalid revision
      number, we're done here. */
   if (rb->skipped || (rb->rev <= 0))
     return SVN_NO_ERROR;
 
-  /* Get the txn name, if it will be needed. */
+  /* Get the txn name and hooks environment if they will be needed. */
   if (pb->use_pre_commit_hook || pb->use_post_commit_hook)
     {
+      SVN_ERR(svn_repos__parse_hooks_env(&hooks_env, pb->repos->hooks_env_path,
+                                         rb->pool, rb->pool));
+
       err = svn_fs_txn_name(&txn_name, rb->txn, rb->pool);
       if (err)
         {
@@ -933,7 +937,8 @@ close_revision(void *baton)
   /* Run the pre-commit hook, if so commanded. */
   if (pb->use_pre_commit_hook)
     {
-      err = svn_repos__hooks_pre_commit(pb->repos, txn_name, rb->pool);
+      err = svn_repos__hooks_pre_commit(pb->repos, hooks_env,
+                                        txn_name, rb->pool);
       if (err)
         {
           svn_error_clear(svn_fs_abort_txn(rb->txn, rb->pool));
@@ -965,8 +970,9 @@ close_revision(void *baton)
   /* Run post-commit hook, if so commanded.  */
   if (pb->use_post_commit_hook)
     {
-      if ((err = svn_repos__hooks_post_commit(pb->repos, committed_rev,
-                                              txn_name, rb->pool)))
+      if ((err = svn_repos__hooks_post_commit(pb->repos, hooks_env,
+                                              committed_rev, txn_name,
+                                              rb->pool)))
         return svn_error_create
           (SVN_ERR_REPOS_POST_COMMIT_HOOK_FAILED, err,
            _("Commit succeeded, but post-commit hook failed"));

Modified: subversion/branches/verify-keep-going/subversion/libsvn_repos/repos.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_repos/repos.c?rev=1465596&r1=1465595&r2=1465596&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_repos/repos.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_repos/repos.c Mon Apr  8 11:47:02 2013
@@ -1164,96 +1164,21 @@ create_conf(svn_repos_t *repos, apr_pool
   return SVN_NO_ERROR;
 }
 
-/* Baton for parse_hooks_env_option. */
-struct parse_hooks_env_option_baton {
-  /* The name of the section being parsed. If not the default section,
-   * the section name should match the name of a hook to which the
-   * options apply. */
-  const char *section;
-  apr_hash_t *hooks_env;
-} parse_hooks_env_option_baton;
-
-/* An implementation of svn_config_enumerator2_t.
- * Set environment variable NAME to value VALUE in the environment for
- * all hooks (in case the current section is the default section),
- * or the hook with the name corresponding to the current section's name. */
-static svn_boolean_t
-parse_hooks_env_option(const char *name, const char *value,
-                       void *baton, apr_pool_t *pool)
-{
-  struct parse_hooks_env_option_baton *bo = baton;
-  apr_pool_t *result_pool = apr_hash_pool_get(bo->hooks_env);
-  apr_hash_t *hook_env;
-  
-  hook_env = svn_hash_gets(bo->hooks_env, bo->section);
-  if (hook_env == NULL)
-    {
-      hook_env = apr_hash_make(result_pool);
-      svn_hash_sets(bo->hooks_env, apr_pstrdup(result_pool, bo->section),
-                    hook_env);
-    }
-  svn_hash_sets(hook_env, apr_pstrdup(result_pool, name),
-                apr_pstrdup(result_pool, value));
-
-  return TRUE;
-}
-
-struct parse_hooks_env_section_baton {
-  svn_config_t *cfg;
-  apr_hash_t *hooks_env;
-} parse_hooks_env_section_baton;
-
-/* An implementation of svn_config_section_enumerator2_t. */
-static svn_boolean_t
-parse_hooks_env_section(const char *name, void *baton, apr_pool_t *pool)
-{
-  struct parse_hooks_env_section_baton *b = baton;
-  struct parse_hooks_env_option_baton bo;
-
-  bo.section = name;
-  bo.hooks_env = b->hooks_env;
-
-  (void)svn_config_enumerate2(b->cfg, name, parse_hooks_env_option, &bo, pool);
-
-  return TRUE;
-}
-
-/* Parse the hooks env file for this repository. */
-static svn_error_t *
-parse_hooks_env(svn_repos_t *repos,
-                const char *local_abspath,
-                apr_pool_t *result_pool,
-                apr_pool_t *scratch_pool)
-{
-  svn_config_t *cfg;
-  int n;
-  struct parse_hooks_env_section_baton b;
-
-  SVN_ERR(svn_config_read2(&cfg, local_abspath, FALSE, TRUE, scratch_pool));
-  b.cfg = cfg;
-  b.hooks_env = apr_hash_make(result_pool);
-  n = svn_config_enumerate_sections2(cfg, parse_hooks_env_section, &b,
-                                     scratch_pool);
-  if (n > 0)
-    repos->hooks_env = b.hooks_env;
-
-  return SVN_NO_ERROR;
-}
-
 svn_error_t *
 svn_repos_hooks_setenv(svn_repos_t *repos,
                        const char *hooks_env_path,
-                       apr_pool_t *result_pool,
                        apr_pool_t *scratch_pool)
 {
   if (hooks_env_path == NULL)
-    hooks_env_path = svn_dirent_join(repos->conf_path,
-                                     SVN_REPOS__CONF_HOOKS_ENV, scratch_pool);
+    repos->hooks_env_path = svn_dirent_join(repos->conf_path,
+                                            SVN_REPOS__CONF_HOOKS_ENV,
+                                            repos->pool);
   else if (!svn_dirent_is_absolute(hooks_env_path))
-    hooks_env_path = svn_dirent_join(repos->conf_path, hooks_env_path,
-                                     scratch_pool);
-
-  SVN_ERR(parse_hooks_env(repos, hooks_env_path, result_pool, scratch_pool));
+    repos->hooks_env_path = svn_dirent_join(repos->conf_path,
+                                            hooks_env_path,
+                                            repos->pool);
+  else
+    repos->hooks_env_path = apr_pstrdup(repos->pool, hooks_env_path);
 
   return SVN_NO_ERROR;
 }
@@ -1273,8 +1198,9 @@ create_svn_repos_t(const char *path, apr
   repos->conf_path = svn_dirent_join(path, SVN_REPOS__CONF_DIR, pool);
   repos->hook_path = svn_dirent_join(path, SVN_REPOS__HOOK_DIR, pool);
   repos->lock_path = svn_dirent_join(path, SVN_REPOS__LOCK_DIR, pool);
+  repos->hooks_env_path = NULL;
   repos->repository_capabilities = apr_hash_make(pool);
-  repos->hooks_env = NULL;
+  repos->pool = pool;
 
   return repos;
 }
@@ -1751,6 +1677,62 @@ svn_repos_has_capability(svn_repos_t *re
   return SVN_NO_ERROR;
 }
 
+svn_error_t *
+svn_repos_capabilities(apr_hash_t **capabilities,
+                       svn_repos_t *repos,
+                       apr_pool_t *result_pool,
+                       apr_pool_t *scratch_pool)
+{
+  static const char *const queries[] = {
+    SVN_REPOS_CAPABILITY_MERGEINFO,
+    NULL
+  };
+  const char *const *i;
+
+  *capabilities = apr_hash_make(result_pool);
+
+  for (i = queries; *i; i++)
+    {
+      svn_boolean_t has;
+      SVN_ERR(svn_repos_has_capability(repos, &has, *i, scratch_pool));
+      if (has)
+        svn_hash_sets(*capabilities, *i, *i);
+    }
+
+  return SVN_NO_ERROR;
+}
+
+svn_error_t *
+svn_repos_info_format(int *repos_format,
+                      svn_version_t **supports_version,
+                      svn_repos_t *repos,
+                      apr_pool_t *result_pool,
+                      apr_pool_t *scratch_pool)
+{
+  *repos_format = repos->format;
+  *supports_version = apr_palloc(result_pool, sizeof(svn_version_t));
+
+  (*supports_version)->major = SVN_VER_MAJOR;
+  (*supports_version)->minor = 0;
+  (*supports_version)->patch = 0;
+  (*supports_version)->tag = "";
+
+  switch (repos->format)
+    {
+    case SVN_REPOS__FORMAT_NUMBER_LEGACY:
+      break;
+    case SVN_REPOS__FORMAT_NUMBER_1_4:
+      (*supports_version)->minor = 4;
+      break;
+#ifdef SVN_DEBUG
+# if SVN_REPOS__FORMAT_NUMBER != SVN_REPOS__FORMAT_NUMBER_1_4
+#  error "Need to add a 'case' statement here"
+# endif
+#endif
+    }
+
+  return SVN_NO_ERROR;
+}
 
 svn_fs_t *
 svn_repos_fs(svn_repos_t *repos)
@@ -1829,7 +1811,7 @@ svn_repos_recover4(const char *path,
 struct freeze_baton_t {
   apr_array_header_t *paths;
   int counter;
-  svn_error_t *(*freeze_body)(void *, apr_pool_t *);
+  svn_repos_freeze_func_t freeze_body;
   void *baton;
 };
 
@@ -1890,7 +1872,7 @@ multi_freeze(void *baton,
    while frozen. */
 svn_error_t *
 svn_repos_freeze(apr_array_header_t *paths,
-                 svn_error_t *(*freeze_body)(void *, apr_pool_t *),
+                 svn_repos_freeze_func_t freeze_body,
                  void *baton,
                  apr_pool_t *pool)
 {

Modified: subversion/branches/verify-keep-going/subversion/libsvn_repos/repos.h
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_repos/repos.h?rev=1465596&r1=1465595&r2=1465596&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_repos/repos.h (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_repos/repos.h Mon Apr  8 11:47:02 2013
@@ -47,7 +47,8 @@ extern "C" {
    formats are accepted by some versions of Subversion which do not
    pay attention to the FS format number.
 */
-#define SVN_REPOS__FORMAT_NUMBER         5
+#define SVN_REPOS__FORMAT_NUMBER         SVN_REPOS__FORMAT_NUMBER_1_4
+#define SVN_REPOS__FORMAT_NUMBER_1_4     5
 #define SVN_REPOS__FORMAT_NUMBER_LEGACY  3
 
 
@@ -126,6 +127,10 @@ struct svn_repos_t
   /* The format number of this repository. */
   int format;
 
+  /* The path to the repository's hooks enviroment file. If NULL, hooks run
+   * in an empty environment. */
+  const char *hooks_env_path;
+
   /* The FS backend in use within this repository. */
   const char *fs_type;
 
@@ -147,25 +152,36 @@ struct svn_repos_t
      those constants' addresses, therefore). */
   apr_hash_t *repository_capabilities;
 
-  /* The environment inherited to hook scripts. If NULL, hooks run
-   * in an empty environment.
-   *
-   * This is a nested hash table.
-   * The entry with name SVN_REPOS__HOOKS_ENV_DEFAULT_SECTION contains the
-   * default environment for all hooks in form of an apr_hash_t with keys
-   * and values describing the names and values of environment variables.
-   * Defaults can be overridden by an entry matching the name of a hook.
-   * E.g. an entry with the name SVN_REPOS__HOOK_PRE_COMMIT provides the
-   * environment specific to the pre-commit hook. */
-  apr_hash_t *hooks_env;
+  /* Pool from which this structure was allocated.  Also used for
+     auxiliary repository-related data that requires a matching
+     lifespan.  (As the svn_repos_t structure tends to be relatively
+     long-lived, please be careful regarding this pool's usage.)  */
+  apr_pool_t *pool;
 };
 
 
 /*** Hook-running Functions ***/
 
+/* Set *HOOKS_ENV_P to the parsed contents of the hooks-env file
+   LOCAL_ABSPATH, allocated in RESULT_POOL.  (This result is suitable
+   for delivery to the various hook wrapper functions which accept a
+   'hooks_env' parameter.)  If LOCAL_ABSPATH is NULL, set *HOOKS_ENV_P
+   to NULL.
+
+   Use SCRATCH_POOL for temporary allocations.  */
+svn_error_t *
+svn_repos__parse_hooks_env(apr_hash_t **hooks_env_p,
+                           const char *local_abspath,
+                           apr_pool_t *result_pool,
+                           apr_pool_t *scratch_pool);
+
 /* Run the start-commit hook for REPOS.  Use POOL for any temporary
    allocations.  If the hook fails, return SVN_ERR_REPOS_HOOK_FAILURE.
 
+   HOOKS_ENV is a hash of hook script environment information returned
+   via svn_repos__parse_hooks_env() (or NULL if no such information is
+   available).
+
    USER is the authenticated name of the user starting the commit.
 
    CAPABILITIES is a list of 'const char *' capability names (using
@@ -177,6 +193,7 @@ struct svn_repos_t
    created. */
 svn_error_t *
 svn_repos__hooks_start_commit(svn_repos_t *repos,
+                              apr_hash_t *hooks_env,
                               const char *user,
                               const apr_array_header_t *capabilities,
                               const char *txn_name,
@@ -185,18 +202,28 @@ svn_repos__hooks_start_commit(svn_repos_
 /* Run the pre-commit hook for REPOS.  Use POOL for any temporary
    allocations.  If the hook fails, return SVN_ERR_REPOS_HOOK_FAILURE.
 
+   HOOKS_ENV is a hash of hook script environment information returned
+   via svn_repos__parse_hooks_env() (or NULL if no such information is
+   available).
+
    TXN_NAME is the name of the transaction that is being committed.  */
 svn_error_t *
 svn_repos__hooks_pre_commit(svn_repos_t *repos,
+                            apr_hash_t *hooks_env,
                             const char *txn_name,
                             apr_pool_t *pool);
 
 /* Run the post-commit hook for REPOS.  Use POOL for any temporary
    allocations.  If the hook fails, run SVN_ERR_REPOS_HOOK_FAILURE.
 
+   HOOKS_ENV is a hash of hook script environment information returned
+   via svn_repos__parse_hooks_env() (or NULL if no such information is
+   available).
+
    REV is the revision that was created as a result of the commit.  */
 svn_error_t *
 svn_repos__hooks_post_commit(svn_repos_t *repos,
+                             apr_hash_t *hooks_env,
                              svn_revnum_t rev,
                              const char *txn_name,
                              apr_pool_t *pool);
@@ -205,6 +232,10 @@ svn_repos__hooks_post_commit(svn_repos_t
    temporary allocations.  If the hook fails, return
    SVN_ERR_REPOS_HOOK_FAILURE.
 
+   HOOKS_ENV is a hash of hook script environment information returned
+   via svn_repos__parse_hooks_env() (or NULL if no such information is
+   available).
+
    REV is the revision whose property is being changed.
    AUTHOR is the authenticated name of the user changing the prop.
    NAME is the name of the property being changed.
@@ -217,6 +248,7 @@ svn_repos__hooks_post_commit(svn_repos_t
    will be written. */
 svn_error_t *
 svn_repos__hooks_pre_revprop_change(svn_repos_t *repos,
+                                    apr_hash_t *hooks_env,
                                     svn_revnum_t rev,
                                     const char *author,
                                     const char *name,
@@ -228,6 +260,10 @@ svn_repos__hooks_pre_revprop_change(svn_
    temporary allocations.  If the hook fails, return
    SVN_ERR_REPOS_HOOK_FAILURE.
 
+   HOOKS_ENV is a hash of hook script environment information returned
+   via svn_repos__parse_hooks_env() (or NULL if no such information is
+   available).
+
    REV is the revision whose property was changed.
    AUTHOR is the authenticated name of the user who changed the prop.
    NAME is the name of the property that was changed, and OLD_VALUE is
@@ -239,6 +275,7 @@ svn_repos__hooks_pre_revprop_change(svn_
    the property is being created, no data will be written. */
 svn_error_t *
 svn_repos__hooks_post_revprop_change(svn_repos_t *repos,
+                                     apr_hash_t *hooks_env,
                                      svn_revnum_t rev,
                                      const char *author,
                                      const char *name,
@@ -249,6 +286,10 @@ svn_repos__hooks_post_revprop_change(svn
 /* Run the pre-lock hook for REPOS.  Use POOL for any temporary
    allocations.  If the hook fails, return SVN_ERR_REPOS_HOOK_FAILURE.
 
+   HOOKS_ENV is a hash of hook script environment information returned
+   via svn_repos__parse_hooks_env() (or NULL if no such information is
+   available).
+
    PATH is the path being locked, USERNAME is the person doing it,
    COMMENT is the comment of the lock, and is treated as an empty
    string when NULL is given.  STEAL-LOCK is a flag if the user is
@@ -261,6 +302,7 @@ svn_repos__hooks_post_revprop_change(svn
 
 svn_error_t *
 svn_repos__hooks_pre_lock(svn_repos_t *repos,
+                          apr_hash_t *hooks_env,
                           const char **token,
                           const char *path,
                           const char *username,
@@ -271,10 +313,15 @@ svn_repos__hooks_pre_lock(svn_repos_t *r
 /* Run the post-lock hook for REPOS.  Use POOL for any temporary
    allocations.  If the hook fails, return SVN_ERR_REPOS_HOOK_FAILURE.
 
+   HOOKS_ENV is a hash of hook script environment information returned
+   via svn_repos__parse_hooks_env() (or NULL if no such information is
+   available).
+
    PATHS is an array of paths being locked, USERNAME is the person
    who did it.  */
 svn_error_t *
 svn_repos__hooks_post_lock(svn_repos_t *repos,
+                           apr_hash_t *hooks_env,
                            const apr_array_header_t *paths,
                            const char *username,
                            apr_pool_t *pool);
@@ -282,11 +329,16 @@ svn_repos__hooks_post_lock(svn_repos_t *
 /* Run the pre-unlock hook for REPOS.  Use POOL for any temporary
    allocations.  If the hook fails, return SVN_ERR_REPOS_HOOK_FAILURE.
 
+   HOOKS_ENV is a hash of hook script environment information returned
+   via svn_repos__parse_hooks_env() (or NULL if no such information is
+   available).
+
    PATH is the path being unlocked, USERNAME is the person doing it,
    TOKEN is the lock token to be unlocked which should not be NULL,
    and BREAK-LOCK is a flag if the user is breaking the lock.  */
 svn_error_t *
 svn_repos__hooks_pre_unlock(svn_repos_t *repos,
+                            apr_hash_t *hooks_env,
                             const char *path,
                             const char *username,
                             const char *token,
@@ -296,10 +348,15 @@ svn_repos__hooks_pre_unlock(svn_repos_t 
 /* Run the post-unlock hook for REPOS.  Use POOL for any temporary
    allocations.  If the hook fails, return SVN_ERR_REPOS_HOOK_FAILURE.
 
+   HOOKS_ENV is a hash of hook script environment information returned
+   via svn_repos__parse_hooks_env() (or NULL if no such information is
+   available).
+
    PATHS is an array of paths being unlocked, USERNAME is the person
    who did it.  */
 svn_error_t *
 svn_repos__hooks_post_unlock(svn_repos_t *repos,
+                             apr_hash_t *hooks_env,
                              const apr_array_header_t *paths,
                              const char *username,
                              apr_pool_t *pool);

Modified: subversion/branches/verify-keep-going/subversion/libsvn_subr/auth.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_subr/auth.c?rev=1465596&r1=1465595&r2=1465596&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_subr/auth.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_subr/auth.c Mon Apr  8 11:47:02 2013
@@ -617,14 +617,23 @@ svn_auth_get_platform_specific_client_pr
 
 svn_error_t *
 svn_auth_cleanup_walk(svn_auth_baton_t *baton,
-                      svn_auth_cleanup_callback cleanup,
+                      svn_auth_cleanup_func_t cleanup_func,
                       void *cleanup_baton,
                       apr_pool_t *scratch_pool)
 {
+  /* ### FIXME: svn_auth__simple_cleanup_walk() oversteps its reach,
+     ### so this test for an SVN_AUTH_CRED_SIMPLE provider is
+     ### pointless.  Why not allow users to pass in an auth baton with
+     ### no registered providers -- after all, there's nothing
+     ### provider-centric about any of the existing plumbing.  That
+     ### plumbing is just a glorified wrapper around a bunch of shell
+     ### commands exercised on the ~/.subversion/auth tree.  --
+     ### cmpilato
+  */
 
   if (svn_hash_gets(baton->tables, SVN_AUTH_CRED_SIMPLE))
     {
-      SVN_ERR(svn_auth__simple_cleanup_walk(baton, cleanup, cleanup_baton,
+      SVN_ERR(svn_auth__simple_cleanup_walk(baton, cleanup_func, cleanup_baton,
                                             baton->creds_cache, scratch_pool));
     }
   /* ### Maybe add support for other providers? */

Modified: subversion/branches/verify-keep-going/subversion/libsvn_subr/auth.h
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_subr/auth.h?rev=1465596&r1=1465595&r2=1465596&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_subr/auth.h (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_subr/auth.h Mon Apr  8 11:47:02 2013
@@ -21,8 +21,12 @@
  * ====================================================================
  */
 
-#ifndef SVN_SUBR_AUTH_H
-#define SVN_SUBR_AUTH_H
+#ifndef SVN_LIBSVN_SUBR_AUTH_H
+#define SVN_LIBSVN_SUBR_AUTH_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
 
 #include "svn_auth.h"
 
@@ -40,10 +44,15 @@ svn_auth__file_path(const char **path,
 /* Implementation of svn_auth_cleanup_walk() for the "simple" provider */
 svn_error_t *
 svn_auth__simple_cleanup_walk(svn_auth_baton_t *baton,
-                              svn_auth_cleanup_callback cleanup,
+                              svn_auth_cleanup_func_t cleanup_func,
                               void *cleanup_baton,
                               apr_hash_t *creds_cache,
                               apr_pool_t *scratch_pool);
 
 
-#endif
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* SVN_LIBSVN_SUBR_AUTH_H */

Modified: subversion/branches/verify-keep-going/subversion/libsvn_subr/config.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_subr/config.c?rev=1465596&r1=1465595&r2=1465596&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_subr/config.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_subr/config.c Mon Apr  8 11:47:02 2013
@@ -47,9 +47,6 @@ struct cfg_section_t
   /* The section name. */
   const char *name;
 
-  /* The section name, converted into a hash key. */
-  const char *hash_key;
-
   /* Table of cfg_option_t's. */
   apr_hash_t *options;
 };
@@ -464,19 +461,29 @@ make_string_from_option(const char **val
   /* Expand the option value if necessary. */
   if (!opt->expanded)
     {
-      apr_pool_t *tmp_pool = (x_pool ? x_pool : svn_pool_create(cfg->x_pool));
+      /* before attempting to expand an option, check for the placeholder.
+       * If none is there, there is no point in calling expand_option_value.
+       */
+      if (strchr(opt->value, '%'))
+        {
+          apr_pool_t *tmp_pool = (x_pool ? x_pool : svn_pool_create(cfg->x_pool));
 
-      expand_option_value(cfg, section, opt->value, &opt->x_value, tmp_pool);
-      opt->expanded = TRUE;
+          expand_option_value(cfg, section, opt->value, &opt->x_value, tmp_pool);
+          opt->expanded = TRUE;
 
-      if (!x_pool)
+          if (!x_pool)
+            {
+              /* Grab the fully expanded value from tmp_pool before its
+                 disappearing act. */
+              if (opt->x_value)
+                opt->x_value = apr_pstrmemdup(cfg->x_pool, opt->x_value,
+                                              strlen(opt->x_value));
+              svn_pool_destroy(tmp_pool);
+            }
+        }
+      else
         {
-          /* Grab the fully expanded value from tmp_pool before its
-             disappearing act. */
-          if (opt->x_value)
-            opt->x_value = apr_pstrmemdup(cfg->x_pool, opt->x_value,
-                                          strlen(opt->x_value));
-          svn_pool_destroy(tmp_pool);
+          opt->expanded = TRUE;
         }
     }
 
@@ -576,23 +583,23 @@ expand_option_value(svn_config_t *cfg, c
     *opt_x_valuep = NULL;
 }
 
-static void
+static cfg_section_t *
 svn_config_addsection(svn_config_t *cfg,
-                      const char *section,
-                      cfg_section_t **sec)
+                      const char *section)
 {  
   cfg_section_t *s;
+  const char *hash_key;
 
   s = apr_palloc(cfg->pool, sizeof(cfg_section_t));
   s->name = apr_pstrdup(cfg->pool, section);
   if(cfg->section_names_case_sensitive)
-    s->hash_key = s->name;
+    hash_key = s->name;
   else
-    s->hash_key = make_hash_key(apr_pstrdup(cfg->pool, section));
+    hash_key = make_hash_key(apr_pstrdup(cfg->pool, section));
   s->options = apr_hash_make(cfg->pool);
-  svn_hash_sets(cfg->sections, s->hash_key, s);
-  
-  *sec = s;
+  svn_hash_sets(cfg->sections, hash_key, s);
+
+  return s;
 }
 
 static void
@@ -675,7 +682,7 @@ svn_config_set(svn_config_t *cfg,
   if (sec == NULL)
     {
       /* Even the section doesn't exist. Create it. */
-      svn_config_addsection(cfg, section, &sec);
+      sec = svn_config_addsection(cfg, section);
     }
 
   svn_hash_sets(sec->options, opt->hash_key, opt);
@@ -1054,7 +1061,7 @@ svn_config_dup(svn_config_t **cfgp,
     apr_hash_this(sectidx, &sectkey, &sectkeyLength, &sectval);
     srcsect = sectval;
 
-    svn_config_addsection(*cfgp, srcsect->name, &destsec);
+    destsec = svn_config_addsection(*cfgp, srcsect->name);
 
     for (optidx = apr_hash_first(pool, srcsect->options);
          optidx != NULL;

Modified: subversion/branches/verify-keep-going/subversion/libsvn_subr/config_win.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_subr/config_win.c?rev=1465596&r1=1465595&r2=1465596&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_subr/config_win.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_subr/config_win.c Mon Apr  8 11:47:02 2013
@@ -215,18 +215,17 @@ svn_config__parse_registry(svn_config_t 
   for (index = 0; ; ++index)
     {
       DWORD section_len = (DWORD)section->blocksize;
-      FILETIME last_write_time;
       HKEY sub_hkey;
 
       err = RegEnumKeyEx(hkey, index, section->data, &section_len,
-                         NULL, NULL, NULL, &last_write_time);
+                         NULL, NULL, NULL, NULL);
       if (err == ERROR_NO_MORE_ITEMS)
           break;
       if (err == ERROR_MORE_DATA)
         {
           svn_stringbuf_ensure(section, section_len);
           err = RegEnumKeyEx(hkey, index, section->data, &section_len,
-                             NULL, NULL, NULL, &last_write_time);
+                             NULL, NULL, NULL, NULL);
         }
       if (err != ERROR_SUCCESS)
         {

Modified: subversion/branches/verify-keep-going/subversion/libsvn_subr/error.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_subr/error.c?rev=1465596&r1=1465595&r2=1465596&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_subr/error.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_subr/error.c Mon Apr  8 11:47:02 2013
@@ -481,8 +481,15 @@ print_error(svn_error_t *err, FILE *stre
       svn_error_clear(temp_err);
     }
 
-  svn_error_clear(svn_cmdline_fprintf(stream, err->pool,
-                                      ": (apr_err=%d)\n", err->apr_err));
+  {
+    const char *symbolic_name = svn_error_symbolic_name(err->apr_err);
+    if (symbolic_name)
+      svn_error_clear(svn_cmdline_fprintf(stream, err->pool,
+                                          ": (apr_err=%s)\n", symbolic_name));
+    else
+      svn_error_clear(svn_cmdline_fprintf(stream, err->pool,
+                                          ": (apr_err=%d)\n", err->apr_err));
+  }
 #endif /* SVN_DEBUG */
 
   /* "traced call" */
@@ -630,9 +637,11 @@ svn_err_best_message(svn_error_t *err, c
 
 /* svn_strerror() and helpers */
 
+/* Duplicate of the same typedef in tests/libsvn_subr/error-code-test.c */
 typedef struct err_defn {
-  svn_errno_t errcode;
-  const char *errdesc;
+  svn_errno_t errcode; /* 160004 */
+  const char *errname; /* SVN_ERR_FS_CORRUPT */
+  const char *errdesc; /* default message */
 } err_defn;
 
 /* To understand what is going on here, read svn_error_codes.h. */
@@ -654,6 +663,26 @@ svn_strerror(apr_status_t statcode, char
   return apr_strerror(statcode, buf, bufsize);
 }
 
+const char *
+svn_error_symbolic_name(apr_status_t statcode)
+{
+  const err_defn *defn;
+
+  for (defn = error_table; defn->errdesc != NULL; ++defn)
+    if (defn->errcode == (svn_errno_t)statcode)
+      return defn->errname;
+
+  /* "No error" is not in error_table. */
+  if (statcode == SVN_NO_ERROR)
+    return "SVN_NO_ERROR";
+
+  return NULL;
+}
+
+
+
+/* Malfunctions. */
+
 svn_error_t *
 svn_error_raise_on_malfunction(svn_boolean_t can_return,
                                const char *file, int line,
@@ -713,6 +742,9 @@ svn_error__malfunction(svn_boolean_t can
   return malfunction_handler(can_return, file, line, expr);
 }
 
+
+/* Misc. */
+
 svn_error_t *
 svn_error__wrap_zlib(int zerr, const char *function, const char *message)
 {

Modified: subversion/branches/verify-keep-going/subversion/libsvn_subr/simple_providers.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_subr/simple_providers.c?rev=1465596&r1=1465595&r2=1465596&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_subr/simple_providers.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_subr/simple_providers.c Mon Apr  8 11:47:02 2013
@@ -513,13 +513,12 @@ simple_save_creds(svn_boolean_t *saved,
 
 svn_error_t *
 svn_auth__simple_cleanup_walk(svn_auth_baton_t *baton,
-                              svn_auth_cleanup_callback cleanup,
+                              svn_auth_cleanup_func_t cleanup_func,
                               void *cleanup_baton,
                               apr_hash_t *creds_cache,
                               apr_pool_t *scratch_pool)
 {
   const char *config_dir;
-  svn_boolean_t no_auth_cache;
   int i;
   apr_pool_t *iterpool;
 
@@ -534,15 +533,34 @@ svn_auth__simple_cleanup_walk(svn_auth_b
   };
 
   config_dir = svn_auth_get_parameter(baton, SVN_AUTH_PARAM_CONFIG_DIR);
-  no_auth_cache = (svn_auth_get_parameter(baton, SVN_AUTH_PARAM_NO_AUTH_CACHE)
-                                != NULL);
-
-  if ((! config_dir) || no_auth_cache)
+  if (! config_dir)
     {
       /* Can't locate the cache to clear */
       return SVN_NO_ERROR;
     }
 
+
+  /* ### FIXME: This is just plain wrong.  This function has no
+     ### business iterating over any credential type except
+     ### SVN_AUTH_CRED_SIMPLE.  The side-effect of this overreach is
+     ### that today, someone can open an auth baton with just a single
+     ### svn.simple provider, and this function -- which claims to be
+     ### cleaning up creds as supported by the provider -- will
+     ### happily go about peeking into other credential types, too,
+     ### even those for which no provider has been registered.
+     ###
+     ### In my opinion, svn_auth_cleanup_auth() should iterate over
+     ### the registered providers, calling per-provider functions that
+     ### take care of their own cleanup, exactly as the rest of this
+     ### subsystem uses per-provider functions to handle credential
+     ### get/set.  Alternatively, svn_auth_cleanup_auth() should stop
+     ### masquerading as if the auth_baton (and its provider table) is
+     ### valuable at all, and just accept the 'config_dir' as input so
+     ### it can do it's tree crawl, file parsing, and file removal.
+     ###
+     ### --cmpilato
+  */
+
   iterpool = svn_pool_create(scratch_pool);
   for (i = 0; cred_kinds[i]; i++)
     {
@@ -561,7 +579,6 @@ svn_auth__simple_cleanup_walk(svn_auth_b
       dir_path = svn_dirent_dirname(item_path, iterpool);
 
       err = svn_io_get_dirents3(&nodes, dir_path, TRUE, iterpool, iterpool);
-
       if (err)
         {
           if (!APR_STATUS_IS_ENOENT(err->apr_err)
@@ -577,7 +594,9 @@ svn_auth__simple_cleanup_walk(svn_auth_b
         {
           svn_io_dirent2_t *dirent = svn__apr_hash_index_val(hi);
           svn_stream_t *stream;
-          apr_hash_t *file_data;
+          apr_hash_t *creds_hash;
+          const svn_string_t *realm, *passtype;
+          svn_boolean_t delete_file = FALSE;
 
           if (dirent->kind != svn_node_file)
             continue;
@@ -595,8 +614,8 @@ svn_auth__simple_cleanup_walk(svn_auth_b
               continue;
             }
 
-          file_data = apr_hash_make(itempool);
-          err = svn_hash_read2(file_data, stream, SVN_HASH_TERMINATOR, itempool);
+          creds_hash = apr_hash_make(itempool);
+          err = svn_hash_read2(creds_hash, stream, SVN_HASH_TERMINATOR, itempool);
           err = svn_error_compose_create(err, svn_stream_close(stream));
           if (err)
             {
@@ -605,32 +624,41 @@ svn_auth__simple_cleanup_walk(svn_auth_b
               continue;
             }
 
-          {
-            const svn_string_t *realm = svn_hash_gets(file_data,
-                                                      SVN_CONFIG_REALMSTRING_KEY);
-            svn_boolean_t delete_file = FALSE;
-
-            if (! realm)
-              continue; /* Not an auth file */
-
-            SVN_ERR(cleanup(&delete_file, cleanup_baton, cred_kinds[i], realm->data,
-                            SVN_AUTH_CRED_SIMPLE, itempool));
-
-            if (delete_file)
-              {
-                /* Delete from the credential hash */
-                const char *cache_key = apr_pstrcat(itempool,
-                                                    cred_kinds[0],
-                                                    ":",
-                                                    realm->data,
-                                                    (char *)NULL);
-
-                svn_hash_sets(creds_cache, cache_key, NULL);
-
-                /* And the file on disk */
-                SVN_ERR(svn_io_remove_file2(item_path, TRUE, itempool));
-              }
-          }
+          realm = svn_hash_gets(creds_hash, SVN_CONFIG_REALMSTRING_KEY);
+          if (! realm)
+            continue; /* Not an auth file */
+
+          /* With the exception of the "windows" and "simple" password
+             types, a non-empty "passtype" value means that this
+             record is just metadata for credentials cached elsewhere.
+             In order to avoid giving the impression that we're able
+             to clear cached data that we really aren't, we'll skip
+             such records. */
+          passtype = svn_hash_gets(creds_hash, AUTHN_PASSTYPE_KEY);
+          if (passtype && passtype->data
+              && (! ((strcmp(passtype->data,
+                             SVN_AUTH__WINCRYPT_PASSWORD_TYPE) == 0)
+                     || (strcmp(passtype->data,
+                                SVN_AUTH__SIMPLE_PASSWORD_TYPE) == 0))))
+            continue; 
+          
+          SVN_ERR(cleanup_func(&delete_file, cleanup_baton, cred_kinds[i],
+                               realm->data,
+                               passtype ? passtype->data 
+                                        : SVN_AUTH__SIMPLE_PASSWORD_TYPE,
+                               itempool));
+
+          if (delete_file)
+            {
+              /* Delete from the credential hash */
+              const char *cache_key = apr_pstrcat(itempool, cred_kinds[0], ":",
+                                                  realm->data, (char *)NULL);
+
+              svn_hash_sets(creds_cache, cache_key, NULL);
+              
+              /* And the file on disk */
+              SVN_ERR(svn_io_remove_file2(item_path, TRUE, itempool));
+            }
         }
     }
 

Modified: subversion/branches/verify-keep-going/subversion/libsvn_wc/diff.h
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_wc/diff.h?rev=1465596&r1=1465595&r2=1465596&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_wc/diff.h (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_wc/diff.h Mon Apr  8 11:47:02 2013
@@ -1,144 +1,144 @@
-/*
- * lock.h:  routines for diffing local files and directories.
- *
- * ====================================================================
- *    Licensed to the Apache Software Foundation (ASF) under one
- *    or more contributor license agreements.  See the NOTICE file
- *    distributed with this work for additional information
- *    regarding copyright ownership.  The ASF licenses this file
- *    to you under the Apache License, Version 2.0 (the
- *    "License"); you may not use this file except in compliance
- *    with the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *    Unless required by applicable law or agreed to in writing,
- *    software distributed under the License is distributed on an
- *    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *    KIND, either express or implied.  See the License for the
- *    specific language governing permissions and limitations
- *    under the License.
- * ====================================================================
- */
-
-#ifndef SVN_LIBSVN_WC_DIFF_H
-#define SVN_LIBSVN_WC_DIFF_H
-
-#include <apr_pools.h>
-#include <apr_hash.h>
-
-#include "svn_types.h"
-#include "svn_error.h"
-#include "svn_wc.h"
-
-#include "wc_db.h"
-#include "private/svn_diff_tree.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-/* Reports the file LOCAL_ABSPATH as ADDED file with relpath RELPATH to
-   PROCESSOR with as parent baton PROCESSOR_PARENT_BATON.
-
-   The node is expected to have status svn_wc__db_status_normal, or
-   svn_wc__db_status_added. When DIFF_PRISTINE is TRUE, report the pristine
-   version of LOCAL_ABSPATH as ADDED. In this case an
-   svn_wc__db_status_deleted may shadow an added or deleted node.
-
-   If CHANGELIST_HASH is not NULL and LOCAL_ABSPATH's changelist is not
-   in the changelist, don't report the node.
- */
-svn_error_t *
-svn_wc__diff_local_only_file(svn_wc__db_t *db,
-                             const char *local_abspath,
-                             const char *relpath,
-                             const svn_diff_tree_processor_t *processor,
-                             void *processor_parent_baton,
-                             apr_hash_t *changelist_hash,
-                             svn_boolean_t diff_pristine,
-                             svn_cancel_func_t cancel_func,
-                             void *cancel_baton,
-                             apr_pool_t *scratch_pool);
-
-/* Reports the directory LOCAL_ABSPATH and everything below it (limited by
-   DEPTH) as added with relpath RELPATH to PROCESSOR with as parent baton
-   PROCESSOR_PARENT_BATON.
-
-   The node is expected to have status svn_wc__db_status_normal, or
-   svn_wc__db_status_added. When DIFF_PRISTINE is TRUE, report the pristine
-   version of LOCAL_ABSPATH as ADDED. In this case an
-   svn_wc__db_status_deleted may shadow an added or deleted node.
-
-   If CHANGELIST_HASH is not NULL and LOCAL_ABSPATH's changelist is not
-   in the changelist, don't report the node.
- */
-svn_error_t *
-svn_wc__diff_local_only_dir(svn_wc__db_t *db,
-                            const char *local_abspath,
-                            const char *relpath,
-                            svn_depth_t depth,
-                            const svn_diff_tree_processor_t *processor,
-                            void *processor_parent_baton,
-                            apr_hash_t *changelist_hash,
-                            svn_boolean_t diff_pristine,
-                            svn_cancel_func_t cancel_func,
-                            void *cancel_baton,
-                            apr_pool_t *scratch_pool);
-
-/* Reports the BASE-file LOCAL_ABSPATH as deleted to PROCESSOR with relpath
-   RELPATH, revision REVISION and parent baton PROCESSOR_PARENT_BATON.
-
-   If REVISION is invalid, the revision as stored in BASE is used.
-
-   The node is expected to have status svn_wc__db_status_normal in BASE. */
-svn_error_t *
-svn_wc__diff_base_only_file(svn_wc__db_t *db,
-                            const char *local_abspath,
-                            const char *relpath,
-                            svn_revnum_t revision,
-                            const svn_diff_tree_processor_t *processor,
-                            void *processor_parent_baton,
-                            apr_pool_t *scratch_pool);
-
-/* Reports the BASE-directory LOCAL_ABSPATH and everything below it (limited
-   by DEPTH) as deleted to PROCESSOR with relpath RELPATH and parent baton
-   PROCESSOR_PARENT_BATON.
-
-   If REVISION is invalid, the revision as stored in BASE is used.
-
-   The node is expected to have status svn_wc__db_status_normal in BASE. */
-svn_error_t *
-svn_wc__diff_base_only_dir(svn_wc__db_t *db,
-                           const char *local_abspath,
-                           const char *relpath,
-                           svn_revnum_t revision,
-                           svn_depth_t depth,
-                           const svn_diff_tree_processor_t *processor,
-                           void *processor_parent_baton,
-                           svn_cancel_func_t cancel_func,
-                           void *cancel_baton,
-                           apr_pool_t *scratch_pool);
-
-/* Diff the file PATH against the text base of its BASE layer.  At this
- * stage we are dealing with a file that does exist in the working copy.
- */
-svn_error_t *
-svn_wc__diff_base_working_diff(svn_wc__db_t *db,
-                               const char *local_abspath,
-                               const char *relpath,
-                               svn_revnum_t revision,
-                               apr_hash_t *changelist_hash,
-                               const svn_diff_tree_processor_t *processor,
-                               void *processor_dir_baton,
-                               svn_boolean_t diff_pristine,
-                               svn_cancel_func_t cancel_func,
-                               void *cancel_baton,
-                               apr_pool_t *scratch_pool);
-
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* SVN_LIBSVN_WC_DIFF_H */
+/*
+ * lock.h:  routines for diffing local files and directories.
+ *
+ * ====================================================================
+ *    Licensed to the Apache Software Foundation (ASF) under one
+ *    or more contributor license agreements.  See the NOTICE file
+ *    distributed with this work for additional information
+ *    regarding copyright ownership.  The ASF licenses this file
+ *    to you under the Apache License, Version 2.0 (the
+ *    "License"); you may not use this file except in compliance
+ *    with the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *    Unless required by applicable law or agreed to in writing,
+ *    software distributed under the License is distributed on an
+ *    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *    KIND, either express or implied.  See the License for the
+ *    specific language governing permissions and limitations
+ *    under the License.
+ * ====================================================================
+ */
+
+#ifndef SVN_LIBSVN_WC_DIFF_H
+#define SVN_LIBSVN_WC_DIFF_H
+
+#include <apr_pools.h>
+#include <apr_hash.h>
+
+#include "svn_types.h"
+#include "svn_error.h"
+#include "svn_wc.h"
+
+#include "wc_db.h"
+#include "private/svn_diff_tree.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+/* Reports the file LOCAL_ABSPATH as ADDED file with relpath RELPATH to
+   PROCESSOR with as parent baton PROCESSOR_PARENT_BATON.
+
+   The node is expected to have status svn_wc__db_status_normal, or
+   svn_wc__db_status_added. When DIFF_PRISTINE is TRUE, report the pristine
+   version of LOCAL_ABSPATH as ADDED. In this case an
+   svn_wc__db_status_deleted may shadow an added or deleted node.
+
+   If CHANGELIST_HASH is not NULL and LOCAL_ABSPATH's changelist is not
+   in the changelist, don't report the node.
+ */
+svn_error_t *
+svn_wc__diff_local_only_file(svn_wc__db_t *db,
+                             const char *local_abspath,
+                             const char *relpath,
+                             const svn_diff_tree_processor_t *processor,
+                             void *processor_parent_baton,
+                             apr_hash_t *changelist_hash,
+                             svn_boolean_t diff_pristine,
+                             svn_cancel_func_t cancel_func,
+                             void *cancel_baton,
+                             apr_pool_t *scratch_pool);
+
+/* Reports the directory LOCAL_ABSPATH and everything below it (limited by
+   DEPTH) as added with relpath RELPATH to PROCESSOR with as parent baton
+   PROCESSOR_PARENT_BATON.
+
+   The node is expected to have status svn_wc__db_status_normal, or
+   svn_wc__db_status_added. When DIFF_PRISTINE is TRUE, report the pristine
+   version of LOCAL_ABSPATH as ADDED. In this case an
+   svn_wc__db_status_deleted may shadow an added or deleted node.
+
+   If CHANGELIST_HASH is not NULL and LOCAL_ABSPATH's changelist is not
+   in the changelist, don't report the node.
+ */
+svn_error_t *
+svn_wc__diff_local_only_dir(svn_wc__db_t *db,
+                            const char *local_abspath,
+                            const char *relpath,
+                            svn_depth_t depth,
+                            const svn_diff_tree_processor_t *processor,
+                            void *processor_parent_baton,
+                            apr_hash_t *changelist_hash,
+                            svn_boolean_t diff_pristine,
+                            svn_cancel_func_t cancel_func,
+                            void *cancel_baton,
+                            apr_pool_t *scratch_pool);
+
+/* Reports the BASE-file LOCAL_ABSPATH as deleted to PROCESSOR with relpath
+   RELPATH, revision REVISION and parent baton PROCESSOR_PARENT_BATON.
+
+   If REVISION is invalid, the revision as stored in BASE is used.
+
+   The node is expected to have status svn_wc__db_status_normal in BASE. */
+svn_error_t *
+svn_wc__diff_base_only_file(svn_wc__db_t *db,
+                            const char *local_abspath,
+                            const char *relpath,
+                            svn_revnum_t revision,
+                            const svn_diff_tree_processor_t *processor,
+                            void *processor_parent_baton,
+                            apr_pool_t *scratch_pool);
+
+/* Reports the BASE-directory LOCAL_ABSPATH and everything below it (limited
+   by DEPTH) as deleted to PROCESSOR with relpath RELPATH and parent baton
+   PROCESSOR_PARENT_BATON.
+
+   If REVISION is invalid, the revision as stored in BASE is used.
+
+   The node is expected to have status svn_wc__db_status_normal in BASE. */
+svn_error_t *
+svn_wc__diff_base_only_dir(svn_wc__db_t *db,
+                           const char *local_abspath,
+                           const char *relpath,
+                           svn_revnum_t revision,
+                           svn_depth_t depth,
+                           const svn_diff_tree_processor_t *processor,
+                           void *processor_parent_baton,
+                           svn_cancel_func_t cancel_func,
+                           void *cancel_baton,
+                           apr_pool_t *scratch_pool);
+
+/* Diff the file PATH against the text base of its BASE layer.  At this
+ * stage we are dealing with a file that does exist in the working copy.
+ */
+svn_error_t *
+svn_wc__diff_base_working_diff(svn_wc__db_t *db,
+                               const char *local_abspath,
+                               const char *relpath,
+                               svn_revnum_t revision,
+                               apr_hash_t *changelist_hash,
+                               const svn_diff_tree_processor_t *processor,
+                               void *processor_dir_baton,
+                               svn_boolean_t diff_pristine,
+                               svn_cancel_func_t cancel_func,
+                               void *cancel_baton,
+                               apr_pool_t *scratch_pool);
+
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* SVN_LIBSVN_WC_DIFF_H */

Propchange: subversion/branches/verify-keep-going/subversion/libsvn_wc/diff.h
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: subversion/branches/verify-keep-going/subversion/mod_dav_svn/liveprops.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/mod_dav_svn/liveprops.c?rev=1465596&r1=1465595&r2=1465596&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/mod_dav_svn/liveprops.c (original)
+++ subversion/branches/verify-keep-going/subversion/mod_dav_svn/liveprops.c Mon Apr  8 11:47:02 2013
@@ -834,10 +834,10 @@ insert_prop(const dav_resource *resource
 static int
 is_writable(const dav_resource *resource, int propid)
 {
-  const dav_liveprop_spec *info;
+  const dav_liveprop_spec *info = NULL;
 
-  (void) dav_get_liveprop_info(propid, &dav_svn__liveprop_group, &info);
-  return info->is_writable;
+  dav_get_liveprop_info(propid, &dav_svn__liveprop_group, &info);
+  return info ? info->is_writable : FALSE;
 }
 
 
@@ -962,8 +962,8 @@ dav_svn__insert_all_liveprops(request_re
   for (spec = props; spec->name != NULL; ++spec)
     {
       svn_pool_clear(iterpool);
-      (void) insert_prop_internal(resource, spec->propid, what, phdr,
-                                  resource->pool, iterpool);
+      insert_prop_internal(resource, spec->propid, what, phdr,
+                           resource->pool, iterpool);
     }
   svn_pool_destroy(iterpool);
 

Modified: subversion/branches/verify-keep-going/subversion/mod_dav_svn/lock.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/mod_dav_svn/lock.c?rev=1465596&r1=1465595&r2=1465596&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/mod_dav_svn/lock.c (original)
+++ subversion/branches/verify-keep-going/subversion/mod_dav_svn/lock.c Mon Apr  8 11:47:02 2013
@@ -143,7 +143,9 @@ unescape_xml(const char **output,
   if (apr_err)
     {
       char errbuf[1024];
-      (void)apr_xml_parser_geterror(xml_parser, errbuf, sizeof(errbuf));
+
+      errbuf[0] = '\0';
+      apr_xml_parser_geterror(xml_parser, errbuf, sizeof(errbuf));
       return dav_svn__new_error(pool, HTTP_INTERNAL_SERVER_ERROR,
                                 DAV_ERR_LOCK_SAVE_LOCK, errbuf);
     }

Modified: subversion/branches/verify-keep-going/subversion/mod_dav_svn/merge.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/mod_dav_svn/merge.c?rev=1465596&r1=1465595&r2=1465596&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/mod_dav_svn/merge.c (original)
+++ subversion/branches/verify-keep-going/subversion/mod_dav_svn/merge.c Mon Apr  8 11:47:02 2013
@@ -224,6 +224,7 @@ dav_svn__merge_response(ap_filter_t *out
   svn_string_t *creationdate, *creator_displayname;
   const char *post_commit_err_elem = NULL,
              *post_commit_header_info = NULL;
+  apr_status_t status;
 
   serr = svn_fs_revision_root(&root, repos->fs, new_rev, pool);
   if (serr != NULL)
@@ -284,7 +285,7 @@ dav_svn__merge_response(ap_filter_t *out
     }
 
 
-  (void) ap_fputstrs(output, bb,
+  status = ap_fputstrs(output, bb,
                      DAV_XML_HEADER DEBUG_CR
                      "<D:merge-response xmlns:D=\"DAV:\"",
                      post_commit_header_info,
@@ -304,30 +305,43 @@ dav_svn__merge_response(ap_filter_t *out
                      post_commit_err_elem, DEBUG_CR
                      "<D:version-name>", rev, "</D:version-name>" DEBUG_CR,
                      NULL);
+  if (status != APR_SUCCESS)
+    return dav_svn__new_error(repos->pool, HTTP_INTERNAL_SERVER_ERROR, 0,
+                              "Could not write output");
+
   if (creationdate)
     {
-      (void) ap_fputstrs(output, bb,
+      status = ap_fputstrs(output, bb,
                          "<D:creationdate>",
                          apr_xml_quote_string(pool, creationdate->data, 1),
                          "</D:creationdate>" DEBUG_CR,
                          NULL);
+      if (status != APR_SUCCESS)
+        return dav_svn__new_error(repos->pool, HTTP_INTERNAL_SERVER_ERROR, 0,
+                                  "Could not write output");
     }
   if (creator_displayname)
     {
-      (void) ap_fputstrs(output, bb,
+      status = ap_fputstrs(output, bb,
                          "<D:creator-displayname>",
                          apr_xml_quote_string(pool,
                                               creator_displayname->data, 1),
                          "</D:creator-displayname>" DEBUG_CR,
                          NULL);
+      if (status != APR_SUCCESS)
+        return dav_svn__new_error(repos->pool, HTTP_INTERNAL_SERVER_ERROR, 0,
+                                  "Could not write output");
     }
-  (void) ap_fputstrs(output, bb,
+  status = ap_fputstrs(output, bb,
                      "</D:prop>" DEBUG_CR
                      "<D:status>HTTP/1.1 200 OK</D:status>" DEBUG_CR
                      "</D:propstat>" DEBUG_CR
                      "</D:response>" DEBUG_CR,
 
                      NULL);
+  if (status != APR_SUCCESS)
+    return dav_svn__new_error(repos->pool, HTTP_INTERNAL_SERVER_ERROR, 0,
+                              "Could not write output");
 
   /* ONLY have dir_delta drive the editor if the caller asked us to
      generate a full MERGE response.  svn clients can ask us to
@@ -356,12 +370,18 @@ dav_svn__merge_response(ap_filter_t *out
     }
 
   /* wrap up the merge response */
-  (void) ap_fputs(output, bb,
+  status = ap_fputs(output, bb,
                   "</D:updated-set>" DEBUG_CR
                   "</D:merge-response>" DEBUG_CR);
+  if (status != APR_SUCCESS)
+    return dav_svn__new_error(repos->pool, HTTP_INTERNAL_SERVER_ERROR, 0,
+                              "Could not write output");
 
   /* send whatever is left in the brigade */
-  (void) ap_pass_brigade(output, bb);
+  status = ap_pass_brigade(output, bb);
+  if (status != APR_SUCCESS)
+    return dav_svn__new_error(repos->pool, HTTP_INTERNAL_SERVER_ERROR, 0,
+                              "Could not write output");
 
   return NULL;
 }

Modified: subversion/branches/verify-keep-going/subversion/mod_dav_svn/mod_dav_svn.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/mod_dav_svn/mod_dav_svn.c?rev=1465596&r1=1465595&r2=1465596&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/mod_dav_svn/mod_dav_svn.c (original)
+++ subversion/branches/verify-keep-going/subversion/mod_dav_svn/mod_dav_svn.c Mon Apr  8 11:47:02 2013
@@ -1041,7 +1041,7 @@ merge_xml_in_filter(ap_filter_t *f,
       if (rv != APR_SUCCESS)
         {
           /* Clean up the parser. */
-          (void) apr_xml_parser_done(ctx->parser, NULL);
+          apr_xml_parser_done(ctx->parser, NULL);
           break;
         }
     }

Modified: subversion/branches/verify-keep-going/subversion/mod_dav_svn/repos.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/mod_dav_svn/repos.c?rev=1465596&r1=1465595&r2=1465596&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/mod_dav_svn/repos.c (original)
+++ subversion/branches/verify-keep-going/subversion/mod_dav_svn/repos.c Mon Apr  8 11:47:02 2013
@@ -2219,7 +2219,7 @@ get_resource(request_rec *r,
 
       /* Configure hook script environment variables. */
       serr = svn_repos_hooks_setenv(repos->repos, dav_svn__get_hooks_env(r),
-                                    r->connection->pool, r->pool);
+                                    r->pool);
       if (serr)
         return dav_svn__sanitize_error(serr,
                                        "Error settings hooks environment",

Modified: subversion/branches/verify-keep-going/subversion/mod_dav_svn/util.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/mod_dav_svn/util.c?rev=1465596&r1=1465595&r2=1465596&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/mod_dav_svn/util.c (original)
+++ subversion/branches/verify-keep-going/subversion/mod_dav_svn/util.c Mon Apr  8 11:47:02 2013
@@ -621,8 +621,8 @@ dav_svn__final_flush_or_error(request_re
   if (! do_flush)
     {
       /* Ask about the length of the bucket brigade, ignoring errors. */
-      apr_off_t len;
-      (void)apr_brigade_length(bb, FALSE, &len);
+      apr_off_t len = 0;
+      apr_brigade_length(bb, FALSE, &len);
       do_flush = (len != 0);
     }
 

Modified: subversion/branches/verify-keep-going/subversion/svn/cl-conflicts.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/svn/cl-conflicts.c?rev=1465596&r1=1465595&r2=1465596&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/svn/cl-conflicts.c (original)
+++ subversion/branches/verify-keep-going/subversion/svn/cl-conflicts.c Mon Apr  8 11:47:02 2013
@@ -33,16 +33,6 @@
 #include "svn_private_config.h"
 
 
-/* A map for svn_wc_conflict_action_t values to human-readable strings */
-static const svn_token_map_t map_conflict_action_human[] =
-{
-  { N_("edit"),         svn_wc_conflict_action_edit },
-  { N_("delete"),       svn_wc_conflict_action_delete },
-  { N_("add"),          svn_wc_conflict_action_add },
-  { N_("replace"),      svn_wc_conflict_action_replace },
-  { NULL,               0 }
-};
-
 /* A map for svn_wc_conflict_action_t values to XML strings */
 static const svn_token_map_t map_conflict_action_xml[] =
 {
@@ -53,21 +43,6 @@ static const svn_token_map_t map_conflic
   { NULL,               0 }
 };
 
-/* A map for svn_wc_conflict_reason_t values to human-readable strings */
-static const svn_token_map_t map_conflict_reason_human[] =
-{
-  { N_("edit"),         svn_wc_conflict_reason_edited },
-  { N_("delete"),       svn_wc_conflict_reason_deleted },
-  { N_("missing"),      svn_wc_conflict_reason_missing },
-  { N_("obstruction"),  svn_wc_conflict_reason_obstructed },
-  { N_("add"),          svn_wc_conflict_reason_added },
-  { N_("replace"),      svn_wc_conflict_reason_replaced },
-  { N_("unversioned"),  svn_wc_conflict_reason_unversioned },
-  { N_("moved away"),   svn_wc_conflict_reason_moved_away },
-  { N_("moved here"),   svn_wc_conflict_reason_moved_here },
-  { NULL,               0 }
-};
-
 /* A map for svn_wc_conflict_reason_t values to XML strings */
 static const svn_token_map_t map_conflict_reason_xml[] =
 {
@@ -91,18 +66,122 @@ static const svn_token_map_t map_conflic
   { NULL,               0 }
 };
 
-/* Return a localized string representation of CONFLICT->action. */
+/* Return a localised string representation of the local part of a conflict;
+   NULL for non-localised odd cases. */
+static const char *
+local_reason_str(svn_node_kind_t kind, svn_wc_conflict_reason_t reason)
+{
+  switch (kind)
+    {
+      case svn_node_file:
+        switch (reason)
+          {
+          case svn_wc_conflict_reason_edited:
+            return _("local file edit");
+          case svn_wc_conflict_reason_obstructed:
+            return _("local file obstruction");
+          case svn_wc_conflict_reason_deleted:
+            return _("local file delete");
+          case svn_wc_conflict_reason_missing:
+            return _("local file missing");
+          case svn_wc_conflict_reason_unversioned:
+            return _("local file unversioned");
+          case svn_wc_conflict_reason_added:
+            return _("local file add");
+          case svn_wc_conflict_reason_replaced:
+            return _("local file replace");
+          case svn_wc_conflict_reason_moved_away:
+            return _("local file moved away");
+          case svn_wc_conflict_reason_moved_here:
+            return _("local file moved here");
+          }
+        break;
+      case svn_node_dir:
+        switch (reason)
+          {
+          case svn_wc_conflict_reason_edited:
+            return _("local dir edit");
+          case svn_wc_conflict_reason_obstructed:
+            return _("local dir obstruction");
+          case svn_wc_conflict_reason_deleted:
+            return _("local dir delete");
+          case svn_wc_conflict_reason_missing:
+            return _("local dir missing");
+          case svn_wc_conflict_reason_unversioned:
+            return _("local dir unversioned");
+          case svn_wc_conflict_reason_added:
+            return _("local dir add");
+          case svn_wc_conflict_reason_replaced:
+            return _("local dir replace");
+          case svn_wc_conflict_reason_moved_away:
+            return _("local dir moved away");
+          case svn_wc_conflict_reason_moved_here:
+            return _("local dir moved here");
+          }
+        break;
+      case svn_node_symlink:
+      case svn_node_none:
+      case svn_node_unknown:
+        break;
+    }
+  return NULL;
+}
+
+/* Return a localised string representation of the incoming part of a
+   conflict; NULL for non-localised odd cases. */
 static const char *
-action_str(const svn_wc_conflict_description2_t *conflict)
+incoming_action_str(svn_node_kind_t kind, svn_wc_conflict_action_t action)
 {
-  return _(svn_token__to_word(map_conflict_action_human, conflict->action));
+  switch (kind)
+    {
+      case svn_node_file:
+        switch (action)
+          {
+            case svn_wc_conflict_action_edit:
+              return _("incoming file edit");
+            case svn_wc_conflict_action_add:
+              return _("incoming file add");
+            case svn_wc_conflict_action_delete:
+              return _("incoming file delete");
+            case svn_wc_conflict_action_replace:
+              return _("incoming file replace");
+          }
+        break;
+      case svn_node_dir:
+        switch (action)
+          {
+            case svn_wc_conflict_action_edit:
+              return _("incoming dir edit");
+            case svn_wc_conflict_action_add:
+              return _("incoming dir add");
+            case svn_wc_conflict_action_delete:
+              return _("incoming dir delete");
+            case svn_wc_conflict_action_replace:
+              return _("incoming dir replace");
+          }
+        break;
+      case svn_node_symlink:
+      case svn_node_none:
+      case svn_node_unknown:
+        break;
+    }
+  return NULL;
 }
 
-/* Return a localized string representation of CONFLICT->reason. */
+/* Return a localised string representation of the operation part of a
+   conflict. */
 static const char *
-reason_str(const svn_wc_conflict_description2_t *conflict)
+operation_str(svn_wc_operation_t operation)
 {
-  return _(svn_token__to_word(map_conflict_reason_human, conflict->reason));
+  switch (operation)
+    {
+    case svn_wc_operation_update: return _("upon update");
+    case svn_wc_operation_switch: return _("upon switch");
+    case svn_wc_operation_merge:  return _("upon merge");
+    case svn_wc_operation_none:   return _("upon none");
+    }
+  SVN_ERR_MALFUNCTION_NO_RETURN();
+  return NULL;
 }
 
 svn_error_t *
@@ -114,10 +193,6 @@ svn_cl__get_human_readable_tree_conflict
   const char *action, *reason, *operation;
   svn_node_kind_t incoming_kind;
 
-  reason = reason_str(conflict);
-  action = action_str(conflict);
-  operation = svn_cl__operation_str_human_readable(conflict->operation, pool);
-
   /* Determine the node kind of the incoming change. */
   incoming_kind = svn_node_unknown;
   if (conflict->action == svn_wc_conflict_action_edit ||
@@ -138,13 +213,30 @@ svn_cl__get_human_readable_tree_conflict
         incoming_kind = conflict->src_right_version->node_kind;
     }
 
-  SVN_ERR_ASSERT(action && reason);
-  *desc = apr_psprintf(pool, _("local %s %s, incoming %s %s upon %s"),
-                       svn_node_kind_to_word(conflict->node_kind),
-                       reason,
-                       svn_node_kind_to_word(incoming_kind),
-                       action,
-                       operation);
+  reason = local_reason_str(conflict->node_kind, conflict->reason);
+  action = incoming_action_str(incoming_kind, conflict->action);
+  operation = operation_str(conflict->operation);
+  SVN_ERR_ASSERT(operation);
+
+  if (action && reason)
+    {
+      *desc = apr_psprintf(pool, _("%s, %s %s"),
+                           reason, action, operation);
+    }
+  else
+    {
+      /* A catch-all message for very rare or nominally impossible cases.
+         It will not be pretty, but is closer to an internal error than
+         an ordinary user-facing string. */
+      *desc = apr_psprintf(pool, _("local: %s %s incoming: %s %s %s"),
+                           svn_node_kind_to_word(conflict->node_kind),
+                           svn_token__to_word(map_conflict_reason_xml, 
+                                              conflict->reason),
+                           svn_node_kind_to_word(incoming_kind),
+                           svn_token__to_word(map_conflict_action_xml, 
+                                              conflict->action),
+                           operation);
+    }
   return SVN_NO_ERROR;
 }
 

Modified: subversion/branches/verify-keep-going/subversion/svn/client_errors.h
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/svn/client_errors.h?rev=1465596&r1=1465595&r2=1465596&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/svn/client_errors.h (original)
+++ subversion/branches/verify-keep-going/subversion/svn/client_errors.h Mon Apr  8 11:47:02 2013
@@ -43,6 +43,8 @@ extern "C" {
 
 #if defined(SVN_ERROR_BUILD_ARRAY)
 
+#error "Need to update err_defn for r1464679 and un-typo 'CDMLINE'"
+
 #define SVN_ERROR_START \
         static const err_defn error_table[] = { \
           { SVN_ERR_CDMLINE__WARNING, "Warning" },

Modified: subversion/branches/verify-keep-going/subversion/svn/file-merge.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/svn/file-merge.c?rev=1465596&r1=1465595&r2=1465596&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/svn/file-merge.c (original)
+++ subversion/branches/verify-keep-going/subversion/svn/file-merge.c Mon Apr  8 11:47:02 2013
@@ -367,7 +367,7 @@ prepare_line_for_display(const char *lin
 {
   svn_stringbuf_t *buf = svn_stringbuf_create(line, pool);
   size_t width;
-  int line_width = LINE_DISPLAY_WIDTH;
+  size_t line_width = LINE_DISPLAY_WIDTH;
   apr_pool_t *iterpool;
 
   /* Trim EOL. */

Modified: subversion/branches/verify-keep-going/subversion/svn/svn.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/svn/svn.c?rev=1465596&r1=1465595&r2=1465596&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/svn/svn.c (original)
+++ subversion/branches/verify-keep-going/subversion/svn/svn.c Mon Apr  8 11:47:02 2013
@@ -2887,6 +2887,16 @@ sub_main(int argc, const char *argv[], a
                                        "on the file server"));
         }
 
+      if (svn_error_find_cause(err, SVN_ERR_RA_CANNOT_CREATE_TUNNEL) &&
+          (opt_state.auth_username || opt_state.auth_password))
+        {
+          err = svn_error_quick_wrap(
+                  err, _("When using svn+ssh:// URLs, keep in mind that the "
+                         "--username and --password options are ignored "
+                         "because authentication is performed by SSH, not "
+                         "Subversion"));
+        }
+
       return EXIT_ERROR(err);
     }
   else

Modified: subversion/branches/verify-keep-going/subversion/svnadmin/svnadmin.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/svnadmin/svnadmin.c?rev=1465596&r1=1465595&r2=1465596&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/svnadmin/svnadmin.c (original)
+++ subversion/branches/verify-keep-going/subversion/svnadmin/svnadmin.c Mon Apr  8 11:47:02 2013
@@ -282,12 +282,12 @@ static const apr_getopt_option_t options
     {"pre-1.5-compatible",     svnadmin__pre_1_5_compatible, 0,
      N_("deprecated; see --compatible-version")},
 
-    {"keep-going",    svnadmin__keep_going, 0,
-     N_("continue verifying after detecting a corruption")},
-
     {"pre-1.6-compatible",     svnadmin__pre_1_6_compatible, 0,
      N_("deprecated; see --compatible-version")},
 
+    {"keep-going",    svnadmin__keep_going, 0,
+     N_("continue verifying after detecting a corruption")},
+
     {"memory-cache-size",     'M', 1,
      N_("size of the extra in-memory cache in MB used to\n"
         "                             minimize redundant operations. Default: 16.\n"
@@ -648,7 +648,24 @@ subcommand_create(apr_getopt_t *os, void
                 (opt_state->bdb_log_keep ? "0" :"1"));
 
   if (opt_state->fs_type)
-    svn_hash_sets(fs_config, SVN_FS_CONFIG_FS_TYPE, opt_state->fs_type);
+    {
+      /* With 1.8 we are announcing that BDB is deprecated.  No support
+       * has been removed and it will continue to work until some future
+       * date.  The purpose here is to discourage people from creating
+       * new BDB repositories which they will need to dump/load into
+       * FSFS or some new FS type in the future. */
+      if (0 == strcmp(opt_state->fs_type, SVN_FS_TYPE_BDB))
+        {
+          SVN_ERR(svn_cmdline_fprintf(
+                      stderr, pool,
+                      _("%swarning:"
+                        " The \"%s\" repository back-end is deprecated,"
+                        " consider using \"%s\" instead.\n"),
+                      "svnadmin: ", SVN_FS_TYPE_BDB, SVN_FS_TYPE_FSFS));
+          fflush(stderr);
+        }
+      svn_hash_sets(fs_config, SVN_FS_CONFIG_FS_TYPE, opt_state->fs_type);
+    }
 
   /* Prior to 1.8, we had explicit options to specify compatibility
      with a handful of prior Subversion releases. */
@@ -1016,6 +1033,7 @@ struct freeze_baton_t {
   int status;
 };
 
+/* Implements svn_repos_freeze_func_t */
 static svn_error_t *
 freeze_body(void *baton,
             apr_pool_t *pool)

Modified: subversion/branches/verify-keep-going/subversion/svnrdump/svnrdump.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/svnrdump/svnrdump.c?rev=1465596&r1=1465595&r2=1465596&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/svnrdump/svnrdump.c (original)
+++ subversion/branches/verify-keep-going/subversion/svnrdump/svnrdump.c Mon Apr  8 11:47:02 2013
@@ -502,9 +502,9 @@ dump_initial_full_revision(svn_ra_sessio
   SVN_ERR(svn_rdump__get_dump_editor(&dump_editor, &dump_baton, revision,
                                      stdout_stream, extra_ra_session,
                                      source_relpath, check_cancel, NULL, pool));
-  SVN_ERR(svn_ra_do_update2(session, &reporter, &report_baton, revision,
-                            "", svn_depth_infinity, FALSE,
-                            dump_editor, dump_baton, pool));
+  SVN_ERR(svn_ra_do_update3(session, &reporter, &report_baton, revision,
+                            "", svn_depth_infinity, FALSE, FALSE,
+                            dump_editor, dump_baton, pool, pool));
   SVN_ERR(reporter->set_path(report_baton, "", revision,
                              svn_depth_infinity, TRUE, NULL, pool));
   SVN_ERR(reporter->finish_report(report_baton, pool));

Modified: subversion/branches/verify-keep-going/subversion/svnserve/serve.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/svnserve/serve.c?rev=1465596&r1=1465595&r2=1465596&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/svnserve/serve.c (original)
+++ subversion/branches/verify-keep-going/subversion/svnserve/serve.c Mon Apr  8 11:47:02 2013
@@ -1813,16 +1813,17 @@ static svn_error_t *update(svn_ra_svn_co
   svn_revnum_t rev;
   const char *target, *full_path, *depth_word;
   svn_boolean_t recurse;
-  svn_boolean_t send_copyfrom_args;
-  apr_uint64_t send_copyfrom_param;
+  apr_uint64_t send_copyfrom_args; /* Optional; default FALSE */
+  apr_uint64_t ignore_ancestry; /* Optional; default TRUE */
   /* Default to unknown.  Old clients won't send depth, but we'll
      handle that by converting recurse if necessary. */
   svn_depth_t depth = svn_depth_unknown;
   svn_boolean_t is_checkout;
 
   /* Parse the arguments. */
-  SVN_ERR(svn_ra_svn_parse_tuple(params, pool, "(?r)cb?wB", &rev, &target,
-                                 &recurse, &depth_word, &send_copyfrom_param));
+  SVN_ERR(svn_ra_svn_parse_tuple(params, pool, "(?r)cb?wB?B", &rev, &target,
+                                 &recurse, &depth_word,
+                                 &send_copyfrom_args, &ignore_ancestry));
   target = svn_relpath_canonicalize(target, pool);
 
   if (depth_word)
@@ -1830,9 +1831,6 @@ static svn_error_t *update(svn_ra_svn_co
   else
     depth = SVN_DEPTH_INFINITY_OR_FILES(recurse);
 
-  send_copyfrom_args = (send_copyfrom_param == SVN_RA_SVN_UNSPECIFIED_NUMBER) ?
-      FALSE : (svn_boolean_t) send_copyfrom_param;
-
   full_path = svn_fspath__join(b->fs_path->data, target, pool);
   /* Check authorization and authenticate the user if necessary. */
   SVN_ERR(must_have_access(conn, pool, b, svn_authz_read, full_path, FALSE));
@@ -1842,7 +1840,9 @@ static svn_error_t *update(svn_ra_svn_co
 
   SVN_ERR(accept_report(&is_checkout, NULL,
                         conn, pool, b, rev, target, NULL, TRUE,
-                        depth, send_copyfrom_args, FALSE));
+                        depth,
+                        (send_copyfrom_args == TRUE) /* send_copyfrom_args */,
+                        (ignore_ancestry != FALSE) /* ignore_ancestry */));
   if (is_checkout)
     {
       SVN_ERR(log_command(b, conn, pool, "%s",
@@ -2975,8 +2975,7 @@ static svn_error_t *replay_one_revision(
     svn_error_clear(editor->abort_edit(edit_baton, pool));
   SVN_CMD_ERR(err);
 
-  return svn_ra_svn_write_templated_cmd(conn, pool,
-                                        svn_ra_svn_cmd_finish_replay);
+  return svn_ra_svn_write_cmd_finish_replay(conn, pool);
 }
 
 static svn_error_t *replay(svn_ra_svn_conn_t *conn, apr_pool_t *pool,
@@ -3328,7 +3327,7 @@ static svn_error_t *find_repos(const cha
                  SVN_CONFIG_OPTION_HOOKS_ENV, NULL);
   if (hooks_env)
     hooks_env = svn_dirent_internal_style(hooks_env, pool);
-  SVN_ERR(svn_repos_hooks_setenv(b->repos, hooks_env, pool, pool));
+  SVN_ERR(svn_repos_hooks_setenv(b->repos, hooks_env, pool));
 
   return SVN_NO_ERROR;
 }

Modified: subversion/branches/verify-keep-going/subversion/tests/cmdline/authz_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/tests/cmdline/authz_tests.py?rev=1465596&r1=1465595&r2=1465596&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/tests/cmdline/authz_tests.py (original)
+++ subversion/branches/verify-keep-going/subversion/tests/cmdline/authz_tests.py Mon Apr  8 11:47:02 2013
@@ -1530,6 +1530,27 @@ def authz_del_from_subdir(sbox):
                                       'rm', sbox.repo_url + '/A/mu',
                                       '-m', '')
 
+
+@XFail()
+@SkipUnless(svntest.main.is_ra_type_dav) # dontdothat is dav only
+@SkipUnless(svntest.main.is_os_windows) # until the buildbots are configured
+def log_diff_dontdothat(sbox):
+  "log --diff on dontdothat"
+  sbox.build(create_wc = False)
+  
+  ddt_url = sbox.repo_url.replace('/svn-test-work/', '/ddt-test-work/')
+  
+  svntest.actions.run_and_verify_svn(None, None, [],
+                                      'log', sbox.repo_url, 
+                                      '-c', 1, '--diff')
+
+  # We should expect a PASS or a proper error message instead of
+  # svn: E175009: XML parsing failed: (403 Forbidden)
+  svntest.actions.run_and_verify_svn(None, None, [],
+                                      'log', ddt_url, 
+                                      '-c', 1, '--diff')
+
+
 ########################################################################
 # Run the tests
 
@@ -1562,6 +1583,7 @@ test_list = [ None,
               remove_subdir_with_authz_and_tc,
               authz_svnserve_groups,
               authz_del_from_subdir,
+              log_diff_dontdothat,
              ]
 serial_only = True
 

Modified: subversion/branches/verify-keep-going/subversion/tests/cmdline/merge_automatic_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/tests/cmdline/merge_automatic_tests.py?rev=1465596&r1=1465595&r2=1465596&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/tests/cmdline/merge_automatic_tests.py (original)
+++ subversion/branches/verify-keep-going/subversion/tests/cmdline/merge_automatic_tests.py Mon Apr  8 11:47:02 2013
@@ -757,7 +757,6 @@ def cherry3_fwd(sbox):
 #----------------------------------------------------------------------
 # Automatic merges ignore subtree mergeinfo during reintegrate.
 @SkipUnless(server_has_mergeinfo)
-@XFail()
 @Issue(4258)
 def subtree_to_and_fro(sbox):
   "reintegrate considers source subtree mergeinfo"
@@ -799,10 +798,10 @@ def subtree_to_and_fro(sbox):
   svntest.actions.run_and_verify_svn(None, None, [], 'ci', wc_dir,
                                      '-m', 'Edit a file on our trunk')
 
-  # Now reintegrate ^/A_COPY back to A.  To the automatic merge code the
-  # subtree merge to A_COPY/D just looks like any other branch edit, it is
-  # not considered a merge.  So the changes which exist on A/D and were
-  # merged to A_COPY/D, are merged *back* to A, resulting in a conflict:
+  # Now reintegrate ^/A_COPY back to A.  Prior to issue #4258's fix, the
+  # the subtree merge to A_COPY/D just looks like any other branch edit and
+  # was not considered a merge.  So the changes which exist on A/D and were
+  # merged to A_COPY/D, were merged *back* to A, resulting in a conflict:
   #
   #   C:\...\working_copies\merge_automatic_tests-18>svn merge ^^/A_COPY A
   #   DBG: merge.c:11461: base on source: ^/A@1
@@ -826,8 +825,8 @@ def subtree_to_and_fro(sbox):
     None, [], svntest.verify.AnyOutput,
     'merge', sbox.repo_url + '/A_COPY', A_path)
 
-  # The 'old' merge produced a warning that reintegrate could not be used.
-  # Not claiming this is perfect, but it's better(?) than a conflict:
+  # Better to produce the same warning that explicitly using the
+  # --reintegrate option would produce:
   svntest.verify.verify_outputs("Automatic Reintegrate failed, but not "
                                 "in the way expected",
                                 err, None,
@@ -1129,7 +1128,6 @@ def auto_merge_handles_replacements_in_m
 # source is fully synced'
 @SkipUnless(server_has_mergeinfo)
 @Issue(4329)
-@XFail()
 def effective_sync_results_in_reintegrate(sbox):
   "an effectively synced branch gets reintegrated"
 
@@ -1184,10 +1182,10 @@ def effective_sync_results_in_reintegrat
   # Revert the merge and try it again, this time without the --reintegrate
   # option.  The merge should still work with the same results.
   #
-  # Currently this fails because the reintegrate code path is not followed,
+  # Previously this failed because the reintegrate code path is not followed,
   # rather the automatic merge attempts a sync style merge of the yca (^/A@1)
   # through the HEAD of the branch (^/branch@7).  This results in a spurious
-  # conflict on A/mu as the edit made in r3 is reapplied..
+  # conflict on A/mu as the edit made in r3 is reapplied.
   #
   # >svn merge ^/branch A
   # --- Merging r2 through r6 into 'A':

Modified: subversion/branches/verify-keep-going/subversion/tests/cmdline/merge_reintegrate_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/tests/cmdline/merge_reintegrate_tests.py?rev=1465596&r1=1465595&r2=1465596&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/tests/cmdline/merge_reintegrate_tests.py (original)
+++ subversion/branches/verify-keep-going/subversion/tests/cmdline/merge_reintegrate_tests.py Mon Apr  8 11:47:02 2013
@@ -1844,8 +1844,11 @@ def reintegrate_with_self_referential_me
                                        None, 1, 0)
 
 #----------------------------------------------------------------------
-# Test for issue #3577 '1.7 subtree mergeinfo recording breaks reintegrate'.
-@Issue(3577)
+# Test for issue #3577 '1.7 subtree mergeinfo recording breaks reintegrate'
+# and issue #4329 'automatic merge uses reintegrate type merge if source is
+# fully synced'.
+@Issue(3577,4329)
+@SkipUnless(server_has_mergeinfo)
 def reintegrate_with_subtree_merges(sbox):
   "reintegrate with prior subtree merges to source"
 
@@ -1857,6 +1860,7 @@ def reintegrate_with_subtree_merges(sbox
 
   # Some paths we'll care about
   A_path        = sbox.ospath('A')
+  psi_path      = sbox.ospath('A/D/H/psi')
   mu_COPY_path  = sbox.ospath('A_COPY/mu')
   A_COPY_path   = sbox.ospath('A_COPY')
   B_COPY_path   = sbox.ospath('A_COPY/B')
@@ -1974,6 +1978,28 @@ def reintegrate_with_subtree_merges(sbox
                              expected_A_skip,
                              None, 1, 1)
 
+  # Test issue #4329.  Revert previous merge and commit a new edit to
+  # A/D/H/psi. Attempt the same merge without the --reintegrate option.
+  # It should succeed because the automatic merge code should detect that
+  # a reintegrate-style merge is required, that merge should succeed and
+  # there should be not conflict on A/D/H/psi.
+  svntest.actions.run_and_verify_svn(None, None, [], 'revert', '-R', wc_dir)
+  svntest.main.file_write(psi_path, "Non-conflicting trunk edit.\n")
+  svntest.main.run_svn(None, 'commit', '-m',
+                       'An edit on trunk prior to reintegrate.', wc_dir)
+  sbox.simple_update()
+  expected_A_status.tweak(wc_rev=9)
+  expected_A_disk.tweak('', props={SVN_PROP_MERGEINFO: '/A_COPY:2-9'})
+  expected_A_disk.tweak('D/H/psi', contents='Non-conflicting trunk edit.\n')
+  svntest.actions.run_and_verify_merge(A_path, None, None,
+                                       sbox.repo_url + '/A_COPY', None,
+                                       expected_output,
+                                       expected_mergeinfo_output,
+                                       expected_elision_output,
+                                       expected_A_disk, expected_A_status,
+                                       expected_A_skip, None, None, None,
+                                       None, None, True, False, A_path)
+
 #----------------------------------------------------------------------
 # Test for issue #3654 'added subtrees with mergeinfo break reintegrate'.
 @Issue(3654)

Modified: subversion/branches/verify-keep-going/subversion/tests/cmdline/svntest/main.py
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/tests/cmdline/svntest/main.py?rev=1465596&r1=1465595&r2=1465596&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/tests/cmdline/svntest/main.py (original)
+++ subversion/branches/verify-keep-going/subversion/tests/cmdline/svntest/main.py Mon Apr  8 11:47:02 2013
@@ -881,12 +881,28 @@ def create_repos(path, minor_version = N
 
   # Skip tests if we can't create the repository.
   if stderr:
+    stderr_lines = 0
+    not_using_fsfs_backend = (options.fs_type != "fsfs")
+    backend_deprecation_warning = False
     for line in stderr:
+      stderr_lines += 1
       if line.find('Unknown FS type') != -1:
         raise Skip
-    # If the FS type is known, assume the repos couldn't be created
-    # (e.g. due to a missing 'svnadmin' binary).
-    raise SVNRepositoryCreateFailure("".join(stderr).rstrip())
+      if not_using_fsfs_backend:
+        if 0 < line.find('repository back-end is deprecated, consider using'):
+          backend_deprecation_warning = True
+
+    # Creating BDB repositories will cause svnadmin to print a warning
+    # which should be ignored.
+    if (stderr_lines == 1
+        and not_using_fsfs_backend
+        and backend_deprecation_warning):
+      pass
+    else:
+      # If the FS type is known and we noticed more than just the
+      # BDB-specific warning, assume the repos couldn't be created
+      # (e.g. due to a missing 'svnadmin' binary).
+      raise SVNRepositoryCreateFailure("".join(stderr).rstrip())
 
   # Require authentication to write to the repos, for ra_svn testing.
   file_write(get_svnserve_conf_file_path(path),

Modified: subversion/branches/verify-keep-going/subversion/tests/libsvn_fs/fs-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/tests/libsvn_fs/fs-test.c?rev=1465596&r1=1465595&r2=1465596&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/tests/libsvn_fs/fs-test.c (original)
+++ subversion/branches/verify-keep-going/subversion/tests/libsvn_fs/fs-test.c Mon Apr  8 11:47:02 2013
@@ -34,6 +34,7 @@
 #include "svn_checksum.h"
 #include "svn_mergeinfo.h"
 #include "svn_props.h"
+#include "svn_version.h"
 
 #include "private/svn_fs_private.h"
 
@@ -4983,6 +4984,26 @@ filename_trailing_newline(const svn_test
   return SVN_NO_ERROR;
 }
 
+static svn_error_t *
+test_fs_info_format(const svn_test_opts_t *opts,
+                    apr_pool_t *pool)
+{
+  svn_fs_t *fs;
+  int fs_format;
+  svn_version_t *supports_version;
+  svn_version_t v1_5_0 = {1, 5, 0, ""};
+  svn_test_opts_t opts2;
+
+  opts2 = *opts;
+  opts2.server_minor_version = 5;
+
+  SVN_ERR(svn_test__create_fs(&fs, "test-fs-format-info", &opts2, pool));
+  SVN_ERR(svn_fs_info_format(&fs_format, &supports_version, fs, pool, pool));
+  SVN_TEST_ASSERT(fs_format == 3); /* happens to be the same for FSFS and BDB */
+  SVN_TEST_ASSERT(svn_ver_equal(supports_version, &v1_5_0));
+
+  return SVN_NO_ERROR;
+}
 
 /* ------------------------------------------------------------------------ */
 
@@ -5066,5 +5087,7 @@ struct svn_test_descriptor_t test_funcs[
                        "test svn_fs_delete_fs"),
     SVN_TEST_OPTS_PASS(filename_trailing_newline,
                        "filenames with trailing \\n might be rejected"),
+    SVN_TEST_OPTS_PASS(test_fs_info_format,
+                       "test svn_fs_info_format"),
     SVN_TEST_NULL
   };



Mime
View raw message