subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From julianf...@apache.org
Subject svn commit: r1688213 [3/3] - in /subversion/branches/move-tracking-2: ./ build/ build/ac-macros/ subversion/ subversion/bindings/javahl/native/ subversion/bindings/javahl/src/org/apache/subversion/javahl/ subversion/include/ subversion/include/private/...
Date Mon, 29 Jun 2015 13:42:12 GMT
Modified: subversion/branches/move-tracking-2/subversion/svn/info-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/svn/info-cmd.c?rev=1688213&r1=1688212&r2=1688213&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/svn/info-cmd.c (original)
+++ subversion/branches/move-tracking-2/subversion/svn/info-cmd.c Mon Jun 29 13:42:10 2015
@@ -391,15 +391,24 @@ print_info_xml(void *baton,
   if (info->wc_info && info->wc_info->conflicts)
     {
       int i;
+      apr_pool_t *iterpool;
 
+      iterpool = svn_pool_create(pool);
       for (i = 0; i < info->wc_info->conflicts->nelts; i++)
         {
-          const svn_wc_conflict_description2_t *conflict =
+          const svn_wc_conflict_description2_t *desc =
                       APR_ARRAY_IDX(info->wc_info->conflicts, i,
                                     const svn_wc_conflict_description2_t *);
+          svn_client_conflict_t *conflict;
 
-          SVN_ERR(svn_cl__append_conflict_info_xml(sb, conflict, pool));
+          svn_pool_clear(iterpool);
+
+          SVN_ERR(svn_client_conflict_from_wc_description2_t(&conflict, desc,
+                                                             iterpool,
+                                                             iterpool));
+          SVN_ERR(svn_cl__append_conflict_info_xml(sb, conflict, iterpool));
         }
+      svn_pool_destroy(iterpool);
     }
 
   if (info->lock)
@@ -581,27 +590,37 @@ print_info(void *baton,
 
       if (info->wc_info->conflicts)
         {
-          svn_boolean_t printed_prop_conflict_file = FALSE;
           svn_boolean_t printed_tc = FALSE;
+          svn_stringbuf_t *conflicted_props = NULL;
           int i;
+          apr_pool_t *iterpool;
 
+          iterpool = svn_pool_create(pool);
           for (i = 0; i < info->wc_info->conflicts->nelts; i++)
             {
-              const svn_wc_conflict_description2_t *conflict =
+              const svn_wc_conflict_description2_t *desc2 =
                     APR_ARRAY_IDX(info->wc_info->conflicts, i,
                                   const svn_wc_conflict_description2_t *);
               const char *desc;
-              const char *base_abspath;
-              const char *my_abspath;
-              const char *their_abspath;
-
-              base_abspath = svn_client_conflict_get_base_abspath(conflict);
-              my_abspath = svn_client_conflict_get_my_abspath(conflict);
-              their_abspath = svn_client_conflict_get_their_abspath(conflict);
-
+              const char *base_abspath = NULL;
+              const char *my_abspath = NULL;
+              const char *their_abspath = NULL;
+              svn_client_conflict_t *conflict;
+
+              svn_pool_clear(iterpool);
+
+              SVN_ERR(svn_client_conflict_from_wc_description2_t(&conflict,
+                                                                 desc2,
+                                                                 iterpool,
+                                                                 iterpool));
               switch (svn_client_conflict_get_kind(conflict))
                 {
                   case svn_wc_conflict_kind_text:
+
+                    SVN_ERR(svn_client_conflict_text_get_contents(
+                              NULL, &my_abspath, &base_abspath, &their_abspath,
+                              conflict, pool, pool));
+
                     if (base_abspath)
                       SVN_ERR(svn_cmdline_printf(pool,
                                 _("Conflict Previous Base File: %s\n"),
@@ -628,15 +647,18 @@ print_info(void *baton,
                   break;
 
                   case svn_wc_conflict_kind_property:
-                    if (! printed_prop_conflict_file)
-                      SVN_ERR(svn_cmdline_printf(pool,
-                                _("Conflict Properties File: %s\n"),
-                                svn_cl__local_style_skip_ancestor(
-                                  receiver_baton->path_prefix,
-                                  svn_client_conflict_get_prop_reject_abspath(
-                                    conflict),
-                                  pool)));
-                    printed_prop_conflict_file = TRUE;
+                    {
+                      const char *name;
+
+                      name = svn_client_conflict_prop_get_propname(conflict);
+                      if (conflicted_props == NULL)
+                        conflicted_props = svn_stringbuf_create(name, pool);
+                      else
+                        {
+                          svn_stringbuf_appendbyte(conflicted_props, ' ');
+                          svn_stringbuf_appendcstr(conflicted_props, name);
+                        }
+                    }
                   break;
 
                   case svn_wc_conflict_kind_tree:
@@ -650,6 +672,11 @@ print_info(void *baton,
                   break;
                 }
             }
+          svn_pool_destroy(iterpool);
+
+          if (conflicted_props)
+            SVN_ERR(svn_cmdline_printf(pool, _("Conflicted Properties: %s\n"),
+                                       conflicted_props->data));
 
           /* We only store one left and right version for all conflicts, which is
              referenced from all conflicts.
@@ -658,10 +685,18 @@ print_info(void *baton,
           {
             const char *src_left_version;
             const char *src_right_version;
-            const svn_wc_conflict_description2_t *conflict =
+            const char *repos_root_url;
+            const char *repos_relpath;
+            svn_revnum_t peg_rev;
+            svn_node_kind_t node_kind;
+            const svn_wc_conflict_description2_t *desc2 =
                   APR_ARRAY_IDX(info->wc_info->conflicts, 0,
                                 const svn_wc_conflict_description2_t *);
 
+            svn_client_conflict_t *conflict;
+
+            SVN_ERR(svn_client_conflict_from_wc_description2_t(&conflict, desc2,
+                                                               pool, pool));
             if (!printed_tc)
               {
                 const char *desc;
@@ -669,21 +704,28 @@ print_info(void *baton,
                 SVN_ERR(svn_cl__get_human_readable_action_description(&desc,
                           svn_wc_conflict_action_edit,
                           svn_client_conflict_get_operation(conflict),
-                          svn_client_conflict_get_node_kind(conflict), pool));
+                          info->kind,
+                          pool));
 
                 SVN_ERR(svn_cmdline_printf(pool, "%s: %s\n",
                                                _("Conflict Details"), desc));
               }
 
+            SVN_ERR(svn_client_conflict_get_repos_info(&repos_root_url, NULL,
+                                                       conflict, pool, pool));
+            SVN_ERR(svn_client_conflict_get_incoming_old_repos_location(
+                      &repos_relpath, &peg_rev, &node_kind, conflict,
+                      pool, pool));
             src_left_version =
-                        svn_cl__node_description(
-                          svn_client_conflict_get_src_left_version(conflict),
-                          info->repos_root_URL, pool);
+                        svn_cl__node_description(repos_root_url, repos_relpath,
+                          peg_rev, node_kind, info->repos_root_URL, pool);
 
+            SVN_ERR(svn_client_conflict_get_incoming_new_repos_location(
+                      &repos_relpath, &peg_rev, &node_kind, conflict,
+                      pool, pool));
             src_right_version =
-                        svn_cl__node_description(
-                          svn_client_conflict_get_src_right_version(conflict),
-                          info->repos_root_URL, pool);
+                        svn_cl__node_description(repos_root_url, repos_relpath,
+                          peg_rev, node_kind, info->repos_root_URL, pool);
 
             if (src_left_version)
               SVN_ERR(svn_cmdline_printf(pool, "  %s: %s\n",

Modified: subversion/branches/move-tracking-2/subversion/svn/status.c
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/svn/status.c?rev=1688213&r1=1688212&r2=1688213&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/svn/status.c (original)
+++ subversion/branches/move-tracking-2/subversion/svn/status.c Mon Jun 29 13:42:10 2015
@@ -282,11 +282,16 @@ print_status(const char *target_abspath,
 
       if (tree_conflicted)
         {
-          const svn_wc_conflict_description2_t *tree_conflict;
-          SVN_ERR(svn_wc__get_tree_conflict(&tree_conflict, ctx->wc_ctx,
+          const svn_wc_conflict_description2_t *desc2;
+          svn_client_conflict_t *tree_conflict;
+
+          SVN_ERR(svn_wc__get_tree_conflict(&desc2, ctx->wc_ctx,
                                             local_abspath, pool, pool));
-          SVN_ERR_ASSERT(tree_conflict != NULL);
+          SVN_ERR_ASSERT(desc2 != NULL);
 
+          SVN_ERR(svn_client_conflict_from_wc_description2_t(&tree_conflict,
+                                                             desc2,
+                                                             pool, pool));
           tree_status_code = 'C';
           SVN_ERR(svn_cl__get_human_readable_tree_conflict_description(
                             &desc, tree_conflict, pool));

Modified: subversion/branches/move-tracking-2/subversion/svn/util.c
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/svn/util.c?rev=1688213&r1=1688212&r2=1688213&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/svn/util.c (original)
+++ subversion/branches/move-tracking-2/subversion/svn/util.c Mon Jun 29 13:42:10 2015
@@ -907,14 +907,17 @@ svn_cl__time_cstring_to_human_cstring(co
 }
 
 const char *
-svn_cl__node_description(const svn_wc_conflict_version_t *node,
+svn_cl__node_description(const char *repos_root_url,
+                         const char *repos_relpath,
+                         svn_revnum_t peg_rev,
+                         svn_node_kind_t node_kind,
                          const char *wc_repos_root_URL,
                          apr_pool_t *pool)
 {
   const char *root_str = "^";
   const char *path_str = "...";
 
-  if (!node)
+  if (!repos_root_url || !repos_relpath || !SVN_IS_VALID_REVNUM(peg_rev))
     /* Printing "(none)" the harder way to ensure conformity (mostly with
      * translations). */
     return apr_psprintf(pool, "(%s)",
@@ -923,18 +926,18 @@ svn_cl__node_description(const svn_wc_co
   /* Construct a "caret notation" ^/URL if NODE matches WC_REPOS_ROOT_URL.
    * Otherwise show the complete URL, and if we can't, show dots. */
 
-  if (node->repos_url &&
+  if (repos_root_url &&
       (wc_repos_root_URL == NULL ||
-       strcmp(node->repos_url, wc_repos_root_URL) != 0))
-    root_str = node->repos_url;
+       strcmp(repos_root_url, wc_repos_root_URL) != 0))
+    root_str = repos_root_url;
 
-  if (node->path_in_repos)
-    path_str = node->path_in_repos;
+  if (repos_relpath)
+    path_str = repos_relpath;
 
   return apr_psprintf(pool, "(%s) %s@%ld",
-                      svn_cl__node_kind_str_human_readable(node->node_kind),
+                      svn_cl__node_kind_str_human_readable(node_kind),
                       svn_path_url_add_component2(root_str, path_str, pool),
-                      node->peg_rev);
+                      peg_rev);
 }
 
 svn_error_t *

Modified: subversion/branches/move-tracking-2/subversion/svnadmin/svnadmin.c
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/svnadmin/svnadmin.c?rev=1688213&r1=1688212&r2=1688213&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/svnadmin/svnadmin.c (original)
+++ subversion/branches/move-tracking-2/subversion/svnadmin/svnadmin.c Mon Jun 29 13:42:10 2015
@@ -864,25 +864,60 @@ err_cleanup(void *data)
   return APR_SUCCESS;
 }
 
-struct repos_notify_handler_baton {
-  /* Stream to write progress and other non-error output to. */
-  svn_stream_t *feedback_stream;
-
-  /* Suppress notifications that are neither errors nor warnings. */
-  svn_boolean_t silent_running;
-
-  /* Whether errors contained in notifications should be printed along
-     with the notification. If FALSE, any errors will only be
-     summarized. */
-  svn_boolean_t silent_errors;
+struct repos_verify_callback_baton
+{
+  /* Should we continue after receiving a first verification error? */
+  svn_boolean_t keep_going;
 
   /* List of errors encountered during 'svnadmin verify --keep-going'. */
   apr_array_header_t *error_summary;
 
-  /* Pool for data collected during notifications. */
+  /* Pool for data collected during callback invocations. */
   apr_pool_t *result_pool;
 };
 
+/* Implementation of svn_repos_verify_callback_t to handle errors coming
+   from svn_repos_verify_fs3(). */
+static svn_error_t *
+repos_verify_callback(void *baton,
+                      svn_revnum_t revision,
+                      svn_error_t *verify_err,
+                      apr_pool_t *scratch_pool)
+{
+  struct repos_verify_callback_baton *b = baton;
+
+  if (revision == SVN_INVALID_REVNUM)
+    {
+      SVN_ERR(svn_cmdline_fputs(_("* Error verifying repository metadata.\n"),
+                                stderr, scratch_pool));
+    }
+  else
+    {
+      SVN_ERR(svn_cmdline_fprintf(stderr, scratch_pool,
+                                  _("* Error verifying revision %ld.\n"),
+                                  revision));
+    }
+
+  if (b->keep_going)
+    {
+      struct verification_error *verr;
+
+      svn_handle_error2(verify_err, stderr, FALSE, "svnadmin: ");
+
+      /* Remember the error in B->ERROR_SUMMARY. */
+      verr = apr_palloc(b->result_pool, sizeof(*verr));
+      verr->rev = revision;
+      verr->err = svn_error_dup(verify_err);
+      apr_pool_cleanup_register(b->result_pool, verr->err, err_cleanup,
+                                apr_pool_cleanup_null);
+      APR_ARRAY_PUSH(b->error_summary, struct verification_error *) = verr;
+
+      return SVN_NO_ERROR;
+    }
+  else
+    return svn_error_trace(svn_error_dup(verify_err));
+}
+
 /* Implementation of svn_repos_notify_func_t to wrap the output to a
    response stream for svn_repos_dump_fs2(), svn_repos_verify_fs(),
    svn_repos_hotcopy3() and others. */
@@ -891,16 +926,7 @@ repos_notify_handler(void *baton,
                      const svn_repos_notify_t *notify,
                      apr_pool_t *scratch_pool)
 {
-  struct repos_notify_handler_baton *b = baton;
-  svn_stream_t *feedback_stream = b->feedback_stream;
-
-  /* Don't print anything if the feedback stream isn't provided.
-     Only print errors and warnings in silent mode. */
-  if (!feedback_stream
-      || (b->silent_running
-          && notify->action != svn_repos_notify_warning
-          && notify->action != svn_repos_notify_failure))
-    return;
+  svn_stream_t *feedback_stream = baton;
 
   switch (notify->action)
   {
@@ -910,32 +936,6 @@ repos_notify_handler(void *baton,
                                         notify->warning_str));
       return;
 
-    case svn_repos_notify_failure:
-      if (notify->revision != SVN_INVALID_REVNUM)
-        svn_error_clear(svn_stream_printf(feedback_stream, scratch_pool,
-                                    _("* Error verifying revision %ld.\n"),
-                                    notify->revision));
-      if (notify->err)
-        {
-          if (!b->silent_errors)
-            svn_handle_error2(notify->err, stderr, FALSE /* non-fatal */,
-                              "svnadmin: ");
-
-          if (b->error_summary && notify->revision != SVN_INVALID_REVNUM)
-            {
-              struct verification_error *verr;
-
-              verr = apr_palloc(b->result_pool, sizeof(*verr));
-              verr->rev = notify->revision;
-              verr->err = svn_error_dup(notify->err);
-              apr_pool_cleanup_register(b->result_pool, verr->err, err_cleanup,
-                                        apr_pool_cleanup_null);
-              APR_ARRAY_PUSH(b->error_summary,
-                             struct verification_error *) = verr;
-            }
-        }
-      return;
-
     case svn_repos_notify_dump_rev_end:
       svn_error_clear(svn_stream_printf(feedback_stream, scratch_pool,
                                         _("* Dumped revision %ld.\n"),
@@ -1183,7 +1183,7 @@ subcommand_dump(apr_getopt_t *os, void *
   svn_stream_t *stdout_stream;
   svn_revnum_t lower = SVN_INVALID_REVNUM, upper = SVN_INVALID_REVNUM;
   svn_revnum_t youngest;
-  struct repos_notify_handler_baton notify_baton = { 0 };
+  svn_stream_t *feedback_stream = NULL;
 
   /* Expect no more arguments. */
   SVN_ERR(parse_args(NULL, os, 0, 0, pool));
@@ -1217,12 +1217,12 @@ subcommand_dump(apr_getopt_t *os, void *
 
   /* Progress feedback goes to STDERR, unless they asked to suppress it. */
   if (! opt_state->quiet)
-    notify_baton.feedback_stream = recode_stream_create(stderr, pool);
+    feedback_stream = recode_stream_create(stderr, pool);
 
   SVN_ERR(svn_repos_dump_fs3(repos, stdout_stream, lower, upper,
                              opt_state->incremental, opt_state->use_deltas,
                              !opt_state->quiet ? repos_notify_handler : NULL,
-                             &notify_baton, check_cancel, NULL, pool));
+                             feedback_stream, check_cancel, NULL, pool));
 
   return SVN_NO_ERROR;
 }
@@ -1372,7 +1372,7 @@ subcommand_load(apr_getopt_t *os, void *
   svn_repos_t *repos;
   svn_revnum_t lower = SVN_INVALID_REVNUM, upper = SVN_INVALID_REVNUM;
   svn_stream_t *stdin_stream;
-  struct repos_notify_handler_baton notify_baton = { 0 };
+  svn_stream_t *feedback_stream = NULL;
 
   /* Expect no more arguments. */
   SVN_ERR(parse_args(NULL, os, 0, 0, pool));
@@ -1406,7 +1406,7 @@ subcommand_load(apr_getopt_t *os, void *
 
   /* Progress feedback goes to STDOUT, unless they asked to suppress it. */
   if (! opt_state->quiet)
-    notify_baton.feedback_stream = recode_stream_create(stdout, pool);
+    feedback_stream = recode_stream_create(stdout, pool);
 
   err = svn_repos_load_fs5(repos, stdin_stream, lower, upper,
                            opt_state->uuid_action, opt_state->parent_dir,
@@ -1415,7 +1415,7 @@ subcommand_load(apr_getopt_t *os, void *
                            !opt_state->bypass_prop_validation,
                            opt_state->ignore_dates,
                            opt_state->quiet ? NULL : repos_notify_handler,
-                           &notify_baton, check_cancel, NULL, pool);
+                           feedback_stream, check_cancel, NULL, pool);
   if (err && err->apr_err == SVN_ERR_BAD_PROPERTY_VALUE)
     return svn_error_quick_wrap(err,
                                 _("Invalid property value found in "
@@ -1462,12 +1462,12 @@ subcommand_recover(apr_getopt_t *os, voi
   svn_repos_t *repos;
   svn_error_t *err;
   struct svnadmin_opt_state *opt_state = baton;
-  struct repos_notify_handler_baton notify_baton = { 0 };
+  svn_stream_t *feedback_stream = NULL;
 
   /* Expect no more arguments. */
   SVN_ERR(parse_args(NULL, os, 0, 0, pool));
 
-  SVN_ERR(svn_stream_for_stdout(&notify_baton.feedback_stream, pool));
+  SVN_ERR(svn_stream_for_stdout(&feedback_stream, pool));
 
   /* Restore default signal handlers until after we have acquired the
    * exclusive lock so that the user interrupt before we actually
@@ -1475,7 +1475,7 @@ subcommand_recover(apr_getopt_t *os, voi
   setup_cancellation_signals(SIG_DFL);
 
   err = svn_repos_recover4(opt_state->repository_path, TRUE,
-                           repos_notify_handler, &notify_baton,
+                           repos_notify_handler, feedback_stream,
                            check_cancel, NULL, pool);
   if (err)
     {
@@ -1493,7 +1493,7 @@ subcommand_recover(apr_getopt_t *os, voi
                                    " another process has it open?\n")));
       SVN_ERR(svn_cmdline_fflush(stdout));
       SVN_ERR(svn_repos_recover4(opt_state->repository_path, FALSE,
-                                 repos_notify_handler, &notify_baton,
+                                 repos_notify_handler, feedback_stream,
                                  check_cancel, NULL, pool));
     }
 
@@ -1779,7 +1779,7 @@ subcommand_pack(apr_getopt_t *os, void *
 {
   struct svnadmin_opt_state *opt_state = baton;
   svn_repos_t *repos;
-  struct repos_notify_handler_baton notify_baton = { 0 };
+  svn_stream_t *feedback_stream = NULL;
 
   /* Expect no more arguments. */
   SVN_ERR(parse_args(NULL, os, 0, 0, pool));
@@ -1788,11 +1788,11 @@ subcommand_pack(apr_getopt_t *os, void *
 
   /* Progress feedback goes to STDOUT, unless they asked to suppress it. */
   if (! opt_state->quiet)
-    notify_baton.feedback_stream = recode_stream_create(stdout, pool);
+    feedback_stream = recode_stream_create(stdout, pool);
 
   return svn_error_trace(
     svn_repos_fs_pack2(repos, !opt_state->quiet ? repos_notify_handler : NULL,
-                       &notify_baton, check_cancel, NULL, pool));
+                       feedback_stream, check_cancel, NULL, pool));
 }
 
 
@@ -1804,10 +1804,8 @@ subcommand_verify(apr_getopt_t *os, void
   svn_repos_t *repos;
   svn_fs_t *fs;
   svn_revnum_t youngest, lower, upper;
-  struct repos_notify_handler_baton notify_baton = { 0 };
-  struct repos_notify_handler_baton *notify_baton_p = &notify_baton;
-  svn_repos_notify_func_t notify_func = repos_notify_handler;
-  svn_error_t *verify_err;
+  svn_stream_t *feedback_stream = NULL;
+  struct repos_verify_callback_baton verify_baton = { 0 };
 
   /* Expect no more arguments. */
   SVN_ERR(parse_args(NULL, os, 0, 0, pool));
@@ -1851,42 +1849,27 @@ subcommand_verify(apr_getopt_t *os, void
       upper = lower;
     }
 
-  /* Set up the notification handler. */
-  if (!opt_state->quiet || opt_state->keep_going)
-    {
-      if (opt_state->quiet)
-        {
-          notify_baton.silent_running = TRUE;
-          notify_baton.feedback_stream = recode_stream_create(stderr, pool);
-        }
-      else
-        notify_baton.feedback_stream = recode_stream_create(stdout, pool);
+  if (!opt_state->quiet)
+    feedback_stream = recode_stream_create(stdout, pool);
 
-      if (opt_state->keep_going)
-        notify_baton.error_summary =
-          apr_array_make(pool, 0, sizeof(struct verification_error *));
-      else
-        notify_baton.silent_errors = TRUE;
-
-      notify_baton.result_pool = pool;
-    }
-  else
-    {
-      notify_func = NULL;
-      notify_baton_p = NULL;
-    }
-
-  verify_err = svn_repos_verify_fs3(repos, lower, upper,
-                                    opt_state->keep_going,
-                                    opt_state->check_normalization,
-                                    opt_state->metadata_only,
-                                    notify_func, notify_baton_p,
-                                    check_cancel, NULL, pool);
+  verify_baton.keep_going = opt_state->keep_going;
+  verify_baton.error_summary =
+    apr_array_make(pool, 0, sizeof(struct verification_error *));
+  verify_baton.result_pool = pool;
+
+  SVN_ERR(svn_repos_verify_fs3(repos, lower, upper,
+                               opt_state->check_normalization,
+                               opt_state->metadata_only,
+                               !opt_state->quiet
+                                 ? repos_notify_handler : NULL,
+                               feedback_stream,
+                               repos_verify_callback, &verify_baton,
+                               check_cancel, NULL, pool));
 
   /* Show the --keep-going error summary. */
   if (!opt_state->quiet
       && opt_state->keep_going
-      && notify_baton.error_summary->nelts > 0)
+      && verify_baton.error_summary->nelts > 0)
     {
       int rev_maxlength;
       svn_revnum_t end_revnum;
@@ -1894,15 +1877,15 @@ subcommand_verify(apr_getopt_t *os, void
       int i;
 
       svn_error_clear(
-        svn_stream_puts(notify_baton.feedback_stream,
+        svn_stream_puts(feedback_stream,
                           _("\n-----Summary of corrupt revisions-----\n")));
 
       /* The standard column width for the revision number is 6 characters.
          If the revision number can potentially be larger (i.e. if end_revnum
          is larger than 1000000), we increase the column width as needed. */
       rev_maxlength = 6;
-      end_revnum = APR_ARRAY_IDX(notify_baton.error_summary,
-                                 notify_baton.error_summary->nelts - 1,
+      end_revnum = APR_ARRAY_IDX(verify_baton.error_summary,
+                                 verify_baton.error_summary->nelts - 1,
                                  struct verification_error *)->rev;
       while (end_revnum >= 1000000)
         {
@@ -1911,7 +1894,7 @@ subcommand_verify(apr_getopt_t *os, void
         }
 
       iterpool = svn_pool_create(pool);
-      for (i = 0; i < notify_baton.error_summary->nelts; i++)
+      for (i = 0; i < verify_baton.error_summary->nelts; i++)
         {
           struct verification_error *verr;
           svn_error_t *err;
@@ -1919,29 +1902,40 @@ subcommand_verify(apr_getopt_t *os, void
 
           svn_pool_clear(iterpool);
 
-          verr = APR_ARRAY_IDX(notify_baton.error_summary, i,
+          verr = APR_ARRAY_IDX(verify_baton.error_summary, i,
                                struct verification_error *);
-          rev_str = apr_psprintf(iterpool, "r%ld", verr->rev);
-          rev_str = apr_psprintf(iterpool, "%*s", rev_maxlength, rev_str);
-          for (err = svn_error_purge_tracing(verr->err);
-               err != SVN_NO_ERROR; err = err->child)
-            {
-              char buf[512];
-              const char *message;
 
-              message = svn_err_best_message(err, buf, sizeof(buf));
-              svn_error_clear(svn_stream_printf(notify_baton.feedback_stream,
-                                                iterpool,
-                                                "%s: E%06d: %s\n",
-                                                rev_str, err->apr_err,
-                                                message));
+          if (verr->rev != SVN_INVALID_REVNUM)
+            {
+              rev_str = apr_psprintf(iterpool, "r%ld", verr->rev);
+              rev_str = apr_psprintf(iterpool, "%*s", rev_maxlength, rev_str);
+              for (err = svn_error_purge_tracing(verr->err);
+                   err != SVN_NO_ERROR; err = err->child)
+                {
+                  char buf[512];
+                  const char *message;
+
+                  message = svn_err_best_message(err, buf, sizeof(buf));
+                  svn_error_clear(svn_stream_printf(feedback_stream, iterpool,
+                                                    "%s: E%06d: %s\n",
+                                                    rev_str, err->apr_err,
+                                                    message));
+                }
             }
         }
 
        svn_pool_destroy(iterpool);
     }
 
-  return svn_error_trace(verify_err);
+  if (verify_baton.error_summary->nelts > 0)
+    {
+      return svn_error_createf(SVN_ERR_CL_REPOS_VERIFY_FAILED, NULL,
+                               _("Failed to verify repository '%s'"),
+                               svn_dirent_local_style(
+                                 opt_state->repository_path, pool));
+    }
+
+  return SVN_NO_ERROR;
 }
 
 /* This implements `svn_opt_subcommand_t'. */
@@ -1949,7 +1943,7 @@ svn_error_t *
 subcommand_hotcopy(apr_getopt_t *os, void *baton, apr_pool_t *pool)
 {
   struct svnadmin_opt_state *opt_state = baton;
-  struct repos_notify_handler_baton notify_baton = { 0 };
+  svn_stream_t *feedback_stream = NULL;
   apr_array_header_t *targets;
   const char *new_repos_path;
 
@@ -1960,12 +1954,12 @@ subcommand_hotcopy(apr_getopt_t *os, voi
 
   /* Progress feedback goes to STDOUT, unless they asked to suppress it. */
   if (! opt_state->quiet)
-    notify_baton.feedback_stream = recode_stream_create(stdout, pool);
+    feedback_stream = recode_stream_create(stdout, pool);
 
   return svn_repos_hotcopy3(opt_state->repository_path, new_repos_path,
                             opt_state->clean_logs, opt_state->incremental,
                             !opt_state->quiet ? repos_notify_handler : NULL,
-                            &notify_baton, check_cancel, NULL, pool);
+                            feedback_stream, check_cancel, NULL, pool);
 }
 
 svn_error_t *
@@ -2349,18 +2343,18 @@ subcommand_upgrade(apr_getopt_t *os, voi
 {
   svn_error_t *err;
   struct svnadmin_opt_state *opt_state = baton;
-  struct repos_notify_handler_baton notify_baton = { 0 };
+  svn_stream_t *feedback_stream = NULL;
 
   /* Expect no more arguments. */
   SVN_ERR(parse_args(NULL, os, 0, 0, pool));
 
-  SVN_ERR(svn_stream_for_stdout(&notify_baton.feedback_stream, pool));
+  SVN_ERR(svn_stream_for_stdout(&feedback_stream, pool));
 
   /* Restore default signal handlers. */
   setup_cancellation_signals(SIG_DFL);
 
   err = svn_repos_upgrade2(opt_state->repository_path, TRUE,
-                           repos_notify_handler, &notify_baton, pool);
+                           repos_notify_handler, feedback_stream, pool);
   if (err)
     {
       if (APR_STATUS_IS_EAGAIN(err->apr_err))
@@ -2378,7 +2372,7 @@ subcommand_upgrade(apr_getopt_t *os, voi
                                        " another process has it open?\n")));
           SVN_ERR(svn_cmdline_fflush(stdout));
           SVN_ERR(svn_repos_upgrade2(opt_state->repository_path, FALSE,
-                                     repos_notify_handler, &notify_baton,
+                                     repos_notify_handler, feedback_stream,
                                      pool));
         }
       else if (err->apr_err == SVN_ERR_FS_UNSUPPORTED_UPGRADE)

Modified: subversion/branches/move-tracking-2/subversion/tests/cmdline/merge_tree_conflict_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/tests/cmdline/merge_tree_conflict_tests.py?rev=1688213&r1=1688212&r2=1688213&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/tests/cmdline/merge_tree_conflict_tests.py (original)
+++ subversion/branches/move-tracking-2/subversion/tests/cmdline/merge_tree_conflict_tests.py Mon Jun 29 13:42:10 2015
@@ -2012,9 +2012,7 @@ def merge_conflict_details(sbox):
   expected_info = [
     {
       "Path" : re.escape(sbox.ospath('B')),
-
-      "Conflict Properties File" :
-            re.escape(sbox.ospath('B/dir_conflicts.prej')) + '.*',
+      "Conflicted Properties" : "key",
       "Conflict Details": re.escape(
             'incoming dir edit upon merge' +
             ' Source  left: (dir) ^/A/B@1' +

Modified: subversion/branches/move-tracking-2/subversion/tests/cmdline/mergeinfo_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/tests/cmdline/mergeinfo_tests.py?rev=1688213&r1=1688212&r2=1688213&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/tests/cmdline/mergeinfo_tests.py (original)
+++ subversion/branches/move-tracking-2/subversion/tests/cmdline/mergeinfo_tests.py Mon Jun 29 13:42:10 2015
@@ -786,6 +786,166 @@ def mergeinfo_local_move(sbox):
                                      'mergeinfo', sbox.repo_url + '/A',
                                      sbox.ospath('A2'))
 
+@SkipUnless(server_has_mergeinfo)
+@Issue(4582)
+def no_mergeinfo_on_tree_conflict_victim(sbox):
+  "do not record mergeinfo on tree conflict victims"
+  sbox.build()
+
+  # Create a branch of A called A_copy
+  sbox.simple_copy('A', 'A_copy')
+  sbox.simple_commit()
+
+  # Add a new directory and file on both branches
+  sbox.simple_mkdir('A/dir')
+  sbox.simple_add_text('new file', 'A/dir/f')
+  sbox.simple_commit()
+
+  sbox.simple_mkdir('A_copy/dir')
+  sbox.simple_add_text('new file', 'A_copy/dir/f')
+  sbox.simple_commit()
+
+  # Run a merge from A to A_copy
+  expected_output = wc.State(sbox.ospath('A_copy'), {
+    'dir'               : Item(status='  ', treeconflict='C'),
+    'dir/f'             : Item(status='  ', treeconflict='A'),
+    })
+  expected_mergeinfo_output = wc.State(sbox.ospath('A_copy'), {
+    '' : Item(status=' U'),
+    })
+  expected_elision_output = wc.State(sbox.ospath('A_copy'), {
+    })
+
+  expected_disk = svntest.wc.State('', {
+    'C'                 : Item(),
+    'B/E/beta'          : Item(contents="This is the file 'beta'.\n"),
+    'B/E/alpha'         : Item(contents="This is the file 'alpha'.\n"),
+    'B/lambda'          : Item(contents="This is the file 'lambda'.\n"),
+    'B/F'               : Item(),
+    'D/H/omega'         : Item(contents="This is the file 'omega'.\n"),
+    'D/H/psi'           : Item(contents="This is the file 'psi'.\n"),
+    'D/H/chi'           : Item(contents="This is the file 'chi'.\n"),
+    'D/G/tau'           : Item(contents="This is the file 'tau'.\n"),
+    'D/G/pi'            : Item(contents="This is the file 'pi'.\n"),
+    'D/G/rho'           : Item(contents="This is the file 'rho'.\n"),
+    'D/gamma'           : Item(contents="This is the file 'gamma'.\n"),
+    'dir/f'             : Item(contents="new file"),
+    'mu'                : Item(contents="This is the file 'mu'.\n"),
+    })
+
+  # The merge will create an add vs add tree conflict on A_copy/dir
+  expected_status = svntest.wc.State(sbox.ospath('A_copy'), {
+    ''                  : Item(status=' M', wc_rev='4'),
+    'D'                 : Item(status='  ', wc_rev='4'),
+    'D/G'               : Item(status='  ', wc_rev='4'),
+    'D/G/pi'            : Item(status='  ', wc_rev='4'),
+    'D/G/rho'           : Item(status='  ', wc_rev='4'),
+    'D/G/tau'           : Item(status='  ', wc_rev='4'),
+    'D/H'               : Item(status='  ', wc_rev='4'),
+    'D/H/psi'           : Item(status='  ', wc_rev='4'),
+    'D/H/omega'         : Item(status='  ', wc_rev='4'),
+    'D/H/chi'           : Item(status='  ', wc_rev='4'),
+    'D/gamma'           : Item(status='  ', wc_rev='4'),
+    'B'                 : Item(status='  ', wc_rev='4'),
+    'B/F'               : Item(status='  ', wc_rev='4'),
+    'B/E'               : Item(status='  ', wc_rev='4'),
+    'B/E/alpha'         : Item(status='  ', wc_rev='4'),
+    'B/E/beta'          : Item(status='  ', wc_rev='4'),
+    'B/lambda'          : Item(status='  ', wc_rev='4'),
+    'C'                 : Item(status='  ', wc_rev='4'),
+    'dir'               : Item(status='  ', treeconflict='C', wc_rev='4'),
+    'dir/f'             : Item(status='  ', wc_rev='4'),
+    'mu'                : Item(status='  ', wc_rev='4'),
+    })
+
+  expected_skip = wc.State('', { })
+
+  sbox.simple_update('A_copy')
+  svntest.actions.run_and_verify_merge(sbox.ospath('A_copy'),
+                                       None, None, # rev1, rev2
+                                       '^/A',
+                                       None, # URL2
+                                       expected_output,
+                                       expected_mergeinfo_output,
+                                       expected_elision_output,
+                                       expected_disk,
+                                       expected_status,
+                                       expected_skip)
+
+  # Resolve the tree conflict by accepting the working copy state left
+  # behind by the merge. This preserves the line of history of A_copy/dir,
+  # which originated on the branch 'A_copy', rather than replacing it with
+  # Jthe line f history of A/dir which originated on branch 'A'
+  svntest.actions.run_and_verify_resolve([sbox.ospath('A_copy/dir')],
+                                         '--accept', 'working',
+                                         sbox.ospath('A_copy/dir'))
+  sbox.simple_commit('A_copy')
+
+  # Now try to merge the 'A_copy' branch back to 'A"
+  expected_output = wc.State(sbox.ospath('A'), {
+    'dir'               : Item(status='R '), # changes line of history of A/dir
+    'dir/f'             : Item(status='A '),
+    })
+  expected_mergeinfo_output = wc.State(sbox.ospath('A'), {
+    ''                  : Item(status=' U'),
+    })
+  expected_elision_output = wc.State(sbox.ospath('A'), {
+    })
+
+  expected_disk = svntest.wc.State('', {
+    'C'                 : Item(),
+    'B/E/beta'          : Item(contents="This is the file 'beta'.\n"),
+    'B/E/alpha'         : Item(contents="This is the file 'alpha'.\n"),
+    'B/F'               : Item(),
+    'B/lambda'          : Item(contents="This is the file 'lambda'.\n"),
+    'D/H/omega'         : Item(contents="This is the file 'omega'.\n"),
+    'D/H/psi'           : Item(contents="This is the file 'psi'.\n"),
+    'D/H/chi'           : Item(contents="This is the file 'chi'.\n"),
+    'D/G/tau'           : Item(contents="This is the file 'tau'.\n"),
+    'D/G/pi'            : Item(contents="This is the file 'pi'.\n"),
+    'D/G/rho'           : Item(contents="This is the file 'rho'.\n"),
+    'D/gamma'           : Item(contents="This is the file 'gamma'.\n"),
+    'dir/f'             : Item(contents="new file"),
+    'mu'                : Item(contents="This is the file 'mu'.\n"),
+    })
+
+  expected_status = svntest.wc.State(sbox.ospath('A'), {
+    ''                  : Item(status=' M', wc_rev='5'),
+    'dir'               : Item(status='R ', copied='+', wc_rev='-'),
+    'dir/f'             : Item(status='  ', copied='+', wc_rev='-'),
+    'D'                 : Item(status='  ', wc_rev='5'),
+    'D/H'               : Item(status='  ', wc_rev='5'),
+    'D/H/chi'           : Item(status='  ', wc_rev='5'),
+    'D/H/omega'         : Item(status='  ', wc_rev='5'),
+    'D/H/psi'           : Item(status='  ', wc_rev='5'),
+    'D/G'               : Item(status='  ', wc_rev='5'),
+    'D/G/pi'            : Item(status='  ', wc_rev='5'),
+    'D/G/rho'           : Item(status='  ', wc_rev='5'),
+    'D/G/tau'           : Item(status='  ', wc_rev='5'),
+    'D/gamma'           : Item(status='  ', wc_rev='5'),
+    'B'                 : Item(status='  ', wc_rev='5'),
+    'B/E'               : Item(status='  ', wc_rev='5'),
+    'B/E/beta'          : Item(status='  ', wc_rev='5'),
+    'B/E/alpha'         : Item(status='  ', wc_rev='5'),
+    'B/lambda'          : Item(status='  ', wc_rev='5'),
+    'B/F'               : Item(status='  ', wc_rev='5'),
+    'mu'                : Item(status='  ', wc_rev='5'),
+    'C'                 : Item(status='  ', wc_rev='5'),
+    })
+
+  expected_skip = wc.State('', { })
+  sbox.simple_update('A')
+  svntest.actions.run_and_verify_merge(sbox.ospath('A'),
+                                       None, None, # rev1, rev2
+                                       '^/A_copy',
+                                       None, # URL2
+                                       expected_output,
+                                       expected_mergeinfo_output,
+                                       expected_elision_output,
+                                       expected_disk,
+                                       expected_status,
+                                       expected_skip)
+  sbox.simple_commit('A')
 
 ########################################################################
 # Run the tests
@@ -806,6 +966,7 @@ test_list = [ None,
               natural_history_is_not_eligible_nor_merged,
               noninheritable_mergeinfo_not_always_eligible,
               mergeinfo_local_move,
+              no_mergeinfo_on_tree_conflict_victim,
              ]
 
 if __name__ == '__main__':

Modified: subversion/branches/move-tracking-2/subversion/tests/cmdline/move_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/tests/cmdline/move_tests.py?rev=1688213&r1=1688212&r2=1688213&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/tests/cmdline/move_tests.py (original)
+++ subversion/branches/move-tracking-2/subversion/tests/cmdline/move_tests.py Mon Jun 29 13:42:10 2015
@@ -1619,9 +1619,7 @@ def move_conflict_details(sbox):
   expected_info = [
     {
       "Path" : re.escape(sbox.ospath('B')),
-
-      "Conflict Properties File" :
-            re.escape(sbox.ospath('B/dir_conflicts.prej')) + '.*',
+      "Conflicted Properties" : "key",
       "Conflict Details": re.escape(
             'incoming dir edit upon update' +
             ' Source  left: (dir) ^/A/B@1' +

Modified: subversion/branches/move-tracking-2/subversion/tests/cmdline/prop_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/tests/cmdline/prop_tests.py?rev=1688213&r1=1688212&r2=1688213&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/tests/cmdline/prop_tests.py (original)
+++ subversion/branches/move-tracking-2/subversion/tests/cmdline/prop_tests.py Mon Jun 29 13:42:10 2015
@@ -2740,11 +2740,8 @@ def dir_prop_conflict_details(sbox):
                                         None,
                                         expected_status,
                                         check_props=True)
-
-  # The conflict properties file line was shown for previous versions, but the
-  # conflict source urls are new since 1.8.
   expected_info = {
-    'Conflict Properties File' : re.escape(sbox.ospath('A/dir_conflicts.prej')),
+    'Conflicted Properties' : 'my-prop',
     'Conflict Details': re.escape('incoming dir edit upon update'
                                            + ' Source  left: (dir) ^/A@1'
                                            + ' Source right: (dir) ^/A@2')

Modified: subversion/branches/move-tracking-2/subversion/tests/cmdline/svnadmin_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/tests/cmdline/svnadmin_tests.py?rev=1688213&r1=1688212&r2=1688213&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/tests/cmdline/svnadmin_tests.py (original)
+++ subversion/branches/move-tracking-2/subversion/tests/cmdline/svnadmin_tests.py Mon Jun 29 13:42:10 2015
@@ -2070,8 +2070,6 @@ def verify_keep_going(sbox):
 
   exp_out = svntest.verify.RegexListOutput([".*Verified revision 0.",
                                             ".*Verified revision 1.",
-                                            ".*Error verifying revision 2.",
-                                            ".*Error verifying revision 3.",
                                             ".*",
                                             ".*Summary.*",
                                             ".*r2: E160004:.*",
@@ -2082,8 +2080,18 @@ def verify_keep_going(sbox):
   if (svntest.main.fs_has_rep_sharing()):
     exp_out.insert(0, ".*Verifying.*metadata.*")
 
-  exp_err = svntest.verify.RegexListOutput(["svnadmin: E160004:.*",
-                                            "svnadmin: E165011:.*"], False)
+  exp_err = svntest.verify.RegexListOutput([".*Error verifying revision 2.",
+                                            "svnadmin: E160004:.*",
+                                            "svnadmin: E160004:.*",
+                                            ".*Error verifying revision 3.",
+                                            "svnadmin: E160004:.*",
+                                            "svnadmin: E160004:.*",
+                                            "svnadmin: E205012:.*"], False)
+
+  if (svntest.main.is_fs_log_addressing()):
+    exp_err.insert(0, ".*Error verifying repository metadata.")
+    exp_err.insert(1, "svnadmin: E160004:.*")
+
   if svntest.verify.verify_outputs("Unexpected error while running 'svnadmin verify'.",
                                    output, errput, exp_out, exp_err):
     raise svntest.Failure
@@ -2095,12 +2103,19 @@ def verify_keep_going(sbox):
     exp_out = svntest.verify.RegexListOutput([".*Verifying metadata at revision 0"])
   else:
     exp_out = svntest.verify.RegexListOutput([".*Verified revision 0.",
-                                             ".*Verified revision 1.",
-                                             ".*Error verifying revision 2."])
+                                              ".*Verified revision 1."])
     if (svntest.main.fs_has_rep_sharing()):
       exp_out.insert(0, ".*Verifying repository metadata.*")
 
-  exp_err = svntest.verify.RegexListOutput(["svnadmin: E160004:.*"], False)
+  if (svntest.main.is_fs_log_addressing()):
+    exp_err = svntest.verify.RegexListOutput([
+                                     ".*Error verifying repository metadata.",
+                                     "svnadmin: E160004:.*"], False)
+  else:
+    exp_err = svntest.verify.RegexListOutput([".*Error verifying revision 2.",
+                                              "svnadmin: E160004:.*",
+                                              "svnadmin: E160004:.*"], False)
+
   if svntest.verify.verify_outputs("Unexpected error while running 'svnadmin verify'.",
                                    output, errput, exp_out, exp_err):
     raise svntest.Failure
@@ -2110,8 +2125,17 @@ def verify_keep_going(sbox):
                                                         "--quiet",
                                                         sbox.repo_dir)
 
+  if (svntest.main.is_fs_log_addressing()):
+    exp_err = svntest.verify.RegexListOutput([
+                                      ".*Error verifying repository metadata.",
+                                      "svnadmin: E160004:.*"], False)
+  else:
+    exp_err = svntest.verify.RegexListOutput([".*Error verifying revision 2.",
+                                              "svnadmin: E160004:.*",
+                                              "svnadmin: E160004:.*"], False)
+
   if svntest.verify.verify_outputs("Output of 'svnadmin verify' is unexpected.",
-                                   None, errput, None, "svnadmin: E160004:.*"):
+                                   None, errput, None, exp_err):
     raise svntest.Failure
 
   # Don't leave a corrupt repository
@@ -2152,11 +2176,12 @@ def verify_keep_going_quiet(sbox):
                                             ".*Error verifying revision 3.",
                                             "svnadmin: E160004:.*",
                                             "svnadmin: E160004:.*",
-                                            "svnadmin: E165011:.*"], False)
+                                            "svnadmin: E205012:.*"], False)
 
   # Insert another expected error from checksum verification
   if (svntest.main.is_fs_log_addressing()):
-    exp_err.insert(0, "svnadmin: E160004:.*")
+    exp_err.insert(0, ".*Error verifying repository metadata.")
+    exp_err.insert(1, "svnadmin: E160004:.*")
 
   if svntest.verify.verify_outputs(
           "Unexpected error while running 'svnadmin verify'.",
@@ -2231,23 +2256,15 @@ def verify_invalid_path_changes(sbox):
 
   exp_out = svntest.verify.RegexListOutput([".*Verified revision 0.",
                                            ".*Verified revision 1.",
-                                           ".*Error verifying revision 2.",
                                            ".*Verified revision 3.",
-                                           ".*Error verifying revision 4.",
                                            ".*Verified revision 5.",
-                                           ".*Error verifying revision 6.",
                                            ".*Verified revision 7.",
                                            ".*Verified revision 8.",
                                            ".*Verified revision 9.",
-                                           ".*Error verifying revision 10.",
                                            ".*Verified revision 11.",
-                                           ".*Error verifying revision 12.",
                                            ".*Verified revision 13.",
-                                           ".*Error verifying revision 14.",
                                            ".*Verified revision 15.",
-                                           ".*Error verifying revision 16.",
                                            ".*Verified revision 17.",
-                                           ".*Error verifying revision 18.",
                                            ".*Verified revision 19.",
                                            ".*",
                                            ".*Summary.*",
@@ -2271,9 +2288,30 @@ def verify_invalid_path_changes(sbox):
     if svntest.main.is_fs_log_addressing():
       exp_out.insert(1, ".*Verifying.*metadata.*")
 
-  exp_err = svntest.verify.RegexListOutput(["svnadmin: E160020:.*",
+  exp_err = svntest.verify.RegexListOutput([".*Error verifying revision 2.",
+                                            "svnadmin: E160020:.*",
+                                            "svnadmin: E160020:.*",
+                                            ".*Error verifying revision 4.",
+                                            "svnadmin: E160013:.*",
+                                            ".*Error verifying revision 6.",
+                                            "svnadmin: E160013:.*",
+                                            "svnadmin: E160013:.*",
+                                            ".*Error verifying revision 10.",
+                                            "svnadmin: E160013:.*",
+                                            "svnadmin: E160013:.*",
+                                            ".*Error verifying revision 12.",
+                                            "svnadmin: E145001:.*",
+                                            "svnadmin: E145001:.*",
+                                            ".*Error verifying revision 14.",
+                                            "svnadmin: E160013:.*",
+                                            "svnadmin: E160013:.*",
+                                            ".*Error verifying revision 16.",
                                             "svnadmin: E145001:.*",
-                                            "svnadmin: E160013:.*"], False)
+                                            "svnadmin: E145001:.*",
+                                            ".*Error verifying revision 18.",
+                                            "svnadmin: E160013:.*",
+                                            "svnadmin: E160013:.*",
+                                            "svnadmin: E205012:.*"], False)
 
 
   if svntest.verify.verify_outputs("Unexpected error while running 'svnadmin verify'.",
@@ -2284,9 +2322,10 @@ def verify_invalid_path_changes(sbox):
                                                         sbox.repo_dir)
 
   exp_out = svntest.verify.RegexListOutput([".*Verified revision 0.",
-                                            ".*Verified revision 1.",
-                                            ".*Error verifying revision 2."])
-  exp_err = svntest.verify.RegexListOutput(["svnadmin: E160020:.*"], False)
+                                            ".*Verified revision 1."])
+  exp_err = svntest.verify.RegexListOutput([".*Error verifying revision 2.",
+                                            "svnadmin: E160020:.*",
+                                            "svnadmin: E160020:.*"], False)
 
   if (svntest.main.fs_has_rep_sharing()):
     exp_out.insert(0, ".*Verifying.*metadata.*")
@@ -2301,8 +2340,13 @@ def verify_invalid_path_changes(sbox):
                                                         "--quiet",
                                                         sbox.repo_dir)
 
+  exp_out = []
+  exp_err = svntest.verify.RegexListOutput([".*Error verifying revision 2.",
+                                            "svnadmin: E160020:.*",
+                                            "svnadmin: E160020:.*"], False)
+
   if svntest.verify.verify_outputs("Output of 'svnadmin verify' is unexpected.",
-                                   None, errput, None, "svnadmin: E160020:.*"):
+                                   output, errput, exp_out, exp_err):
     raise svntest.Failure
 
   # Don't leave a corrupt repository
@@ -3003,21 +3047,24 @@ def load_no_svndate_r0(sbox):
                                          'proplist', '--revprop', '-r0',
                                          sbox.repo_dir)
 
-# This is only supported for FSFS and BDB
-# The port to FSX is still pending.
-@Skip(svntest.main.is_fs_type_fsx)
+# This is only supported for FSFS
+# The port to FSX is still pending, BDB won't support it.
+@SkipUnless(svntest.main.is_fs_type_fsfs)
 def hotcopy_read_only(sbox):
   "'svnadmin hotcopy' a read-only source repository"
   sbox.build()
-  svntest.main.chmod_tree(sbox.repo_dir, 0444, 0444)
+  svntest.main.chmod_tree(sbox.repo_dir, 0, 0222)
 
   backup_dir, backup_url = sbox.add_repo_path('backup')
   exit_code, output, errput = svntest.main.run_svnadmin("hotcopy",
                                                         sbox.repo_dir,
                                                         backup_dir)
+
+  # r/o repos are hard to clean up. Make it writable again.
+  svntest.main.chmod_tree(sbox.repo_dir, 0222, 0222)
   if errput:
     logger.warn("Error: hotcopy failed")
-    raise svntest.Failure
+    raise SVNUnexpectedStderr(errput)
 
 ########################################################################
 # Run the tests

Modified: subversion/branches/move-tracking-2/subversion/tests/cmdline/svntest/main.py
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/tests/cmdline/svntest/main.py?rev=1688213&r1=1688212&r2=1688213&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/tests/cmdline/svntest/main.py (original)
+++ subversion/branches/move-tracking-2/subversion/tests/cmdline/svntest/main.py Mon Jun 29 13:42:10 2015
@@ -888,6 +888,8 @@ def youngest(repos_path):
 
 # Chmod recursively on a whole subtree
 def chmod_tree(path, mode, mask):
+  """For each node in the OS filesystem tree PATH, subtract MASK from its
+  permissions and add MODE to them."""
   for dirpath, dirs, files in os.walk(path):
     for name in dirs + files:
       fullname = os.path.join(dirpath, name)

Modified: subversion/branches/move-tracking-2/subversion/tests/cmdline/update_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/tests/cmdline/update_tests.py?rev=1688213&r1=1688212&r2=1688213&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/tests/cmdline/update_tests.py (original)
+++ subversion/branches/move-tracking-2/subversion/tests/cmdline/update_tests.py Mon Jun 29 13:42:10 2015
@@ -6623,8 +6623,7 @@ def update_conflict_details(sbox):
     {
       "Path" : re.escape(sbox.ospath('A/B')),
 
-      "Conflict Properties File" :
-            re.escape(sbox.ospath('A/B/dir_conflicts.prej')) + '.*',
+      "Conflicted Properties" : "key",
       "Conflict Details": re.escape(
             'incoming dir edit upon update' +
             ' Source  left: (dir) ^/A/B@1' +
@@ -6694,6 +6693,44 @@ def update_conflict_details(sbox):
   svntest.actions.run_and_verify_info(expected_info, sbox.ospath('A/B'),
                                       '--depth', 'infinity')
 
+# Keywords should be updated in local file even if text change is shortcut
+# (due to the local change being the same as the incoming change, for example).
+@XFail()
+def update_keywords_on_shortcut(sbox):
+  "update_keywords_on_shortcut"
+
+  sbox.build()
+  wc_dir = sbox.wc_dir
+
+  # Start with a file with keywords expanded
+  mu_path = sbox.ospath('A/mu')
+  svntest.main.file_append(mu_path, '$LastChangedRevision$\n')
+  svntest.main.run_svn(None, 'ps', 'svn:keywords', 'LastChangedRevision', mu_path)
+  sbox.simple_commit('A/mu')
+
+  # Modify the text, and commit
+  svntest.main.file_append(mu_path, 'New line.\n')
+  sbox.simple_commit('A/mu')
+
+  # Update back to the previous revision
+  sbox.simple_update('A/mu', 2)
+
+  # Make the same change again locally
+  svntest.main.file_append(mu_path, 'New line.\n')
+
+  # Update, so that merging the text change is a short-cut merge
+  text_before_up = open(sbox.ospath('A/mu'), 'r').readlines()
+  sbox.simple_update('A/mu')
+  text_after_up = open(sbox.ospath('A/mu'), 'r').readlines()
+
+  # Check the keywords have been updated
+  if not any(['$LastChangedRevision: 2 $' in line
+              for line in text_before_up]):
+    raise svntest.Failure("keyword not as expected in test set-up phase")
+  if not any(['$LastChangedRevision: 3 $' in line
+              for line in text_after_up]):
+    raise svntest.Failure("update did not update the LastChangedRevision keyword")
+
 #######################################################################
 # Run the tests
 
@@ -6780,6 +6817,7 @@ test_list = [ None,
               bump_below_tree_conflict,
               update_child_below_add,
               update_conflict_details,
+              update_keywords_on_shortcut,
              ]
 
 if __name__ == '__main__':

Modified: subversion/branches/move-tracking-2/subversion/tests/libsvn_client/mtcc-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/tests/libsvn_client/mtcc-test.c?rev=1688213&r1=1688212&r2=1688213&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/tests/libsvn_client/mtcc-test.c (original)
+++ subversion/branches/move-tracking-2/subversion/tests/libsvn_client/mtcc-test.c Mon Jun 29 13:42:10 2015
@@ -543,7 +543,8 @@ handle_rev(void *baton,
   SVN_TEST_ASSERT(apr_hash_count(rev_props) >= 3);
   SVN_TEST_STRING_ASSERT(path, (rev < 5) ? "/iota" : "/mu");
 
-  if (!hrb->first && (rev == (hrb->up ? 8 : 6)))
+  if (!hrb->first
+      && (rev == (hrb->up ? 5 : 4) || rev == (hrb->up ? 8 : 6)))
     SVN_TEST_ASSERT(delta_handler == NULL);
   else
     SVN_TEST_ASSERT(delta_handler != NULL);

Modified: subversion/branches/move-tracking-2/subversion/tests/libsvn_fs_fs/fs-fs-fuzzy-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/tests/libsvn_fs_fs/fs-fs-fuzzy-test.c?rev=1688213&r1=1688212&r2=1688213&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/tests/libsvn_fs_fs/fs-fs-fuzzy-test.c (original)
+++ subversion/branches/move-tracking-2/subversion/tests/libsvn_fs_fs/fs-fs-fuzzy-test.c Mon Jun 29 13:42:10 2015
@@ -117,8 +117,9 @@ fuzzing_1_byte_1_rev(const char *repo_na
       svn_fs_set_warning_func(svn_repos_fs(repos), dont_filter_warnings, NULL);
 
       /* This shall detect the corruption and return an error. */
-      err = svn_repos_verify_fs3(repos, revision, revision, TRUE, FALSE, FALSE,
-                                 NULL, NULL, NULL, NULL, iterpool);
+      err = svn_repos_verify_fs3(repos, revision, revision, FALSE, FALSE,
+                                 NULL, NULL, NULL, NULL, NULL, NULL,
+                                 iterpool);
 
       /* Case-only changes in checksum digests are not an error.
        * We allow upper case chars to be used in MD5 checksums in all other

Modified: subversion/branches/move-tracking-2/subversion/tests/libsvn_fs_fs/fs-fs-private-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/tests/libsvn_fs_fs/fs-fs-private-test.c?rev=1688213&r1=1688212&r2=1688213&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/tests/libsvn_fs_fs/fs-fs-private-test.c (original)
+++ subversion/branches/move-tracking-2/subversion/tests/libsvn_fs_fs/fs-fs-private-test.c Mon Jun 29 13:42:10 2015
@@ -361,9 +361,10 @@ receive_index(const svn_fs_fs__p2l_entry
   return SVN_NO_ERROR;
 }
 
+#define REPO_NAME "test-repo-load-index-test"
+
 static svn_error_t *
-load_index_test(const svn_test_opts_t *opts, apr_pool_t *pool,
-                const char *repo_name, svn_boolean_t keep_going)
+load_index(const svn_test_opts_t *opts, apr_pool_t *pool)
 {
   svn_repos_t *repos;
   svn_revnum_t rev;
@@ -381,7 +382,7 @@ load_index_test(const svn_test_opts_t *o
                             "pre-1.9 SVN doesn't have FSFS indexes");
 
   /* Create a filesystem */
-  SVN_ERR(create_greek_repo(&repos, &rev, opts, repo_name, pool, pool));
+  SVN_ERR(create_greek_repo(&repos, &rev, opts, REPO_NAME, pool, pool));
 
   /* Read the original index contents for REV in ENTRIES. */
   SVN_ERR(svn_fs_fs__dump_index(svn_repos_fs(repos), rev, receive_index,
@@ -397,34 +398,21 @@ load_index_test(const svn_test_opts_t *o
   APR_ARRAY_PUSH(alt_entries, svn_fs_fs__p2l_entry_t *) = &entry;
 
   SVN_ERR(svn_fs_fs__load_index(svn_repos_fs(repos), rev, alt_entries, pool));
-  SVN_TEST_ASSERT_ERROR(svn_repos_verify_fs3(repos, rev, rev,
-                                             keep_going, FALSE, FALSE,
-                                             NULL, NULL, NULL, NULL, pool),
-                        (keep_going
-                         ? SVN_ERR_REPOS_VERIFY_FAILED
-                         : SVN_ERR_FS_INDEX_CORRUPTION));
+  SVN_TEST_ASSERT_ERROR(svn_repos_verify_fs3(repos, rev, rev, FALSE, FALSE,
+                                             NULL, NULL, NULL, NULL, NULL,
+                                             NULL, pool),
+                        SVN_ERR_FS_INDEX_CORRUPTION);
 
   /* Restore the original index. */
   SVN_ERR(svn_fs_fs__load_index(svn_repos_fs(repos), rev, entries, pool));
-  SVN_ERR(svn_repos_verify_fs3(repos, rev, rev, keep_going, FALSE, FALSE,
+  SVN_ERR(svn_repos_verify_fs3(repos, rev, rev, FALSE, FALSE, NULL, NULL,
                                NULL, NULL, NULL, NULL, pool));
 
   return SVN_NO_ERROR;
 }
 
-static svn_error_t *
-load_index(const svn_test_opts_t *opts,
-           apr_pool_t *pool)
-{
-  return load_index_test(opts, pool, "test-repo-load-index-test", FALSE);
-}
+#undef REPO_NAME
 
-static svn_error_t *
-load_index_keep_going(const svn_test_opts_t *opts,
-                      apr_pool_t *pool)
-{
-  return load_index_test(opts, pool, "test-repo-load-index-full-test", TRUE);
-}
 
 
 /* The test table.  */
@@ -440,8 +428,6 @@ static struct svn_test_descriptor_t test
                        "dump the P2L index"),
     SVN_TEST_OPTS_PASS(load_index,
                        "load the P2L index"),
-    SVN_TEST_OPTS_PASS(load_index_keep_going,
-                       "load the P2L index (full verification)"),
     SVN_TEST_NULL
   };
 

Modified: subversion/branches/move-tracking-2/subversion/tests/libsvn_subr/config-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/tests/libsvn_subr/config-test.c?rev=1688213&r1=1688212&r2=1688213&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/tests/libsvn_subr/config-test.c (original)
+++ subversion/branches/move-tracking-2/subversion/tests/libsvn_subr/config-test.c Mon Jun 29 13:42:10 2015
@@ -367,6 +367,18 @@ test_expand(const svn_test_opts_t *opts,
      of "c" was not created in a temporary pool when expanding "g". */
   SVN_TEST_STRING_ASSERT(val, "bar");
 
+  /* Get expanded "j" and "k" which have cyclic definitions.
+   * They must return empty values. */
+  svn_config_get(cfg, &val, "section1", "j", NULL);
+  SVN_TEST_STRING_ASSERT(val, "");
+  svn_config_get(cfg, &val, "section1", "k", NULL);
+  SVN_TEST_STRING_ASSERT(val, "");
+
+  /* Get expanded "l" which depends on a cyclic definition.
+   * So, it also considered "undefined" and will be normalized to "". */
+  svn_config_get(cfg, &val, "section1", "l", NULL);
+  SVN_TEST_STRING_ASSERT(val, "");
+
   return SVN_NO_ERROR;
 }
 

Modified: subversion/branches/move-tracking-2/subversion/tests/libsvn_subr/config-test.cfg
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/tests/libsvn_subr/config-test.cfg?rev=1688213&r1=1688212&r2=1688213&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/tests/libsvn_subr/config-test.cfg (original)
+++ subversion/branches/move-tracking-2/subversion/tests/libsvn_subr/config-test.cfg Mon Jun 29 13:42:10 2015
@@ -40,6 +40,11 @@ g=lyrical %(c)sd
 h=  %(unterminated
 # Multiple expansions
 i=%(a)s %(b)s
+# Recursive two-level variable expansion with surrounding text
+j=some %(k)scle
+k=c%(j)sy
+# Depends on a cyclic definition
+l=depends on a %(j)scycle!
 
 [UpperCaseSection]
 a=Aa



Mime
View raw message