You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by pr...@apache.org on 2013/04/05 07:29:34 UTC

svn commit: r1464833 [10/11] - in /subversion/branches/verify-keep-going: ./ build/ build/generator/ contrib/client-side/svncopy/ notes/ subversion/bindings/javahl/native/ subversion/bindings/javahl/src/org/apache/subversion/javahl/ subversion/bindings...

Modified: subversion/branches/verify-keep-going/subversion/svn/merge-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/svn/merge-cmd.c?rev=1464833&r1=1464832&r2=1464833&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/svn/merge-cmd.c (original)
+++ subversion/branches/verify-keep-going/subversion/svn/merge-cmd.c Fri Apr  5 05:29:29 2013
@@ -63,83 +63,6 @@ ensure_wc_path_has_repo_revision(const c
   return SVN_NO_ERROR;
 }
 
-/* Automatic, merge-tracking merge, used for sync or reintegrate purposes. */
-static svn_error_t *
-automatic_merge(const char *source_path_or_url,
-                const svn_opt_revision_t *source_revision,
-                const char *target_wcpath,
-                svn_depth_t depth,
-                svn_boolean_t diff_ignore_ancestry,
-                svn_boolean_t force_delete,
-                svn_boolean_t record_only,
-                svn_boolean_t dry_run,
-                svn_boolean_t allow_mixed_rev,
-                svn_boolean_t allow_local_mods,
-                svn_boolean_t allow_switched_subtrees,
-                svn_boolean_t verbose,
-                const apr_array_header_t *merge_options,
-                svn_client_ctx_t *ctx,
-                apr_pool_t *scratch_pool)
-{
-  svn_client_automatic_merge_t *merge;
-
-  if (verbose)
-    SVN_ERR(svn_cmdline_printf(scratch_pool, _("--- Checking branch relationship\n")));
-  SVN_ERR_W(svn_cl__check_related_source_and_target(
-              source_path_or_url, source_revision,
-              target_wcpath, &unspecified_revision, ctx, scratch_pool),
-            _("Source and target must be different but related branches"));
-
-  if (verbose)
-    SVN_ERR(svn_cmdline_printf(scratch_pool, _("--- Calculating automatic merge\n")));
-
-  /* Find the 3-way merges needed (and check suitability of the WC). */
-  SVN_ERR(svn_client_find_automatic_merge(&merge,
-                                          source_path_or_url, source_revision,
-                                          target_wcpath, allow_mixed_rev,
-                                          allow_local_mods, allow_switched_subtrees,
-                                          ctx, scratch_pool, scratch_pool));
-
-  if (svn_client_automatic_merge_is_reintegrate_like(merge))
-    {
-      if (record_only)
-        return svn_error_create(SVN_ERR_CL_MUTUALLY_EXCLUSIVE_ARGS, NULL,
-                                _("The required merge is reintegrate-like, "
-                                  "and the --record-only option "
-                                  "cannot be used with this kind of merge"));
-
-      if (depth != svn_depth_unknown)
-        return svn_error_create(SVN_ERR_CL_MUTUALLY_EXCLUSIVE_ARGS, NULL,
-                                _("The required merge is reintegrate-like, "
-                                  "and the --depth option "
-                                  "cannot be used with this kind of merge"));
-
-      if (force_delete)
-        return svn_error_create(SVN_ERR_CL_MUTUALLY_EXCLUSIVE_ARGS, NULL,
-                                _("The required merge is reintegrate-like, "
-                                  "and the --force option "
-                                  "cannot be used with this kind of merge"));
-
-      if (allow_mixed_rev)
-        return svn_error_create(SVN_ERR_CL_MUTUALLY_EXCLUSIVE_ARGS, NULL,
-                                _("The required merge is reintegrate-like, "
-                                  "and the --allow-mixed-revisions option "
-                                  "cannot be used with this kind of merge"));
-    }
-
-  if (verbose)
-    SVN_ERR(svn_cmdline_printf(scratch_pool, _("--- Merging\n")));
-
-  /* Perform the 3-way merges */
-  SVN_ERR(svn_client_do_automatic_merge(merge, target_wcpath, depth,
-                                        diff_ignore_ancestry,
-                                        force_delete, record_only,
-                                        dry_run, merge_options,
-                                        ctx, scratch_pool));
-
-  return SVN_NO_ERROR;
-}
-
 /* Run a merge.
  *
  * (No docs yet, as this code was just hoisted out of svn_cl__merge().)
@@ -163,26 +86,7 @@ run_merge(svn_boolean_t two_sources_spec
 {
   svn_error_t *merge_err;
 
-  /* Do an automatic merge if just one source and no revisions. */
-  if ((! two_sources_specified)
-      && (! opt_state->reintegrate)
-      && (! opt_state->ignore_ancestry)
-      && first_range_start.kind == svn_opt_revision_unspecified
-      && first_range_end.kind == svn_opt_revision_unspecified)
-    {
-      merge_err = automatic_merge(sourcepath1, &peg_revision1, targetpath,
-                                  opt_state->depth,
-                                  FALSE /*diff_ignore_ancestry*/,
-                                  opt_state->force, /* force_delete */
-                                  opt_state->record_only,
-                                  opt_state->dry_run,
-                                  opt_state->allow_mixed_rev,
-                                  TRUE /*allow_local_mods*/,
-                                  TRUE /*allow_switched_subtrees*/,
-                                  opt_state->verbose,
-                                  options, ctx, scratch_pool);
-    }
-  else if (opt_state->reintegrate)
+  if (opt_state->reintegrate)
     {
       merge_err = svn_client_merge_reintegrate(
                     sourcepath1, &peg_revision1, targetpath,
@@ -196,13 +100,7 @@ run_merge(svn_boolean_t two_sources_spec
       if ((first_range_start.kind == svn_opt_revision_unspecified)
           && (first_range_end.kind == svn_opt_revision_unspecified))
         {
-          svn_opt_revision_range_t *range = apr_pcalloc(scratch_pool,
-                                                        sizeof(*range));
-          ranges_to_merge = apr_array_make(scratch_pool, 1, sizeof(range));
-          range->start.kind = svn_opt_revision_number;
-          range->start.value.number = 1;
-          range->end = peg_revision1;
-          APR_ARRAY_PUSH(ranges_to_merge, svn_opt_revision_range_t *) = range;
+          ranges_to_merge = NULL;
 
           /* This must be a 'sync' merge so check branch relationship. */
           if (opt_state->verbose)
@@ -542,30 +440,6 @@ svn_cl__merge(apr_getopt_t *os,
                                   "with --reintegrate"));
     }
 
-  /* Decide how to handle conflicts.  If the user wants interactive
-   * conflict resolution, postpone conflict resolution during the merge
-   * and if any conflicts occur we'll run the conflict resolver later.
-   * Otherwise install the appropriate resolver now. */
-  if (opt_state->accept_which == svn_cl__accept_unspecified
-      || opt_state->accept_which == svn_cl__accept_postpone
-      || opt_state->accept_which == svn_cl__accept_edit
-      || opt_state->accept_which == svn_cl__accept_launch)
-    {
-      /* 'svn.c' has already installed the 'postpone' handler for us. */
-    }
-  else
-    {
-      svn_cl__interactive_conflict_baton_t *b;
-
-      ctx->conflict_func2 = svn_cl__conflict_func_interactive;
-      SVN_ERR(svn_cl__get_conflict_func_interactive_baton(
-                &b,
-                opt_state->accept_which,
-                ctx->config, opt_state->editor_cmd,
-                ctx->cancel_func, ctx->cancel_baton, pool));
-      ctx->conflict_baton2 = b;
-    }
-
   merge_err = run_merge(two_sources_specified,
                         sourcepath1, peg_revision1,
                         sourcepath2,
@@ -580,22 +454,12 @@ svn_cl__merge(apr_getopt_t *os,
                _("Merge tracking not possible, use --ignore-ancestry or\n"
                  "fix invalid mergeinfo in target with 'svn propset'"));
     }
-  if (! merge_err || merge_err->apr_err == SVN_ERR_WC_FOUND_CONFLICT)
+
+  if (!opt_state->quiet)
     {
-      svn_error_t *err = SVN_NO_ERROR;
+      svn_error_t *err = svn_cl__notifier_print_conflict_stats(
+                           ctx->notify_baton2, pool);
 
-      if (! opt_state->quiet)
-        err = svn_cl__notifier_print_conflict_stats(ctx->notify_baton2,
-                                                        pool);
-
-      /* Resolve any postponed conflicts.  (Only if we've been using the
-       * default 'postpone' resolver which remembers what was postponed.) */
-      if (!err && ctx->conflict_func2 == svn_cl__conflict_func_postpone)
-        err = svn_cl__resolve_postponed_conflicts(NULL,
-                                                  ctx->conflict_baton2,
-                                                  opt_state->accept_which,
-                                                  opt_state->editor_cmd,
-                                                  ctx, pool);
       merge_err = svn_error_compose_create(merge_err, err);
     }
 

Modified: subversion/branches/verify-keep-going/subversion/svn/notify.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/svn/notify.c?rev=1464833&r1=1464832&r2=1464833&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/svn/notify.c (original)
+++ subversion/branches/verify-keep-going/subversion/svn/notify.c Fri Apr  5 05:29:29 2013
@@ -36,7 +36,10 @@
 #include "svn_dirent_uri.h"
 #include "svn_path.h"
 #include "svn_sorts.h"
+#include "svn_hash.h"
 #include "cl.h"
+#include "private/svn_subr_private.h"
+#include "private/svn_dep_compat.h"
 
 #include "svn_private_config.h"
 
@@ -54,9 +57,9 @@ struct notify_baton
                                     when we've already had one print error. */
 
   /* Conflict stats for update and merge. */
-  int text_conflicts;
-  int prop_conflicts;
-  int tree_conflicts;
+  apr_pool_t *stats_pool;
+  apr_hash_t *text_conflicts, *prop_conflicts, *tree_conflicts;
+  int text_conflicts_resolved, prop_conflicts_resolved, tree_conflicts_resolved;
   int skipped_paths;
 
   /* The cwd, for use in decomposing absolute paths. */
@@ -64,14 +67,24 @@ struct notify_baton
 };
 
 
+/* Add the PATH (as a key, with a meaningless value) into the HASH in NB. */
+static void
+store_path(struct notify_baton *nb, apr_hash_t *hash, const char *path)
+{
+  svn_hash_sets(hash, apr_pstrdup(nb->stats_pool, path), "");
+}
+
 svn_error_t *
 svn_cl__notifier_reset_conflict_stats(void *baton)
 {
   struct notify_baton *nb = baton;
 
-  nb->text_conflicts = 0;
-  nb->prop_conflicts = 0;
-  nb->tree_conflicts = 0;
+  apr_hash_clear(nb->text_conflicts);
+  apr_hash_clear(nb->prop_conflicts);
+  apr_hash_clear(nb->tree_conflicts);
+  nb->text_conflicts_resolved = 0;
+  nb->prop_conflicts_resolved = 0;
+  nb->tree_conflicts_resolved = 0;
   nb->skipped_paths = 0;
   return SVN_NO_ERROR;
 }
@@ -80,24 +93,50 @@ svn_error_t *
 svn_cl__notifier_print_conflict_stats(void *baton, apr_pool_t *scratch_pool)
 {
   struct notify_baton *nb = baton;
-
-  if (nb->text_conflicts > 0 || nb->prop_conflicts > 0
-      || nb->tree_conflicts > 0 || nb->skipped_paths > 0)
+  int n_text = apr_hash_count(nb->text_conflicts);
+  int n_prop = apr_hash_count(nb->prop_conflicts);
+  int n_tree = apr_hash_count(nb->tree_conflicts);
+  int n_text_r = nb->text_conflicts_resolved;
+  int n_prop_r = nb->prop_conflicts_resolved;
+  int n_tree_r = nb->tree_conflicts_resolved;
+
+  if (n_text > 0 || n_text_r > 0
+      || n_prop > 0 || n_prop_r > 0
+      || n_tree > 0 || n_tree_r > 0
+      || nb->skipped_paths > 0)
     SVN_ERR(svn_cmdline_printf(scratch_pool,
                                _("Summary of conflicts:\n")));
 
-  if (nb->text_conflicts > 0)
-    SVN_ERR(svn_cmdline_printf(scratch_pool,
-                               _("  Text conflicts: %d\n"),
-                               nb->text_conflicts));
-  if (nb->prop_conflicts > 0)
-    SVN_ERR(svn_cmdline_printf(scratch_pool,
-                               _("  Property conflicts: %d\n"),
-                               nb->prop_conflicts));
-  if (nb->tree_conflicts > 0)
-    SVN_ERR(svn_cmdline_printf(scratch_pool,
-                               _("  Tree conflicts: %d\n"),
-                               nb->tree_conflicts));
+  if (n_text_r == 0 && n_prop_r == 0 && n_tree_r == 0)
+    {
+      if (n_text > 0)
+        SVN_ERR(svn_cmdline_printf(scratch_pool,
+          _("  Text conflicts: %d\n"),
+          n_text));
+      if (n_prop > 0)
+        SVN_ERR(svn_cmdline_printf(scratch_pool,
+          _("  Property conflicts: %d\n"),
+          n_prop));
+      if (n_tree > 0)
+        SVN_ERR(svn_cmdline_printf(scratch_pool,
+          _("  Tree conflicts: %d\n"),
+          n_tree));
+    }
+  else
+    {
+      if (n_text > 0 || n_text_r > 0)
+        SVN_ERR(svn_cmdline_printf(scratch_pool,
+          _("  Text conflicts: %d remaining (and %d already resolved)\n"),
+          n_text, n_text_r));
+      if (n_prop > 0 || n_prop_r > 0)
+        SVN_ERR(svn_cmdline_printf(scratch_pool,
+          _("  Property conflicts: %d remaining (and %d already resolved)\n"),
+          n_prop, n_prop_r));
+      if (n_tree > 0 || n_tree_r > 0)
+        SVN_ERR(svn_cmdline_printf(scratch_pool,
+          _("  Tree conflicts: %d remaining (and %d already resolved)\n"),
+          n_tree, n_tree_r));
+    }
   if (nb->skipped_paths > 0)
     SVN_ERR(svn_cmdline_printf(scratch_pool,
                                _("  Skipped paths: %d\n"),
@@ -224,7 +263,7 @@ notify(void *baton, const svn_wc_notify_
       nb->received_some_change = TRUE;
       if (n->content_state == svn_wc_notify_state_conflicted)
         {
-          nb->text_conflicts++;
+          store_path(nb, nb->text_conflicts, path_local);
           if ((err = svn_cmdline_printf(pool, "C    %s\n", path_local)))
             goto print_error;
         }
@@ -239,7 +278,7 @@ notify(void *baton, const svn_wc_notify_
       nb->received_some_change = TRUE;
       if (n->content_state == svn_wc_notify_state_conflicted)
         {
-          nb->text_conflicts++;
+          store_path(nb, nb->text_conflicts, path_local);
           statchar_buf[0] = 'C';
         }
       else
@@ -247,7 +286,7 @@ notify(void *baton, const svn_wc_notify_
 
       if (n->prop_state == svn_wc_notify_state_conflicted)
         {
-          nb->prop_conflicts++;
+          store_path(nb, nb->prop_conflicts, path_local);
           statchar_buf[1] = 'C';
         }
       else if (n->prop_state == svn_wc_notify_state_merged)
@@ -277,6 +316,23 @@ notify(void *baton, const svn_wc_notify_
       break;
 
     case svn_wc_notify_resolved:
+      /* All conflicts on this path are resolved, so remove path from
+         each of the text-, prop- and tree-conflict lists. */
+      if (svn_hash_gets(nb->text_conflicts, path_local))
+        {
+          svn_hash_sets(nb->text_conflicts, path_local, NULL);
+          nb->text_conflicts_resolved++;
+        }
+      if (svn_hash_gets(nb->prop_conflicts, path_local))
+        {
+          svn_hash_sets(nb->prop_conflicts, path_local, NULL);
+          nb->prop_conflicts_resolved++;
+        }
+      if (svn_hash_gets(nb->tree_conflicts, path_local))
+        {
+          svn_hash_sets(nb->tree_conflicts, path_local, NULL);
+          nb->tree_conflicts_resolved++;
+        }
       if ((err = svn_cmdline_printf(pool,
                                     _("Resolved conflicted state of '%s'\n"),
                                     path_local)))
@@ -313,7 +369,7 @@ notify(void *baton, const svn_wc_notify_
         nb->received_some_change = TRUE;
         if (n->content_state == svn_wc_notify_state_conflicted)
           {
-            nb->text_conflicts++;
+            store_path(nb, nb->text_conflicts, path_local);
             statchar_buf[0] = 'C';
           }
         else if (n->kind == svn_node_file)
@@ -326,7 +382,7 @@ notify(void *baton, const svn_wc_notify_
 
         if (n->prop_state == svn_wc_notify_state_conflicted)
           {
-            nb->prop_conflicts++;
+            store_path(nb, nb->prop_conflicts, path_local);
             statchar_buf[1] = 'C';
           }
         else if (n->prop_state == svn_wc_notify_state_changed)
@@ -525,7 +581,7 @@ notify(void *baton, const svn_wc_notify_
       {
         if (n->content_state == svn_wc_notify_state_conflicted)
           {
-            nb->text_conflicts++;
+            store_path(nb, nb->text_conflicts, path_local);
             statchar_buf[0] = 'C';
           }
         else if (n->kind == svn_node_file)
@@ -538,7 +594,7 @@ notify(void *baton, const svn_wc_notify_
 
         if (n->prop_state == svn_wc_notify_state_conflicted)
           {
-            nb->prop_conflicts++;
+            store_path(nb, nb->prop_conflicts, path_local);
             statchar_buf[1] = 'C';
           }
         else if (n->prop_state == svn_wc_notify_state_merged)
@@ -915,7 +971,7 @@ notify(void *baton, const svn_wc_notify_
       break;
 
     case svn_wc_notify_tree_conflict:
-      nb->tree_conflicts++;
+      store_path(nb, nb->tree_conflicts, path_local);
       if ((err = svn_cmdline_printf(pool, "   C %s\n", path_local)))
         goto print_error;
       break;
@@ -1070,9 +1126,13 @@ svn_cl__get_notifier(svn_wc_notify_func2
   nb->is_wc_to_repos_copy = FALSE;
   nb->in_external = FALSE;
   nb->had_print_error = FALSE;
-  nb->text_conflicts = 0;
-  nb->prop_conflicts = 0;
-  nb->tree_conflicts = 0;
+  nb->stats_pool = pool;
+  nb->text_conflicts = apr_hash_make(pool);
+  nb->prop_conflicts = apr_hash_make(pool);
+  nb->tree_conflicts = apr_hash_make(pool);
+  nb->text_conflicts_resolved = 0;
+  nb->prop_conflicts_resolved = 0;
+  nb->tree_conflicts_resolved = 0;
   nb->skipped_paths = 0;
   SVN_ERR(svn_dirent_get_absolute(&nb->path_prefix, "", pool));
 

Modified: subversion/branches/verify-keep-going/subversion/svn/propedit-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/svn/propedit-cmd.c?rev=1464833&r1=1464832&r2=1464833&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/svn/propedit-cmd.c (original)
+++ subversion/branches/verify-keep-going/subversion/svn/propedit-cmd.c Fri Apr  5 05:29:29 2013
@@ -27,6 +27,7 @@
 
 /*** Includes. ***/
 
+#include "svn_hash.h"
 #include "svn_cmdline.h"
 #include "svn_wc.h"
 #include "svn_pools.h"
@@ -239,7 +240,7 @@ svn_cl__propedit(apr_getopt_t *os,
                                       NULL, ctx, subpool, subpool));
 
           /* Get the property value. */
-          propval = apr_hash_get(props, abspath_or_url, APR_HASH_KEY_STRING);
+          propval = svn_hash_gets(props, abspath_or_url);
           if (! propval)
             propval = svn_string_create_empty(subpool);
 

Modified: subversion/branches/verify-keep-going/subversion/svn/propget-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/svn/propget-cmd.c?rev=1464833&r1=1464832&r2=1464833&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/svn/propget-cmd.c (original)
+++ subversion/branches/verify-keep-going/subversion/svn/propget-cmd.c Fri Apr  5 05:29:29 2013
@@ -27,6 +27,7 @@
 
 /*** Includes. ***/
 
+#include "svn_hash.h"
 #include "svn_cmdline.h"
 #include "svn_pools.h"
 #include "svn_client.h"
@@ -209,7 +210,7 @@ print_single_prop(svn_string_t *propval,
       /* Print the property name and value just as "proplist -v" does */
       apr_hash_t *hash = apr_hash_make(scratch_pool);
 
-      apr_hash_set(hash, pname_utf8, APR_HASH_KEY_STRING, propval);
+      svn_hash_sets(hash, pname_utf8, propval);
       SVN_ERR(svn_cmdline__print_prop_hash(out, hash, FALSE, scratch_pool));
     }
   else

Modified: subversion/branches/verify-keep-going/subversion/svn/props.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/svn/props.c?rev=1464833&r1=1464832&r2=1464833&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/svn/props.c (original)
+++ subversion/branches/verify-keep-going/subversion/svn/props.c Fri Apr  5 05:29:29 2013
@@ -30,6 +30,7 @@
 #include <stdlib.h>
 
 #include <apr_hash.h>
+#include "svn_hash.h"
 #include "svn_cmdline.h"
 #include "svn_string.h"
 #include "svn_error.h"

Modified: subversion/branches/verify-keep-going/subversion/svn/schema/info.rnc
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/svn/schema/info.rnc?rev=1464833&r1=1464832&r2=1464833&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/svn/schema/info.rnc (original)
+++ subversion/branches/verify-keep-going/subversion/svn/schema/info.rnc Fri Apr  5 05:29:29 2013
@@ -127,7 +127,8 @@ attlist.tree-conflict &=
   ## Operation causing the tree conflict.
   attribute operation { "update" | "merge" | "switch" },
   ## Operation's action on the victim.
-  attribute action { "edit" | "add" | "delete" },
+  attribute action { "edit" | "add" | "delete" | "replace" },
   ## Local reason for the conflict.
   attribute reason { "edit" | "obstruction" | "delete" | "add" |
-                     "missing" | "unversioned" }
+                     "missing" | "unversioned" | "replace" |
+                     "moved-away" | "moved-here" }

Modified: subversion/branches/verify-keep-going/subversion/svn/status-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/svn/status-cmd.c?rev=1464833&r1=1464832&r2=1464833&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/svn/status-cmd.c (original)
+++ subversion/branches/verify-keep-going/subversion/svn/status-cmd.c Fri Apr  5 05:29:29 2013
@@ -27,6 +27,7 @@
 
 /*** Includes. ***/
 
+#include "svn_hash.h"
 #include "svn_string.h"
 #include "svn_wc.h"
 #include "svn_client.h"
@@ -241,13 +242,12 @@ print_status(void *baton,
       scache->status = svn_client_status_dup(status, sb->cl_pool);
 
       path_array =
-        apr_hash_get(sb->cached_changelists, cl_key, APR_HASH_KEY_STRING);
+        svn_hash_gets(sb->cached_changelists, cl_key);
       if (path_array == NULL)
         {
           path_array = apr_array_make(sb->cl_pool, 1,
                                       sizeof(struct status_cache *));
-          apr_hash_set(sb->cached_changelists, cl_key,
-                       APR_HASH_KEY_STRING, path_array);
+          svn_hash_sets(sb->cached_changelists, cl_key, path_array);
         }
 
       APR_ARRAY_PUSH(path_array, struct status_cache *) = scache;

Modified: subversion/branches/verify-keep-going/subversion/svn/status.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/svn/status.c?rev=1464833&r1=1464832&r2=1464833&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/svn/status.c (original)
+++ subversion/branches/verify-keep-going/subversion/svn/status.c Fri Apr  5 05:29:29 2013
@@ -26,6 +26,7 @@
 
 
 /*** Includes. ***/
+#include "svn_hash.h"
 #include "svn_cmdline.h"
 #include "svn_wc.h"
 #include "svn_dirent_uri.h"
@@ -471,28 +472,27 @@ svn_cl__print_status_xml(const char *cwd
                         "path", svn_dirent_local_style(path, pool), NULL);
 
   att_hash = apr_hash_make(pool);
-  apr_hash_set(att_hash, "item", APR_HASH_KEY_STRING,
-               generate_status_desc(combined_status(status)));
+  svn_hash_sets(att_hash, "item",
+                generate_status_desc(combined_status(status)));
 
-  apr_hash_set(att_hash, "props", APR_HASH_KEY_STRING,
-               generate_status_desc(
-                     (status->node_status != svn_wc_status_deleted)
-                                          ? status->prop_status
-                                          : svn_wc_status_none));
+  svn_hash_sets(att_hash, "props",
+                generate_status_desc(
+                   (status->node_status != svn_wc_status_deleted)
+                   ? status->prop_status
+                   : svn_wc_status_none));
   if (status->wc_is_locked)
-    apr_hash_set(att_hash, "wc-locked", APR_HASH_KEY_STRING, "true");
+    svn_hash_sets(att_hash, "wc-locked", "true");
   if (status->copied)
-    apr_hash_set(att_hash, "copied", APR_HASH_KEY_STRING, "true");
+    svn_hash_sets(att_hash, "copied", "true");
   if (status->switched)
-    apr_hash_set(att_hash, "switched", APR_HASH_KEY_STRING, "true");
+    svn_hash_sets(att_hash, "switched", "true");
   if (status->file_external)
-    apr_hash_set(att_hash, "file-external", APR_HASH_KEY_STRING, "true");
+    svn_hash_sets(att_hash, "file-external", "true");
   if (status->versioned && ! status->copied)
-    apr_hash_set(att_hash, "revision", APR_HASH_KEY_STRING,
-                 apr_psprintf(pool, "%ld", status->revision));
+    svn_hash_sets(att_hash, "revision",
+                  apr_psprintf(pool, "%ld", status->revision));
   if (tree_conflicted)
-    apr_hash_set(att_hash, "tree-conflicted", APR_HASH_KEY_STRING,
-                 "true");
+    svn_hash_sets(att_hash, "tree-conflicted", "true");
   if (status->moved_from_abspath || status->moved_to_abspath)
     {
       const char *relpath;
@@ -502,14 +502,14 @@ svn_cl__print_status_xml(const char *cwd
           relpath = make_relpath(cwd_abspath, status->moved_from_abspath,
                                  pool, pool);
           relpath = svn_dirent_local_style(relpath, pool);
-          apr_hash_set(att_hash, "moved-from", APR_HASH_KEY_STRING, relpath);
+          svn_hash_sets(att_hash, "moved-from", relpath);
         }
       if (status->moved_to_abspath)
         {
           relpath = make_relpath(cwd_abspath, status->moved_to_abspath,
                                  pool, pool);
           relpath = svn_dirent_local_style(relpath, pool);
-          apr_hash_set(att_hash, "moved-to", APR_HASH_KEY_STRING, relpath);
+          svn_hash_sets(att_hash, "moved-to", relpath);
         }
     }
   svn_xml_make_open_tag_hash(&sb, pool, svn_xml_normal, "wc-status",

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=1464833&r1=1464832&r2=1464833&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/svn/svn.c (original)
+++ subversion/branches/verify-keep-going/subversion/svn/svn.c Fri Apr  5 05:29:29 2013
@@ -781,8 +781,24 @@ const svn_opt_subcommand_desc2_t svn_cl_
 "     used, and the default value of 'REV' is the base revision (usually the\n"
 "     revision last updated to).\n"
 "\n"
-"     TARGET_WCPATH is a working copy path; if omitted, '.' is assumed. In\n"
-"     normal usage the working copy should be up to date, at a single\n"
+"     TARGET_WCPATH is a working copy path; if omitted, '.' is generally\n"
+"     assumed. There are some special cases:\n"
+"\n"
+"       - If SOURCE is a URL:\n"
+"\n"
+"           - If the basename of the URL and the basename of '.' are the\n"
+"             same, then the differences are applied to '.'. Otherwise,\n"
+"             if a file with the same basename as that of the URL is found\n"
+"             within '.', then the differences are applied to that file.\n"
+"             In all other cases, the target defaults to '.'.\n"
+"\n"
+"       - If SOURCE is a working copy path:\n"
+"\n"
+"           - If the source is a file, then differences are applied to that\n"
+"             file (useful for reverse-merging earlier changes). Otherwise,\n"
+"             if the source is a directory, then the target defaults to '.'.\n"
+"\n"
+"     In normal usage the working copy should be up to date, at a single\n"
 "     revision, with no local modifications and no switched subtrees.\n"
 "\n"
 "       - The 'Feature Branch' Merging Pattern -\n"
@@ -883,7 +899,9 @@ const svn_opt_subcommand_desc2_t svn_cl_
 "     path, the corresponding URL of the path is used, and the default value\n"
 "     of 'REV' is the base revision (usually the revision last updated to).\n"
 "\n"
-"     TARGET_WCPATH is a working copy path; if omitted, '.' is assumed.\n"
+"     TARGET_WCPATH is a working copy path; if omitted, '.' is generally\n"
+"     assumed. The special cases noted above in the 'automatic' merge form\n"
+"     also apply here.\n"
 "\n"
 "     The revision ranges to be merged are specified by the '-r' and/or '-c'\n"
 "     options. '-r N:M' refers to the difference in the history of the\n"
@@ -952,11 +970,9 @@ const svn_opt_subcommand_desc2_t svn_cl_
 "     branch may be the same as one or both sources, or different again.\n"
 "     The three branches involved can be completely unrelated.\n"
 "\n"
-"     If TARGET_WCPATH is omitted, a default value of '.' is assumed.\n"
-"     However, in the special case where both sources refer to a file node\n"
-"     with the same name and a file with the same name is also found within\n"
-"     '.', the differences will be applied to that local file. The source\n"
-"     revisions REV1 and REV2 default to HEAD if omitted.\n"
+"     TARGET_WCPATH is a working copy path; if omitted, '.' is generally\n"
+"     assumed. The special cases noted above in the 'automatic' merge form\n"
+"     also apply here.\n"
 "\n"
 "     SOURCE1 and/or SOURCE2 can also be specified as a working copy path,\n"
 "     in which case the merge source URL is derived from the working copy.\n"
@@ -2129,8 +2145,7 @@ sub_main(int argc, const char *argv[], a
                                    _("Changelist names must not be empty"));
             return EXIT_ERROR(err);
           }
-        apr_hash_set(changelists, opt_state.changelist,
-                     APR_HASH_KEY_STRING, (void *)1);
+        svn_hash_sets(changelists, opt_state.changelist, (void *)1);
         break;
       case opt_keep_changelists:
         opt_state.keep_changelists = TRUE;
@@ -2529,8 +2544,7 @@ sub_main(int argc, const char *argv[], a
         }
     }
 
-  cfg_config = apr_hash_get(cfg_hash, SVN_CONFIG_CATEGORY_CONFIG,
-                            APR_HASH_KEY_STRING);
+  cfg_config = svn_hash_gets(cfg_hash, SVN_CONFIG_CATEGORY_CONFIG);
 
   /* Update the options in the config */
   if (opt_state.config_options)
@@ -2599,8 +2613,8 @@ sub_main(int argc, const char *argv[], a
 
           if (!err)
             {
-              err = svn_wc_read_kind(&kind, ctx->wc_ctx, local_abspath, FALSE,
-                                     pool);
+              err = svn_wc_read_kind2(&kind, ctx->wc_ctx, local_abspath, TRUE,
+                                      FALSE, pool);
 
               if (!err && kind != svn_node_none && kind != svn_node_unknown)
                 {
@@ -2767,14 +2781,6 @@ sub_main(int argc, const char *argv[], a
 
   ctx->auth_baton = ab;
 
-  /* Install the default conflict handler which postpones all conflicts
-   * and remembers the list of conflicted paths to be resolved later.
-   * This is overridden only within the 'resolve' subcommand. */
-  ctx->conflict_func = NULL;
-  ctx->conflict_baton = NULL;
-  ctx->conflict_func2 = svn_cl__conflict_func_postpone;
-  ctx->conflict_baton2 = svn_cl__get_conflict_func_postpone_baton(pool);
-
   if (opt_state.non_interactive)
     {
       if (opt_state.accept_which == svn_cl__accept_edit)
@@ -2816,6 +2822,22 @@ sub_main(int argc, const char *argv[], a
         opt_state.accept_which = svn_cl__accept_postpone;
     }
 
+  /* Install the default conflict handler. */
+  {
+    svn_cl__interactive_conflict_baton_t *b;
+
+    ctx->conflict_func = NULL;
+    ctx->conflict_baton = NULL;
+
+    ctx->conflict_func2 = svn_cl__conflict_func_interactive;
+    SVN_INT_ERR(svn_cl__get_conflict_func_interactive_baton(
+                &b,
+                opt_state.accept_which,
+                ctx->config, opt_state.editor_cmd,
+                ctx->cancel_func, ctx->cancel_baton, pool));
+    ctx->conflict_baton2 = b;
+  }
+
   /* And now we finally run the subcommand. */
   err = (*subcommand->cmd_func)(os, &command_baton, pool);
   if (err)
@@ -2836,6 +2858,14 @@ sub_main(int argc, const char *argv[], a
                                      _("Please see the 'svn upgrade' command"));
         }
 
+      if (err->apr_err == SVN_ERR_AUTHN_FAILED && opt_state.non_interactive)
+        {
+          err = svn_error_quick_wrap(err,
+                                     _("Authentication failed and interactive"
+                                       " prompting is disabled; see the"
+                                       " --force-interactive option"));
+        }
+
       /* Tell the user about 'svn cleanup' if any error on the stack
          was about locked working copies. */
       if (svn_error_find_cause(err, SVN_ERR_WC_LOCKED))

Modified: subversion/branches/verify-keep-going/subversion/svn/switch-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/svn/switch-cmd.c?rev=1464833&r1=1464832&r2=1464833&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/svn/switch-cmd.c (original)
+++ subversion/branches/verify-keep-going/subversion/svn/switch-cmd.c Fri Apr  5 05:29:29 2013
@@ -157,9 +157,6 @@ svn_cl__switch(apr_getopt_t *os,
   ctx->notify_func2 = svn_cl__check_externals_failed_notify_wrapper;
   ctx->notify_baton2 = &nwb;
 
-  /* Postpone conflict resolution during the switch operation.
-   * If any conflicts occur we'll run the conflict resolver later. */
-
   /* Do the 'switch' update. */
   err = svn_client_switch3(NULL, target, switch_url, &peg_revision,
                            &(opt_state->start_revision), depth,
@@ -198,11 +195,5 @@ svn_cl__switch(apr_getopt_t *os,
         return svn_error_compose_create(externals_err, err);
     }
 
-  err = svn_cl__resolve_postponed_conflicts(NULL,
-                                            ctx->conflict_baton2,
-                                            opt_state->accept_which,
-                                            opt_state->editor_cmd,
-                                            ctx, scratch_pool);
-
   return svn_error_compose_create(externals_err, err);
 }

Modified: subversion/branches/verify-keep-going/subversion/svn/update-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/svn/update-cmd.c?rev=1464833&r1=1464832&r2=1464833&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/svn/update-cmd.c (original)
+++ subversion/branches/verify-keep-going/subversion/svn/update-cmd.c Fri Apr  5 05:29:29 2013
@@ -163,9 +163,6 @@ svn_cl__update(apr_getopt_t *os,
   ctx->notify_func2 = svn_cl__check_externals_failed_notify_wrapper;
   ctx->notify_baton2 = &nwb;
 
-  /* Postpone conflict resolution during the update operation.
-   * If any conflicts occur we'll run the conflict resolver later. */
-
   SVN_ERR(svn_client_update4(&result_revs, targets,
                              &(opt_state->start_revision),
                              depth, depth_is_sticky,
@@ -195,11 +192,5 @@ svn_cl__update(apr_getopt_t *os,
         return svn_error_compose_create(externals_err, err);
     }
 
-  err = svn_cl__resolve_postponed_conflicts(NULL,
-                                            ctx->conflict_baton2,
-                                            opt_state->accept_which,
-                                            opt_state->editor_cmd,
-                                            ctx, scratch_pool);
-
   return svn_error_compose_create(externals_err, err);
 }

Modified: subversion/branches/verify-keep-going/subversion/svn/util.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/svn/util.c?rev=1464833&r1=1464832&r2=1464833&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/svn/util.c (original)
+++ subversion/branches/verify-keep-going/subversion/svn/util.c Fri Apr  5 05:29:29 2013
@@ -112,8 +112,7 @@ svn_cl__merge_file_externally(const char
     {
       struct svn_config_t *cfg;
       merge_tool = NULL;
-      cfg = config ? apr_hash_get(config, SVN_CONFIG_CATEGORY_CONFIG,
-                                  APR_HASH_KEY_STRING) : NULL;
+      cfg = config ? svn_hash_gets(config, SVN_CONFIG_CATEGORY_CONFIG) : NULL;
       /* apr_env_get wants char **, this wants const char ** */
       svn_config_get(cfg, (const char **)&merge_tool,
                      SVN_CONFIG_SECTION_HELPERS,
@@ -225,8 +224,7 @@ svn_cl__make_log_msg_baton(void **baton,
     }
   else if (config)
     {
-      svn_config_t *cfg = apr_hash_get(config, SVN_CONFIG_CATEGORY_CONFIG,
-                                       APR_HASH_KEY_STRING);
+      svn_config_t *cfg = svn_hash_gets(config, SVN_CONFIG_CATEGORY_CONFIG);
       svn_config_get(cfg, &(lmb->message_encoding),
                      SVN_CONFIG_SECTION_MISCELLANY,
                      SVN_CONFIG_OPTION_LOG_ENCODING,

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=1464833&r1=1464832&r2=1464833&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/svnadmin/svnadmin.c (original)
+++ subversion/branches/verify-keep-going/subversion/svnadmin/svnadmin.c Fri Apr  5 05:29:29 2013
@@ -25,6 +25,7 @@
 #include <apr_file_io.h>
 #include <apr_signal.h>
 
+#include "svn_hash.h"
 #include "svn_pools.h"
 #include "svn_cmdline.h"
 #include "svn_error.h"
@@ -44,6 +45,7 @@
 
 #include "private/svn_opt_private.h"
 #include "private/svn_subr_private.h"
+#include "private/svn_cmdline_private.h"
 
 #include "svn_private_config.h"
 
@@ -111,12 +113,11 @@ open_repos(svn_repos_t **repos,
 {
   /* construct FS configuration parameters: enable caches for r/o data */
   apr_hash_t *fs_config = apr_hash_make(pool);
-  apr_hash_set(fs_config, SVN_FS_CONFIG_FSFS_CACHE_DELTAS,
-               APR_HASH_KEY_STRING, "1");
-  apr_hash_set(fs_config, SVN_FS_CONFIG_FSFS_CACHE_FULLTEXTS,
-               APR_HASH_KEY_STRING, "1");
-  apr_hash_set(fs_config, SVN_FS_CONFIG_FSFS_CACHE_REVPROPS,
-               APR_HASH_KEY_STRING, "2");
+  svn_hash_sets(fs_config, SVN_FS_CONFIG_FSFS_CACHE_DELTAS, "1");
+  svn_hash_sets(fs_config, SVN_FS_CONFIG_FSFS_CACHE_FULLTEXTS, "1");
+  svn_hash_sets(fs_config, SVN_FS_CONFIG_FSFS_CACHE_REVPROPS, "2");
+  svn_hash_sets(fs_config, SVN_FS_CONFIG_FSFS_CACHE_NS,
+                           svn_uuid_generate(pool));
 
   /* now, open the requested repository */
   SVN_ERR(svn_repos_open2(repos, path, fs_config, pool));
@@ -216,6 +217,9 @@ static const apr_getopt_option_t options
     {"revision",      'r', 1,
      N_("specify revision number ARG (or X:Y range)")},
 
+    {"transaction",       't', 1,
+     N_("specify transaction name ARG")},
+
     {"incremental",   svnadmin__incremental, 0,
      N_("dump or hotcopy incrementally")},
 
@@ -278,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")},
 
-    {"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")},
 
+    {"pre-1.6-compatible",     svnadmin__pre_1_6_compatible, 0,
+     N_("deprecated; see --compatible-version")},
+
     {"memory-cache-size",     'M', 1,
      N_("size of the extra in-memory cache in MB used to\n"
         "                             minimize redundant operations. Default: 16.\n"
@@ -482,7 +486,7 @@ static const svn_opt_subcommand_desc2_t 
   {"verify", subcommand_verify, {0}, N_
    ("usage: svnadmin verify REPOS_PATH\n\n"
     "Verifies the data stored in the repository.\n"),
-  {'r', 'q', svnadmin__keep_going, 'M'} },
+  {'t', 'r', 'q', svnadmin__keep_going, 'M'} },
 
   { NULL, NULL, {0}, NULL, {0} }
 };
@@ -498,6 +502,7 @@ struct svnadmin_opt_state
   svn_boolean_t pre_1_6_compatible;                 /* --pre-1.6-compatible */
   svn_version_t *compatible_version;                /* --compatible-version */
   svn_opt_revision_t start_revision, end_revision;  /* -r X[:Y] */
+  const char *txn_id;                               /* -t TXN */
   svn_boolean_t help;                               /* --help or -? */
   svn_boolean_t version;                            /* --version */
   svn_boolean_t incremental;                        /* --incremental */
@@ -636,47 +641,36 @@ subcommand_create(apr_getopt_t *os, void
   /* Expect no more arguments. */
   SVN_ERR(parse_args(NULL, os, 0, 0, pool));
 
-  apr_hash_set(fs_config, SVN_FS_CONFIG_BDB_TXN_NOSYNC,
-               APR_HASH_KEY_STRING,
-               (opt_state->bdb_txn_nosync ? "1" : "0"));
-
-  apr_hash_set(fs_config, SVN_FS_CONFIG_BDB_LOG_AUTOREMOVE,
-               APR_HASH_KEY_STRING,
-               (opt_state->bdb_log_keep ? "0" : "1"));
+  svn_hash_sets(fs_config, SVN_FS_CONFIG_BDB_TXN_NOSYNC,
+                (opt_state->bdb_txn_nosync ? "1" :"0"));
+
+  svn_hash_sets(fs_config, SVN_FS_CONFIG_BDB_LOG_AUTOREMOVE,
+                (opt_state->bdb_log_keep ? "0" :"1"));
 
   if (opt_state->fs_type)
-    apr_hash_set(fs_config, SVN_FS_CONFIG_FS_TYPE,
-                 APR_HASH_KEY_STRING,
-                 opt_state->fs_type);
+    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. */
   if (opt_state->pre_1_4_compatible)
-    apr_hash_set(fs_config, SVN_FS_CONFIG_PRE_1_4_COMPATIBLE,
-                 APR_HASH_KEY_STRING, "1");
+    svn_hash_sets(fs_config, SVN_FS_CONFIG_PRE_1_4_COMPATIBLE, "1");
   if (opt_state->pre_1_5_compatible)
-    apr_hash_set(fs_config, SVN_FS_CONFIG_PRE_1_5_COMPATIBLE,
-                 APR_HASH_KEY_STRING, "1");
+    svn_hash_sets(fs_config, SVN_FS_CONFIG_PRE_1_5_COMPATIBLE, "1");
   if (opt_state->pre_1_6_compatible)
-    apr_hash_set(fs_config, SVN_FS_CONFIG_PRE_1_6_COMPATIBLE,
-                 APR_HASH_KEY_STRING, "1");
+    svn_hash_sets(fs_config, SVN_FS_CONFIG_PRE_1_6_COMPATIBLE, "1");
 
   /* In 1.8, we figured out that we didn't have to keep extending this
      madness indefinitely. */
   if (opt_state->compatible_version)
     {
       if (! svn_version__at_least(opt_state->compatible_version, 1, 4, 0))
-        apr_hash_set(fs_config, SVN_FS_CONFIG_PRE_1_4_COMPATIBLE,
-                     APR_HASH_KEY_STRING, "1");
+        svn_hash_sets(fs_config, SVN_FS_CONFIG_PRE_1_4_COMPATIBLE, "1");
       if (! svn_version__at_least(opt_state->compatible_version, 1, 5, 0))
-        apr_hash_set(fs_config, SVN_FS_CONFIG_PRE_1_5_COMPATIBLE,
-                     APR_HASH_KEY_STRING, "1");
+        svn_hash_sets(fs_config, SVN_FS_CONFIG_PRE_1_5_COMPATIBLE, "1");
       if (! svn_version__at_least(opt_state->compatible_version, 1, 6, 0))
-        apr_hash_set(fs_config, SVN_FS_CONFIG_PRE_1_6_COMPATIBLE,
-                     APR_HASH_KEY_STRING, "1");
+        svn_hash_sets(fs_config, SVN_FS_CONFIG_PRE_1_6_COMPATIBLE, "1");
       if (! svn_version__at_least(opt_state->compatible_version, 1, 8, 0))
-        apr_hash_set(fs_config, SVN_FS_CONFIG_PRE_1_8_COMPATIBLE,
-                     APR_HASH_KEY_STRING, "1");
+        svn_hash_sets(fs_config, SVN_FS_CONFIG_PRE_1_8_COMPATIBLE, "1");
     }
 
   SVN_ERR(svn_repos_create(&repos, opt_state->repository_path,
@@ -779,7 +773,7 @@ repos_notify_handler(void *baton,
                                         notify->revision));
       return;
 
-    case  svn_repos_notify_verify_struc_rev:
+    case svn_repos_notify_verify_rev_structure:
       if (notify->revision == SVN_INVALID_REVNUM)
         svn_error_clear(svn_stream_printf(feedback_stream, scratch_pool,
                                 _("* Verifying repository metadata ...\n")));
@@ -1561,10 +1555,34 @@ subcommand_verify(apr_getopt_t *os, void
   /* Expect no more arguments. */
   SVN_ERR(parse_args(NULL, os, 0, 0, pool));
 
+  if (opt_state->txn_id
+      && (opt_state->start_revision.kind != svn_opt_revision_unspecified
+          || opt_state->end_revision.kind != svn_opt_revision_unspecified))
+    {
+      return svn_error_createf(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
+                               _("--revision (-r) and --transaction (-t) "
+                                 "are mutually exclusive"));
+    }
+
   SVN_ERR(open_repos(&repos, opt_state->repository_path, pool));
   fs = svn_repos_fs(repos);
   SVN_ERR(svn_fs_youngest_rev(&youngest, fs, pool));
 
+  /* Usage 2. */
+  if (opt_state->txn_id)
+    {
+      svn_fs_txn_t *txn;
+      svn_fs_root_t *root;
+
+      SVN_ERR(svn_fs_open_txn(&txn, fs, opt_state->txn_id, pool));
+      SVN_ERR(svn_fs_txn_root(&root, txn, pool));
+      SVN_ERR(svn_fs_verify_root(root, pool));
+      return SVN_NO_ERROR;
+    }
+  else
+    /* Usage 1. */
+    ;
+
   /* Find the revision numbers at which to start and end. */
   SVN_ERR(get_revnum(&lower, &opt_state->start_revision,
                      youngest, repos, pool));
@@ -2009,6 +2027,10 @@ sub_main(int argc, const char *argv[], a
             }
         }
         break;
+      case 't':
+        opt_state.txn_id = opt_arg;
+        break;
+
       case 'q':
         opt_state.quiet = TRUE;
         break;

Modified: subversion/branches/verify-keep-going/subversion/svndumpfilter/svndumpfilter.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/svndumpfilter/svndumpfilter.c?rev=1464833&r1=1464832&r2=1464833&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/svndumpfilter/svndumpfilter.c (original)
+++ subversion/branches/verify-keep-going/subversion/svndumpfilter/svndumpfilter.c Fri Apr  5 05:29:29 2013
@@ -44,6 +44,7 @@
 #include "svn_version.h"
 
 #include "private/svn_mergeinfo_private.h"
+#include "private/svn_cmdline_private.h"
 
 #ifdef _WIN32
 typedef apr_status_t (__stdcall *open_fn_t)(apr_file_t **, apr_pool_t *);
@@ -332,8 +333,7 @@ new_revision_record(void **revision_bato
 
   header_stream = svn_stream_from_stringbuf(rb->header, pool);
 
-  rev_orig = apr_hash_get(headers, SVN_REPOS_DUMPFILE_REVISION_NUMBER,
-                          APR_HASH_KEY_STRING);
+  rev_orig = svn_hash_gets(headers, SVN_REPOS_DUMPFILE_REVISION_NUMBER);
   rb->rev_orig = SVN_STR_TO_REV(rev_orig);
 
   if (rb->pb->do_renumber_revs)
@@ -399,12 +399,11 @@ output_revision(struct revision_baton_t 
       apr_hash_t *old_props = rb->props;
       rb->has_props = TRUE;
       rb->props = apr_hash_make(hash_pool);
-      apr_hash_set(rb->props, SVN_PROP_REVISION_DATE, APR_HASH_KEY_STRING,
-                   apr_hash_get(old_props, SVN_PROP_REVISION_DATE,
-                                APR_HASH_KEY_STRING));
-      apr_hash_set(rb->props, SVN_PROP_REVISION_LOG, APR_HASH_KEY_STRING,
-                   svn_string_create(_("This is an empty revision for "
-                                       "padding."), hash_pool));
+      svn_hash_sets(rb->props, SVN_PROP_REVISION_DATE,
+                    svn_hash_gets(old_props, SVN_PROP_REVISION_DATE));
+      svn_hash_sets(rb->props, SVN_PROP_REVISION_LOG,
+                    svn_string_create(_("This is an empty revision for "
+                                        "padding."), hash_pool));
     }
 
   /* Now, "rasterize" the props to a string, and append the property
@@ -546,11 +545,8 @@ new_node_record(void **node_baton,
   nb->rb      = rev_baton;
   pb          = nb->rb->pb;
 
-  node_path = apr_hash_get(headers, SVN_REPOS_DUMPFILE_NODE_PATH,
-                           APR_HASH_KEY_STRING);
-  copyfrom_path = apr_hash_get(headers,
-                               SVN_REPOS_DUMPFILE_NODE_COPYFROM_PATH,
-                               APR_HASH_KEY_STRING);
+  node_path = svn_hash_gets(headers, SVN_REPOS_DUMPFILE_NODE_PATH);
+  copyfrom_path = svn_hash_gets(headers, SVN_REPOS_DUMPFILE_NODE_COPYFROM_PATH);
 
   /* Ensure that paths start with a leading '/'. */
   if (node_path[0] != '/')
@@ -565,16 +561,15 @@ new_node_record(void **node_baton,
      rest.  */
   if (nb->do_skip)
     {
-      apr_hash_set(pb->dropped_nodes,
-                   apr_pstrdup(apr_hash_pool_get(pb->dropped_nodes),
-                               node_path),
-                   APR_HASH_KEY_STRING, (void *)1);
+      svn_hash_sets(pb->dropped_nodes,
+                    apr_pstrdup(apr_hash_pool_get(pb->dropped_nodes),
+                                node_path),
+                    (void *)1);
       nb->rb->had_dropped_nodes = TRUE;
     }
   else
     {
-      tcl = apr_hash_get(headers, SVN_REPOS_DUMPFILE_TEXT_CONTENT_LENGTH,
-                         APR_HASH_KEY_STRING);
+      tcl = svn_hash_gets(headers, SVN_REPOS_DUMPFILE_TEXT_CONTENT_LENGTH);
 
       /* Test if this node was copied from dropped source. */
       if (copyfrom_path &&
@@ -589,17 +584,16 @@ new_node_record(void **node_baton,
              scenario, we'll just do an add without history using the new
              contents.  */
           const char *kind;
-          kind = apr_hash_get(headers, SVN_REPOS_DUMPFILE_NODE_KIND,
-                              APR_HASH_KEY_STRING);
+          kind = svn_hash_gets(headers, SVN_REPOS_DUMPFILE_NODE_KIND);
 
           /* If there is a Text-content-length header, and the kind is
              "file", we just fallback to an add without history. */
           if (tcl && (strcmp(kind, "file") == 0))
             {
-              apr_hash_set(headers, SVN_REPOS_DUMPFILE_NODE_COPYFROM_PATH,
-                           APR_HASH_KEY_STRING, NULL);
-              apr_hash_set(headers, SVN_REPOS_DUMPFILE_NODE_COPYFROM_REV,
-                           APR_HASH_KEY_STRING, NULL);
+              svn_hash_sets(headers, SVN_REPOS_DUMPFILE_NODE_COPYFROM_PATH,
+                            NULL);
+              svn_hash_sets(headers, SVN_REPOS_DUMPFILE_NODE_COPYFROM_REV,
+                            NULL);
               copyfrom_path = NULL;
             }
           /* Else, this is either a directory or a file whose contents we
@@ -825,8 +819,7 @@ adjust_mergeinfo(svn_string_t **final_va
               range->end = revmap_end->rev;
             }
         }
-      apr_hash_set(final_mergeinfo, merge_source,
-                   APR_HASH_KEY_STRING, rangelist);
+      svn_hash_sets(final_mergeinfo, merge_source, rangelist);
     }
 
   SVN_ERR(svn_mergeinfo_sort(final_mergeinfo, subpool));
@@ -846,8 +839,9 @@ set_revision_property(void *revision_bat
   apr_pool_t *hash_pool = apr_hash_pool_get(rb->props);
 
   rb->has_props = TRUE;
-  apr_hash_set(rb->props, apr_pstrdup(hash_pool, name),
-               APR_HASH_KEY_STRING, svn_string_dup(value, hash_pool));
+  svn_hash_sets(rb->props,
+                apr_pstrdup(hash_pool, name),
+                svn_string_dup(value, hash_pool));
   return SVN_NO_ERROR;
 }
 

Modified: subversion/branches/verify-keep-going/subversion/svnlook/svnlook.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/svnlook/svnlook.c?rev=1464833&r1=1464832&r2=1464833&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/svnlook/svnlook.c (original)
+++ subversion/branches/verify-keep-going/subversion/svnlook/svnlook.c Fri Apr  5 05:29:29 2013
@@ -34,6 +34,7 @@
 #define APR_WANT_STRFUNC
 #include <apr_want.h>
 
+#include "svn_hash.h"
 #include "svn_cmdline.h"
 #include "svn_types.h"
 #include "svn_pools.h"
@@ -1762,7 +1763,7 @@ do_pget(svnlook_ctxt_t *c,
             {
               apr_hash_t *hash = apr_hash_make(pool);
 
-              apr_hash_set(hash, propname, APR_HASH_KEY_STRING, prop);
+              svn_hash_sets(hash, propname, prop);
               SVN_ERR(svn_stream_printf(stdout_stream, pool,
                       _("Properties on '%s':\n"), path));
               SVN_ERR(svn_cmdline__print_prop_hash(stdout_stream, hash,
@@ -2663,6 +2664,16 @@ main(int argc, const char *argv[])
                                     _("Unknown subcommand: '%s'\n"),
                                     first_arg_utf8));
               SVN_INT_ERR(subcommand_help(NULL, NULL, pool));
+
+              /* Be kind to people who try 'svnlook verify'. */
+              if (strcmp(first_arg_utf8, "verify") == 0)
+                {
+                  svn_error_clear(
+                    svn_cmdline_fprintf(stderr, pool,
+                                        _("Try 'svnadmin verify' instead.\n")));
+                }
+
+
               svn_pool_destroy(pool);
               return EXIT_FAILURE;
             }

Modified: subversion/branches/verify-keep-going/subversion/svnmucc/svnmucc.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/svnmucc/svnmucc.c?rev=1464833&r1=1464832&r2=1464833&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/svnmucc/svnmucc.c (original)
+++ subversion/branches/verify-keep-going/subversion/svnmucc/svnmucc.c Fri Apr  5 05:29:29 2013
@@ -40,6 +40,7 @@
 
 #include <apr_lib.h>
 
+#include "svn_hash.h"
 #include "svn_client.h"
 #include "svn_cmdline.h"
 #include "svn_config.h"
@@ -108,6 +109,7 @@ create_ra_callbacks(svn_ra_callbacks2_t 
                     const char *config_dir,
                     svn_config_t *cfg_config,
                     svn_boolean_t non_interactive,
+                    svn_boolean_t trust_server_cert,
                     svn_boolean_t no_auth_cache,
                     apr_pool_t *pool)
 {
@@ -117,7 +119,7 @@ create_ra_callbacks(svn_ra_callbacks2_t 
                                         non_interactive,
                                         username, password, config_dir,
                                         no_auth_cache,
-                                        FALSE /* trust_server_certs */,
+                                        trust_server_cert,
                                         cfg_config, NULL, NULL, pool));
 
   (*callbacks)->open_tmp_file = open_tmp_file;
@@ -334,8 +336,7 @@ get_operation(const char *path,
               struct operation *operation,
               apr_pool_t *pool)
 {
-  struct operation *child = apr_hash_get(operation->children, path,
-                                         APR_HASH_KEY_STRING);
+  struct operation *child = svn_hash_gets(operation->children, path);
   if (! child)
     {
       child = apr_pcalloc(pool, sizeof(*child));
@@ -345,7 +346,7 @@ get_operation(const char *path,
       child->kind = svn_node_dir;
       child->prop_mods = apr_hash_make(pool);
       child->prop_dels = apr_array_make(pool, 1, sizeof(const char *));
-      apr_hash_set(operation->children, path, APR_HASH_KEY_STRING, child);
+      svn_hash_sets(operation->children, path, child);
     }
   return child;
 }
@@ -449,8 +450,7 @@ build(action_code_t action,
       if (! prop_value)
         APR_ARRAY_PUSH(operation->prop_dels, const char *) = prop_name;
       else
-        apr_hash_set(operation->prop_mods, prop_name,
-                     APR_HASH_KEY_STRING, prop_value);
+        svn_hash_sets(operation->prop_mods, prop_name, prop_value);
       if (!operation->rev)
         operation->rev = rev;
       return SVN_NO_ERROR;
@@ -728,6 +728,7 @@ execute(const apr_array_header_t *action
         const char *config_dir,
         const apr_array_header_t *config_options,
         svn_boolean_t non_interactive,
+        svn_boolean_t trust_server_cert,
         svn_boolean_t no_auth_cache,
         svn_revnum_t base_revision,
         apr_pool_t *pool)
@@ -748,10 +749,9 @@ execute(const apr_array_header_t *action
   SVN_ERR(svn_config_get_config(&config, config_dir, pool));
   SVN_ERR(svn_cmdline__apply_config_options(config, config_options,
                                             "svnmucc: ", "--config-option"));
-  cfg_config = apr_hash_get(config, SVN_CONFIG_CATEGORY_CONFIG,
-                            APR_HASH_KEY_STRING);
+  cfg_config = svn_hash_gets(config, SVN_CONFIG_CATEGORY_CONFIG);
 
-  if (! apr_hash_get(revprops, SVN_PROP_REVISION_LOG, APR_HASH_KEY_STRING))
+  if (! svn_hash_gets(revprops, SVN_PROP_REVISION_LOG))
     {
       svn_string_t *msg = svn_string_create("", pool);
 
@@ -770,12 +770,12 @@ execute(const apr_array_header_t *action
                       TRUE, NULL, apr_hash_pool_get(revprops)));
         }
 
-      apr_hash_set(revprops, SVN_PROP_REVISION_LOG, APR_HASH_KEY_STRING, msg);
+      svn_hash_sets(revprops, SVN_PROP_REVISION_LOG, msg);
     }
 
   SVN_ERR(create_ra_callbacks(&ra_callbacks, username, password, config_dir,
-                              cfg_config, non_interactive, no_auth_cache,
-                              pool));
+                              cfg_config, non_interactive, trust_server_cert,
+                              no_auth_cache, pool));
   SVN_ERR(svn_ra_open4(&session, NULL, anchor, NULL, ra_callbacks,
                        NULL, config, pool));
   /* Open, then reparent to avoid AUTHZ errors when opening the reposroot */
@@ -950,9 +950,15 @@ usage(apr_pool_t *pool, int exit_val)
       "  -r [--revision] ARG    : use revision ARG as baseline for changes\n"
       "  --with-revprop ARG     : set revision property in the following format:\n"
       "                               NAME[=VALUE]\n"
-      "  -n [--non-interactive] : don't prompt the user about anything\n"
+      "  --non-interactive      : do no interactive prompting (default is to\n"
+      "                           prompt only if standard input is a terminal)\n"
+      "  --force-interactive    : do interactive propmting even if standard\n"
+      "                           input is not a terminal\n"
+      "  --trust-server-cert    : accept SSL server certificates from unknown\n"
+      "                           certificate authorities without prompting (but\n"
+      "                           only with '--non-interactive')\n"
       "  -X [--extra-args] ARG  : append arguments from file ARG (one per line;\n"
-      "                         : use \"-\" to read from standard input)\n"
+      "                           use \"-\" to read from standard input)\n"
       "  --config-dir ARG       : use ARG to override the config directory\n"
       "  --config-option ARG    : use ARG to override a configuration option\n"
       "  --no-auth-cache        : do not cache authentication tokens\n"
@@ -1011,7 +1017,7 @@ sanitize_log_sources(apr_hash_t *revprop
   /* If we already have a log message in the revprop hash, then just
      make sure the user didn't try to also use -m or -F.  Otherwise,
      we need to consult -m or -F to find a log message, if any. */
-  if (apr_hash_get(revprops, SVN_PROP_REVISION_LOG, APR_HASH_KEY_STRING))
+  if (svn_hash_gets(revprops, SVN_PROP_REVISION_LOG))
     {
       if (filedata || message)
         return mutually_exclusive_logs_error();
@@ -1022,13 +1028,13 @@ sanitize_log_sources(apr_hash_t *revprop
         return mutually_exclusive_logs_error();
 
       SVN_ERR(svn_utf_cstring_to_utf8(&message, filedata->data, hash_pool));
-      apr_hash_set(revprops, SVN_PROP_REVISION_LOG, APR_HASH_KEY_STRING,
-                   svn_stringbuf__morph_into_string(filedata));
+      svn_hash_sets(revprops, SVN_PROP_REVISION_LOG,
+                    svn_stringbuf__morph_into_string(filedata));
     }
   else if (message)
     {
-      apr_hash_set(revprops, SVN_PROP_REVISION_LOG, APR_HASH_KEY_STRING,
-                   svn_string_create(message, hash_pool));
+      svn_hash_sets(revprops, SVN_PROP_REVISION_LOG,
+                    svn_string_create(message, hash_pool));
     }
   
   return SVN_NO_ERROR;
@@ -1048,7 +1054,10 @@ main(int argc, const char **argv)
     config_inline_opt,
     no_auth_cache_opt,
     version_opt,
-    with_revprop_opt
+    with_revprop_opt,
+    non_interactive_opt,
+    force_interactive_opt,
+    trust_server_cert_opt
   };
   static const apr_getopt_option_t options[] = {
     {"message", 'm', 1, ""},
@@ -1061,7 +1070,9 @@ main(int argc, const char **argv)
     {"extra-args", 'X', 1, ""},
     {"help", 'h', 0, ""},
     {NULL, '?', 0, ""},
-    {"non-interactive", 'n', 0, ""},
+    {"non-interactive", non_interactive_opt, 0, ""},
+    {"force-interactive", force_interactive_opt, 0, ""},
+    {"trust-server-cert", trust_server_cert_opt, 0, ""},
     {"config-dir", config_dir_opt, 1, ""},
     {"config-option",  config_inline_opt, 1, ""},
     {"no-auth-cache",  no_auth_cache_opt, 0, ""},
@@ -1075,6 +1086,8 @@ main(int argc, const char **argv)
   const char *config_dir = NULL;
   apr_array_header_t *config_options;
   svn_boolean_t non_interactive = FALSE;
+  svn_boolean_t force_interactive = FALSE;
+  svn_boolean_t trust_server_cert = FALSE;
   svn_boolean_t no_auth_cache = FALSE;
   svn_revnum_t base_revision = SVN_INVALID_REVNUM;
   apr_array_header_t *action_args;
@@ -1150,9 +1163,15 @@ main(int argc, const char **argv)
         case 'X':
           extra_args_file = apr_pstrdup(pool, arg);
           break;
-        case 'n':
+        case non_interactive_opt:
           non_interactive = TRUE;
           break;
+        case force_interactive_opt:
+          force_interactive = TRUE;
+          break;
+        case trust_server_cert_opt:
+          trust_server_cert = TRUE;
+          break;
         case config_dir_opt:
           err = svn_utf_cstring_to_utf8(&config_dir, arg, pool);
           if (err)
@@ -1182,6 +1201,25 @@ main(int argc, const char **argv)
         }
     }
 
+  if (non_interactive && force_interactive)
+    {
+      err = svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
+                             _("--non-interactive and --force-interactive "
+                               "are mutually exclusive"));
+      return svn_cmdline_handle_exit_error(err, pool, "svnmucc: ");
+    }
+  else
+    non_interactive = !svn_cmdline__be_interactive(non_interactive,
+                                                   force_interactive);
+
+  if (trust_server_cert && !non_interactive)
+    {
+      err = svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
+                             _("--trust-server-cert requires "
+                               "--non-interactive"));
+      return svn_cmdline_handle_exit_error(err, pool, "svnmucc: ");
+    }
+
   /* Make sure we have a log message to use. */
   err = sanitize_log_sources(revprops, message, filedata);
   if (err)
@@ -1404,8 +1442,15 @@ main(int argc, const char **argv)
 
   if ((err = execute(actions, anchor, revprops, username, password,
                      config_dir, config_options, non_interactive,
-                     no_auth_cache, base_revision, pool)))
-    handle_error(err, pool);
+                     trust_server_cert, no_auth_cache, base_revision, pool)))
+    {
+      if (err->apr_err == SVN_ERR_AUTHN_FAILED && non_interactive)
+        err = svn_error_quick_wrap(err,
+                                   _("Authentication failed and interactive"
+                                     " prompting is disabled; see the"
+                                     " --force-interactive option"));
+      handle_error(err, pool);
+    }
 
   /* Ensure that stdout is flushed, so the user will see all results. */
   svn_error_clear(svn_cmdline_fflush(stdout));

Modified: subversion/branches/verify-keep-going/subversion/svnrdump/dump_editor.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/svnrdump/dump_editor.c?rev=1464833&r1=1464832&r2=1464833&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/svnrdump/dump_editor.c (original)
+++ subversion/branches/verify-keep-going/subversion/svnrdump/dump_editor.c Fri Apr  5 05:29:29 2013
@@ -31,6 +31,7 @@
 #include "svn_dirent_uri.h"
 
 #include "private/svn_subr_private.h"
+#include "private/svn_dep_compat.h"
 #include "private/svn_editor.h"
 
 #include "svnrdump.h"
@@ -324,8 +325,8 @@ do_dump_props(svn_stringbuf_t **propstri
       SVN_ERR(svn_stream_puts(stream, "\n\n"));
 
       /* Cleanup so that data is never dumped twice. */
-      SVN_ERR(svn_hash__clear(props, scratch_pool));
-      SVN_ERR(svn_hash__clear(deleted_props, scratch_pool));
+      apr_hash_clear(props);
+      apr_hash_clear(deleted_props);
       if (trigger_var)
         *trigger_var = FALSE;
     }
@@ -668,8 +669,7 @@ delete_entry(const char *path,
      to the deleted_entries of the parent directory baton.  That way,
      we can tell (later) an addition from a replacement.  All the real
      deletions get handled in close_directory().  */
-  apr_hash_set(pb->deleted_entries, apr_pstrdup(pb->eb->pool, path),
-               APR_HASH_KEY_STRING, pb);
+  svn_hash_sets(pb->deleted_entries, apr_pstrdup(pb->eb->pool, path), pb);
 
   return SVN_NO_ERROR;
 }
@@ -695,7 +695,7 @@ add_directory(const char *path,
                           pb, TRUE, pb->eb->pool);
 
   /* This might be a replacement -- is the path already deleted? */
-  val = apr_hash_get(pb->deleted_entries, path, APR_HASH_KEY_STRING);
+  val = svn_hash_gets(pb->deleted_entries, path);
 
   /* Detect an add-with-history */
   is_copy = ARE_VALID_COPY_ARGS(copyfrom_path, copyfrom_rev);
@@ -710,7 +710,7 @@ add_directory(const char *path,
 
   if (val)
     /* Delete the path, it's now been dumped */
-    apr_hash_set(pb->deleted_entries, path, APR_HASH_KEY_STRING, NULL);
+    svn_hash_sets(pb->deleted_entries, path, NULL);
 
   /* Remember that we've started, but not yet finished handling this
      directory. */
@@ -800,7 +800,7 @@ close_directory(void *dir_baton,
     }
 
   /* ### should be unnecessary */
-  SVN_ERR(svn_hash__clear(db->deleted_entries, pool));
+  apr_hash_clear(db->deleted_entries);
 
   return SVN_NO_ERROR;
 }
@@ -825,7 +825,7 @@ add_file(const char *path,
   fb = make_file_baton(path, pb, pool);
   
   /* This might be a replacement -- is the path already deleted? */
-  val = apr_hash_get(pb->deleted_entries, path, APR_HASH_KEY_STRING);
+  val = svn_hash_gets(pb->deleted_entries, path);
 
   /* Detect add-with-history. */
   if (ARE_VALID_COPY_ARGS(copyfrom_path, copyfrom_rev))
@@ -838,7 +838,7 @@ add_file(const char *path,
 
   /* Delete the path, it's now been dumped. */
   if (val)
-    apr_hash_set(pb->deleted_entries, path, APR_HASH_KEY_STRING, NULL);
+    svn_hash_sets(pb->deleted_entries, path, NULL);
 
   *file_baton = fb;
   return SVN_NO_ERROR;
@@ -896,11 +896,11 @@ change_dir_prop(void *parent_baton,
     return SVN_NO_ERROR;
 
   if (value)
-    apr_hash_set(db->props, apr_pstrdup(db->pool, name),
-                 APR_HASH_KEY_STRING, svn_string_dup(value, db->pool));
+    svn_hash_sets(db->props,
+                  apr_pstrdup(db->pool, name),
+                  svn_string_dup(value, db->pool));
   else
-    apr_hash_set(db->deleted_props, apr_pstrdup(db->pool, name),
-                 APR_HASH_KEY_STRING, "");
+    svn_hash_sets(db->deleted_props, apr_pstrdup(db->pool, name), "");
 
   /* Make sure we eventually output the props, and disable printing
      a couple of extra newlines */
@@ -924,11 +924,11 @@ change_file_prop(void *file_baton,
     return SVN_NO_ERROR;
 
   if (value)
-    apr_hash_set(fb->props, apr_pstrdup(fb->pool, name),
-                 APR_HASH_KEY_STRING, svn_string_dup(value, fb->pool));
+    svn_hash_sets(fb->props,
+                  apr_pstrdup(fb->pool, name),
+                  svn_string_dup(value, fb->pool));
   else
-    apr_hash_set(fb->deleted_props, apr_pstrdup(fb->pool, name),
-                 APR_HASH_KEY_STRING, "");
+    svn_hash_sets(fb->deleted_props, apr_pstrdup(fb->pool, name), "");
 
   /* Dump the property headers and wait; close_file might need
      to write text headers too depending on whether
@@ -1071,8 +1071,8 @@ close_file(void *file_baton,
 
       /* Cleanup */
       fb->dump_props = FALSE;
-      SVN_ERR(svn_hash__clear(fb->props, fb->pool));
-      SVN_ERR(svn_hash__clear(fb->deleted_props, fb->pool));
+      apr_hash_clear(fb->props);
+      apr_hash_clear(fb->deleted_props);
     }
 
   /* Dump the text */

Modified: subversion/branches/verify-keep-going/subversion/svnrdump/load_editor.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/svnrdump/load_editor.c?rev=1464833&r1=1464832&r2=1464833&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/svnrdump/load_editor.c (original)
+++ subversion/branches/verify-keep-going/subversion/svnrdump/load_editor.c Fri Apr  5 05:29:29 2013
@@ -199,7 +199,7 @@ prefix_mergeinfo_paths(svn_string_t **me
       path = svn_fspath__canonicalize(svn_relpath_join(parent_dir,
                                                        merge_source, pool),
                                       pool);
-      apr_hash_set(prefixed_mergeinfo, path, APR_HASH_KEY_STRING, rangelist);
+      svn_hash_sets(prefixed_mergeinfo, path, rangelist);
     }
   return svn_mergeinfo_to_string(mergeinfo_val, prefixed_mergeinfo, pool);
 }
@@ -635,10 +635,8 @@ new_node_record(void **node_baton,
          commit_editor. We'll set them separately using the RA API
          after closing the editor (see close_revision). */
 
-      apr_hash_set(rb->revprop_table, SVN_PROP_REVISION_AUTHOR,
-                   APR_HASH_KEY_STRING, NULL);
-      apr_hash_set(rb->revprop_table, SVN_PROP_REVISION_DATE,
-                   APR_HASH_KEY_STRING, NULL);
+      svn_hash_sets(rb->revprop_table, SVN_PROP_REVISION_AUTHOR, NULL);
+      svn_hash_sets(rb->revprop_table, SVN_PROP_REVISION_DATE, NULL);
 
       SVN_ERR(svn_ra__register_editor_shim_callbacks(rb->pb->session,
                                     get_shim_callbacks(rb, rb->pool)));
@@ -860,8 +858,9 @@ set_revision_property(void *baton,
 
   if (rb->rev > 0)
     {
-      apr_hash_set(rb->revprop_table, apr_pstrdup(rb->pool, name),
-                   APR_HASH_KEY_STRING, svn_string_dup(value, rb->pool));
+      svn_hash_sets(rb->revprop_table,
+                    apr_pstrdup(rb->pool, name),
+                    svn_string_dup(value, rb->pool));
     }
   else if (rb->rev_offset == -1)
     {

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=1464833&r1=1464832&r2=1464833&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/svnrdump/svnrdump.c (original)
+++ subversion/branches/verify-keep-going/subversion/svnrdump/svnrdump.c Fri Apr  5 05:29:29 2013
@@ -366,8 +366,7 @@ init_client_context(svn_client_ctx_t **c
     SVN_ERR(svn_cmdline__apply_config_options(ctx->config, config_options,
                                               "svnrdump: ", "--config-option"));
 
-  cfg_config = apr_hash_get(ctx->config, SVN_CONFIG_CATEGORY_CONFIG,
-                            APR_HASH_KEY_STRING);
+  cfg_config = svn_hash_gets(ctx->config, SVN_CONFIG_CATEGORY_CONFIG);
 
   /* ### FIXME: This is a hack to work around the fact that our dump
      ### editor simply can't handle the way ra_serf violates the
@@ -382,8 +381,7 @@ init_client_context(svn_client_ctx_t **c
      ### 
      ### See http://subversion.tigris.org/issues/show_bug.cgi?id=4116.
   */
-  cfg_servers = apr_hash_get(ctx->config, SVN_CONFIG_CATEGORY_SERVERS,
-                             APR_HASH_KEY_STRING);
+  cfg_servers = svn_hash_gets(ctx->config, SVN_CONFIG_CATEGORY_SERVERS);
   svn_config_set_bool(cfg_servers, SVN_CONFIG_SECTION_GLOBAL,
                       SVN_CONFIG_OPTION_HTTP_BULK_UPDATES, TRUE);
   svn_config_set_int64(cfg_servers, SVN_CONFIG_SECTION_GLOBAL,
@@ -696,9 +694,9 @@ dump_cmd(apr_getopt_t *os,
   svn_ra_session_t *extra_ra_session;
   const char *repos_root;
 
-  SVN_ERR(svn_client_open_ra_session(&extra_ra_session,
-                                     opt_baton->url,
-                                     opt_baton->ctx, pool));
+  SVN_ERR(svn_client_open_ra_session2(&extra_ra_session,
+                                      opt_baton->url, NULL,
+                                      opt_baton->ctx, pool, pool));
   SVN_ERR(svn_ra_get_repos_root2(extra_ra_session, &repos_root, pool));
   SVN_ERR(svn_ra_reparent(extra_ra_session, repos_root, pool));
 
@@ -717,8 +715,8 @@ load_cmd(apr_getopt_t *os,
   opt_baton_t *opt_baton = baton;
   svn_ra_session_t *aux_session;
 
-  SVN_ERR(svn_client_open_ra_session(&aux_session, opt_baton->url,
-                                     opt_baton->ctx, pool));
+  SVN_ERR(svn_client_open_ra_session2(&aux_session, opt_baton->url, NULL,
+                                      opt_baton->ctx, pool, pool));
   return load_revisions(opt_baton->session, aux_session, opt_baton->url,
                         opt_baton->quiet, pool);
 }
@@ -1141,21 +1139,32 @@ main(int argc, const char **argv)
                                    config_options,
                                    pool));
 
-  SVNRDUMP_ERR(svn_client_open_ra_session(&(opt_baton->session),
-                                          opt_baton->url,
-                                          opt_baton->ctx, pool));
+  err = svn_client_open_ra_session2(&(opt_baton->session),
+                                    opt_baton->url, NULL,
+                                    opt_baton->ctx, pool, pool);
 
   /* Have sane opt_baton->start_revision and end_revision defaults if
      unspecified.  */
-  SVNRDUMP_ERR(svn_ra_get_latest_revnum(opt_baton->session,
-                                        &latest_revision, pool));
+  if (!err)
+    err = svn_ra_get_latest_revnum(opt_baton->session, &latest_revision, pool);
 
   /* Make sure any provided revisions make sense. */
-  SVNRDUMP_ERR(validate_and_resolve_revisions(opt_baton,
-                                              latest_revision, pool));
+  if (!err)
+    err = validate_and_resolve_revisions(opt_baton, latest_revision, pool);
 
   /* Dispatch the subcommand */
-  SVNRDUMP_ERR((*subcommand->cmd_func)(os, opt_baton, pool));
+  if (!err)
+    err = (*subcommand->cmd_func)(os, opt_baton, pool);
+
+  if (err && err->apr_err == SVN_ERR_AUTHN_FAILED && non_interactive)
+    {
+      err = svn_error_quick_wrap(err,
+                                 _("Authentication failed and interactive"
+                                   " prompting is disabled; see the"
+                                   " --force-interactive option"));
+    }
+
+  SVNRDUMP_ERR(err);
 
   svn_pool_destroy(pool);
 

Modified: subversion/branches/verify-keep-going/subversion/svnrdump/util.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/svnrdump/util.c?rev=1464833&r1=1464832&r2=1464833&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/svnrdump/util.c (original)
+++ subversion/branches/verify-keep-going/subversion/svnrdump/util.c Fri Apr  5 05:29:29 2013
@@ -67,7 +67,7 @@ svn_rdump__normalize_props(apr_hash_t **
       SVN_ERR(svn_rdump__normalize_prop(key, &value,
                                         result_pool));
 
-      apr_hash_set(*normal_props, key, APR_HASH_KEY_STRING, value);
+      svn_hash_sets(*normal_props, key, value);
     }
   return SVN_NO_ERROR;
 }

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=1464833&r1=1464832&r2=1464833&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/svnserve/serve.c (original)
+++ subversion/branches/verify-keep-going/subversion/svnserve/serve.c Fri Apr  5 05:29:29 2013
@@ -35,6 +35,7 @@
 
 #include "svn_compat.h"
 #include "svn_private_config.h"  /* For SVN_PATH_LOCAL_SEPARATOR */
+#include "svn_hash.h"
 #include "svn_types.h"
 #include "svn_string.h"
 #include "svn_pools.h"
@@ -52,6 +53,7 @@
 
 #include "private/svn_log.h"
 #include "private/svn_mergeinfo_private.h"
+#include "private/svn_ra_svn_private.h"
 #include "private/svn_fspath.h"
 
 #ifdef HAVE_UNISTD_H
@@ -306,29 +308,35 @@ svn_error_t *load_pwdb_config(server_bat
   return SVN_NO_ERROR;
 }
 
-/* Canonicalize ACCESS_FILE based on the type of argument.
- * SERVER baton is used to convert relative paths to absolute paths
- * rooted at the server root. */
-static const char *
-canonicalize_access_file(const char *access_file,
-                         server_baton_t *server,
-                         apr_pool_t *pool)
+/* Canonicalize *ACCESS_FILE based on the type of argument.  Results are
+ * placed in *ACCESS_FILE.  SERVER baton is used to convert relative paths to
+ * absolute paths rooted at the server root.  REPOS_ROOT is used to calculate
+ * an absolute URL for repos-relative URLs. */
+static svn_error_t * 
+canonicalize_access_file(const char **access_file, server_baton_t *server,
+                         const char *repos_root, apr_pool_t *pool)
 {
-  if (svn_path_is_url(access_file))
+  if (svn_path_is_url(*access_file))
     {
-      access_file = svn_uri_canonicalize(access_file, pool);
+      *access_file = svn_uri_canonicalize(*access_file, pool);
     }
-  else if (!svn_path_is_repos_relative_url(access_file))
+  else if (svn_path_is_repos_relative_url(*access_file))
     {
-      access_file = svn_dirent_internal_style(access_file, pool);
-      access_file = svn_dirent_join(server->base, access_file, pool);
-    }
+      const char *repos_root_url;
 
-  /* We don't canonicalize repos relative urls since they get
-   * canonicalized inside svn_repos_authz_read2() when they
-   * are resolved. */
+      SVN_ERR(svn_uri_get_file_url_from_dirent(&repos_root_url, repos_root,
+                                               pool));
+      SVN_ERR(svn_path_resolve_repos_relative_url(access_file, *access_file,
+                                                  repos_root_url, pool));
+      *access_file = svn_uri_canonicalize(*access_file, pool);
+    }
+  else
+    {
+      *access_file = svn_dirent_internal_style(*access_file, pool);
+      *access_file = svn_dirent_join(server->base, *access_file, pool);
+    }
 
-  return access_file;
+  return SVN_NO_ERROR;
 }
 
 svn_error_t *load_authz_config(server_baton_t *server,
@@ -352,15 +360,18 @@ svn_error_t *load_authz_config(server_ba
       const char *case_force_val;
 
       /* Canonicalize and add the base onto the authzdb_path (if needed). */
-      authzdb_path = canonicalize_access_file(authzdb_path, server, pool);
+      err = canonicalize_access_file(&authzdb_path, server,
+                                     repos_root, pool);
 
       /* Same for the groupsdb_path if it is present. */
-      if (groupsdb_path)
-        groupsdb_path = canonicalize_access_file(groupsdb_path,
-                                                 server, pool);
+      if (groupsdb_path && !err)
+        err = canonicalize_access_file(&groupsdb_path, server,
+                                       repos_root, pool);
+
+      if (!err)
+        err = svn_repos_authz_read2(&server->authzdb, authzdb_path,
+                                    groupsdb_path, TRUE, pool);
 
-      err = svn_repos_authz_read2(&server->authzdb, authzdb_path,
-                                  groupsdb_path, TRUE, repos_root, pool);
       if (err)
         {
           log_server_error(err, server, conn, pool);
@@ -1055,19 +1066,16 @@ get_props(apr_hash_t **props,
                                            path, pool));
       str = svn_string_create(apr_psprintf(pool, "%ld", crev),
                               pool);
-      apr_hash_set(*props, SVN_PROP_ENTRY_COMMITTED_REV, APR_HASH_KEY_STRING,
-                   str);
+      svn_hash_sets(*props, SVN_PROP_ENTRY_COMMITTED_REV, str);
       str = (cdate) ? svn_string_create(cdate, pool) : NULL;
-      apr_hash_set(*props, SVN_PROP_ENTRY_COMMITTED_DATE, APR_HASH_KEY_STRING,
-                   str);
+      svn_hash_sets(*props, SVN_PROP_ENTRY_COMMITTED_DATE, str);
       str = (cauthor) ? svn_string_create(cauthor, pool) : NULL;
-      apr_hash_set(*props, SVN_PROP_ENTRY_LAST_AUTHOR, APR_HASH_KEY_STRING,
-                   str);
+      svn_hash_sets(*props, SVN_PROP_ENTRY_LAST_AUTHOR, str);
 
       /* Hardcode the values for the UUID. */
       SVN_ERR(svn_fs_get_uuid(svn_fs_root_fs(root), &uuid, pool));
       str = (uuid) ? svn_string_create(uuid, pool) : NULL;
-      apr_hash_set(*props, SVN_PROP_ENTRY_UUID, APR_HASH_KEY_STRING, str);
+      svn_hash_sets(*props, SVN_PROP_ENTRY_UUID, str);
     }
 
   /* Get any inherited properties the user is authorized to. */
@@ -1437,14 +1445,14 @@ static svn_error_t *commit(svn_ra_svn_co
   else
     {
       revprop_table = apr_hash_make(pool);
-      apr_hash_set(revprop_table, SVN_PROP_REVISION_LOG, APR_HASH_KEY_STRING,
-                   svn_string_create(log_msg, pool));
+      svn_hash_sets(revprop_table, SVN_PROP_REVISION_LOG,
+                    svn_string_create(log_msg, pool));
     }
 
   /* Get author from the baton, making sure clients can't circumvent
      the authentication via the revision props. */
-  apr_hash_set(revprop_table, SVN_PROP_REVISION_AUTHOR, APR_HASH_KEY_STRING,
-               b->user ? svn_string_create(b->user, pool) : NULL);
+  svn_hash_sets(revprop_table, SVN_PROP_REVISION_AUTHOR,
+                b->user ? svn_string_create(b->user, pool) : NULL);
 
   ccb.pool = pool;
   ccb.new_rev = &new_rev;
@@ -2952,8 +2960,7 @@ static svn_error_t *replay_one_revision(
   ab.conn = conn;
 
   SVN_ERR(log_command(b, conn, pool,
-                      svn_log__replay(b->fs_path->data, low_water_mark,
-                                      pool)));
+                      svn_log__replay(b->fs_path->data, rev, pool)));
 
   svn_ra_svn_get_editor(&editor, &edit_baton, conn, pool, NULL, NULL);
 
@@ -3506,12 +3513,12 @@ svn_error_t *serve(svn_ra_svn_conn_t *co
 
   /* construct FS configuration parameters */
   b.fs_config = apr_hash_make(pool);
-  apr_hash_set(b.fs_config, SVN_FS_CONFIG_FSFS_CACHE_DELTAS,
-               APR_HASH_KEY_STRING, params->cache_txdeltas ? "1" : "0");
-  apr_hash_set(b.fs_config, SVN_FS_CONFIG_FSFS_CACHE_FULLTEXTS,
-               APR_HASH_KEY_STRING, params->cache_fulltexts ? "1" : "0");
-  apr_hash_set(b.fs_config, SVN_FS_CONFIG_FSFS_CACHE_REVPROPS,
-               APR_HASH_KEY_STRING, params->cache_revprops ? "1" : "0");
+  svn_hash_sets(b.fs_config, SVN_FS_CONFIG_FSFS_CACHE_DELTAS,
+                params->cache_txdeltas ? "1" :"0");
+  svn_hash_sets(b.fs_config, SVN_FS_CONFIG_FSFS_CACHE_FULLTEXTS,
+                params->cache_fulltexts ? "1" :"0");
+  svn_hash_sets(b.fs_config, SVN_FS_CONFIG_FSFS_CACHE_REVPROPS,
+                params->cache_revprops ? "1" :"0");
 
   /* Send greeting.  We don't support version 1 any more, so we can
    * send an empty mechlist. */

Modified: subversion/branches/verify-keep-going/subversion/svnserve/svnserve.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/svnserve/svnserve.c?rev=1464833&r1=1464832&r2=1464833&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/svnserve/svnserve.c (original)
+++ subversion/branches/verify-keep-going/subversion/svnserve/svnserve.c Fri Apr  5 05:29:29 2013
@@ -50,7 +50,10 @@
 #include "svn_io.h"
 
 #include "svn_private_config.h"
+
 #include "private/svn_dep_compat.h"
+#include "private/svn_cmdline_private.h"
+
 #include "winservice.h"
 
 #ifdef HAVE_UNISTD_H

Modified: subversion/branches/verify-keep-going/subversion/svnsync/svnsync.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/svnsync/svnsync.c?rev=1464833&r1=1464832&r2=1464833&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/svnsync/svnsync.c (original)
+++ subversion/branches/verify-keep-going/subversion/svnsync/svnsync.c Fri Apr  5 05:29:29 2013
@@ -19,6 +19,7 @@
  * ====================================================================
  */
 
+#include "svn_hash.h"
 #include "svn_cmdline.h"
 #include "svn_config.h"
 #include "svn_pools.h"
@@ -490,7 +491,7 @@ remove_props_not_in_source(svn_ra_sessio
         continue;
 
       /* Delete property if the name can't be found in SOURCE_PROPS. */
-      if (! apr_hash_get(source_props, propname, APR_HASH_KEY_STRING))
+      if (! svn_hash_gets(source_props, propname))
         SVN_ERR(svn_ra_change_rev_prop2(session, rev, propname, NULL,
                                         NULL, subpool));
     }
@@ -533,7 +534,7 @@ filter_props(int *filtered_count, apr_ha
           - matching the include pattern if provided */
       if (!filter || !filter(propname))
         {
-          apr_hash_set(filtered, propname, APR_HASH_KEY_STRING, propval);
+          svn_hash_sets(filtered, propname, propval);
         }
       else
         {
@@ -923,12 +924,9 @@ open_source_session(svn_ra_session_t **f
 
   SVN_ERR(svn_ra_rev_proplist(to_session, 0, &props, pool));
 
-  from_url_str = apr_hash_get(props, SVNSYNC_PROP_FROM_URL,
-                              APR_HASH_KEY_STRING);
-  from_uuid_str = apr_hash_get(props, SVNSYNC_PROP_FROM_UUID,
-                               APR_HASH_KEY_STRING);
-  *last_merged_rev = apr_hash_get(props, SVNSYNC_PROP_LAST_MERGED_REV,
-                                  APR_HASH_KEY_STRING);
+  from_url_str = svn_hash_gets(props, SVNSYNC_PROP_FROM_URL);
+  from_uuid_str = svn_hash_gets(props, SVNSYNC_PROP_FROM_UUID);
+  *last_merged_rev = svn_hash_gets(props, SVNSYNC_PROP_LAST_MERGED_REV);
 
   if (! from_url_str || ! from_uuid_str || ! *last_merged_rev)
     return svn_error_create
@@ -1237,9 +1235,9 @@ replay_rev_started(svn_revnum_t revision
      have to set it to at least the empty string. If there's a svn:log
      property on this revision, we will write the actual value in the
      replay_rev_finished callback. */
-  if (! apr_hash_get(filtered, SVN_PROP_REVISION_LOG, APR_HASH_KEY_STRING))
-    apr_hash_set(filtered, SVN_PROP_REVISION_LOG, APR_HASH_KEY_STRING,
-                 svn_string_create_empty(pool));
+  if (! svn_hash_gets(filtered, SVN_PROP_REVISION_LOG))
+    svn_hash_sets(filtered, SVN_PROP_REVISION_LOG,
+                  svn_string_create_empty(pool));
 
   /* If necessary, normalize encoding and line ending style. Add the number
      of properties that required EOL normalization to the overall count
@@ -1815,18 +1813,15 @@ info_cmd(apr_getopt_t *os, void *b, apr_
 
   SVN_ERR(svn_ra_rev_proplist(to_session, 0, &props, pool));
 
-  from_url = apr_hash_get(props, SVNSYNC_PROP_FROM_URL,
-                          APR_HASH_KEY_STRING);
+  from_url = svn_hash_gets(props, SVNSYNC_PROP_FROM_URL);
 
   if (! from_url)
     return svn_error_createf
       (SVN_ERR_BAD_URL, NULL,
        _("Repository '%s' is not initialized for synchronization"), to_url);
 
-  from_uuid = apr_hash_get(props, SVNSYNC_PROP_FROM_UUID,
-                           APR_HASH_KEY_STRING);
-  last_merged_rev = apr_hash_get(props, SVNSYNC_PROP_LAST_MERGED_REV,
-                                 APR_HASH_KEY_STRING);
+  from_uuid = svn_hash_gets(props, SVNSYNC_PROP_FROM_UUID);
+  last_merged_rev = svn_hash_gets(props, SVNSYNC_PROP_LAST_MERGED_REV);
 
   /* Print the info. */
   SVN_ERR(svn_cmdline_printf(pool, _("Source URL: %s\n"), from_url->data));
@@ -1896,7 +1891,7 @@ main(int argc, const char *argv[])
   const char *password = NULL, *source_password = NULL, *sync_password = NULL;
   apr_array_header_t *config_options = NULL;
   const char *source_prop_encoding = NULL;
-  svn_boolean_t force_interactive;
+  svn_boolean_t force_interactive = FALSE;
 
   if (svn_cmdline_init("svnsync", stderr) != EXIT_SUCCESS)
     {
@@ -2235,8 +2230,7 @@ main(int argc, const char *argv[])
                                             "svnsync: ", "--config-option"));
     }
 
-  config = apr_hash_get(opt_baton.config, SVN_CONFIG_CATEGORY_CONFIG,
-                        APR_HASH_KEY_STRING);
+  config = svn_hash_gets(opt_baton.config, SVN_CONFIG_CATEGORY_CONFIG);
 
   opt_baton.source_prop_encoding = source_prop_encoding;