You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by ju...@apache.org on 2022/03/24 16:09:55 UTC

svn commit: r1899173 - in /subversion/branches/pristines-on-demand-on-mwf/subversion: include/ libsvn_client/ svn/ tests/cmdline/ tests/cmdline/svntest/

Author: julianfoad
Date: Thu Mar 24 16:09:54 2022
New Revision: 1899173

URL: http://svn.apache.org/viewvc?rev=1899173&view=rev
Log:
On the 'pristines-on-demand-on-mwf' branch: notify when hydrating.

This adds hydration feedback notification to the library.

This also makes 'svn' display these notifications, except in 'svn diff' and
'svn cat' which are primarily data output commands where notifications would
interfere with the primary output.

* subversion/include/svn_wc.h
  (svn_wc_notify_action_t): Add new action types.

* subversion/libsvn_client/textbase.c
  (textbase_hydrate_cb): Notify when hydrating each file.
  (svn_client__textbase_sync): Notify when hydrating starts and finishes.

* subversion/svn/notify.c
  (notify_baton,
   svn_cl__get_notifier): Remember when printing hydration notifications.
  (notify_body): Print hydration notifications.

* subversion/svn/cat-cmd.c
  (svn_cl__cat): Suppress all notifications.

* subversion/svn/diff-cmd.c
  (svn_cl__diff): Suppress all notifications.

Updating tests to the new expectations:

* subversion/tests/cmdline/depth_tests.py
  (revert_depth_files): Use 'run_and_verify_revert'.

* subversion/tests/cmdline/merge_tests.py
  (merge_to_switched_path,
   dont_add_mergeinfo_from_own_history): Use 'run_and_verify_revert'.

* subversion/tests/cmdline/move_tests.py
  (move_conflict_details): Add the 'Fetching...' notification line to
    expected output.

* subversion/tests/cmdline/patch_tests.py
  (patch_no_svn_eol_style,
   patch_with_svn_eol_style,
   patch_with_svn_eol_style_uncommitted): Use 'run_and_verify_revert'.

* subversion/tests/cmdline/revert_tests.py
  (run_and_verify_revert): Use 'run_and_verify_revert_output'.

* subversion/tests/cmdline/schedule_tests.py
  (check_reversion): Remove.
  (revert_add_files,
   revert_add_directories,
   revert_nested_adds,
   revert_add_executable,
   revert_delete_files,
   revert_delete_dirs): Use 'run_and_verify_revert'.

* subversion/tests/cmdline/svntest/actions.py
  (expected_noop_update_output): Add the 'Fetching...' notification line to
    expected output.
  (_run_and_verify_resolve,
   run_and_verify_revert): Remove the 'Fetching...' notification line from
    actual output before matching the expected output.
  (run_and_verify_revert_output): New.

* subversion/tests/cmdline/svntest/mergetrees.py
  (expected_merge_output): Add the 'Fetching...' notification line to
    expected output.

* subversion/tests/cmdline/svntest/sandbox.py
  (pristines_on_demand_enabled): New method.

* subversion/tests/cmdline/update_tests.py
  (another_hudson_problem): Add the 'Fetching...' notification line to
    expected output.

Modified:
    subversion/branches/pristines-on-demand-on-mwf/subversion/include/svn_wc.h
    subversion/branches/pristines-on-demand-on-mwf/subversion/libsvn_client/textbase.c
    subversion/branches/pristines-on-demand-on-mwf/subversion/svn/cat-cmd.c
    subversion/branches/pristines-on-demand-on-mwf/subversion/svn/diff-cmd.c
    subversion/branches/pristines-on-demand-on-mwf/subversion/svn/notify.c
    subversion/branches/pristines-on-demand-on-mwf/subversion/tests/cmdline/depth_tests.py
    subversion/branches/pristines-on-demand-on-mwf/subversion/tests/cmdline/merge_tests.py
    subversion/branches/pristines-on-demand-on-mwf/subversion/tests/cmdline/move_tests.py
    subversion/branches/pristines-on-demand-on-mwf/subversion/tests/cmdline/patch_tests.py
    subversion/branches/pristines-on-demand-on-mwf/subversion/tests/cmdline/revert_tests.py
    subversion/branches/pristines-on-demand-on-mwf/subversion/tests/cmdline/schedule_tests.py
    subversion/branches/pristines-on-demand-on-mwf/subversion/tests/cmdline/svntest/actions.py
    subversion/branches/pristines-on-demand-on-mwf/subversion/tests/cmdline/svntest/mergetrees.py
    subversion/branches/pristines-on-demand-on-mwf/subversion/tests/cmdline/svntest/sandbox.py
    subversion/branches/pristines-on-demand-on-mwf/subversion/tests/cmdline/svntest/wc.py
    subversion/branches/pristines-on-demand-on-mwf/subversion/tests/cmdline/update_tests.py

Modified: subversion/branches/pristines-on-demand-on-mwf/subversion/include/svn_wc.h
URL: http://svn.apache.org/viewvc/subversion/branches/pristines-on-demand-on-mwf/subversion/include/svn_wc.h?rev=1899173&r1=1899172&r2=1899173&view=diff
==============================================================================
--- subversion/branches/pristines-on-demand-on-mwf/subversion/include/svn_wc.h (original)
+++ subversion/branches/pristines-on-demand-on-mwf/subversion/include/svn_wc.h Thu Mar 24 16:09:54 2022
@@ -1305,6 +1305,22 @@ typedef enum svn_wc_notify_action_t
    * @since New in 1.10. */
   svn_wc_notify_end_search_tree_conflict_details,
 
+  /** Hydrating (fetching text-bases): starting a batch of fetching
+   * within the WC subtree at @c svn_wc_notify_t.path. (Zero or more files
+   * may be fetched, each preceded by @c svn_wc_notify_hydrating_file.)
+   * @since New in 1.15. */
+  svn_wc_notify_hydrating_start,
+
+  /** Hydrating (fetching text-bases): about to fetch a file
+   * from @c svn_wc_notify_t.url at @c svn_wc_notify_t.revision.
+   * @since New in 1.15. */
+  svn_wc_notify_hydrating_file,
+
+  /** Hydrating (fetching text-bases): finished a batch of fetching
+   * within the WC subtree at @c svn_wc_notify_t.path.
+   * @since New in 1.15. */
+  svn_wc_notify_hydrating_end,
+
   /** A warning, specified in #svn_wc_notify_t.err.
    * @since New in 1.15. */
   svn_wc_notify_warning,

Modified: subversion/branches/pristines-on-demand-on-mwf/subversion/libsvn_client/textbase.c
URL: http://svn.apache.org/viewvc/subversion/branches/pristines-on-demand-on-mwf/subversion/libsvn_client/textbase.c?rev=1899173&r1=1899172&r2=1899173&view=diff
==============================================================================
--- subversion/branches/pristines-on-demand-on-mwf/subversion/libsvn_client/textbase.c (original)
+++ subversion/branches/pristines-on-demand-on-mwf/subversion/libsvn_client/textbase.c Thu Mar 24 16:09:54 2022
@@ -75,6 +75,16 @@ textbase_hydrate_cb(void *baton,
       b->ra_session = session;
     }
 
+  if (b->ctx->notify_func2)
+    {
+      svn_wc_notify_t *notify
+        = svn_wc_create_notify(".", svn_wc_notify_hydrating_file,
+                               scratch_pool);
+      notify->revision = revision;
+      notify->url = url;
+      b->ctx->notify_func2(b->ctx->notify_baton2, notify, scratch_pool);
+    }
+
   SVN_ERR(svn_client__ensure_ra_session_url(&old_url, b->ra_session, url,
                                             scratch_pool));
   err = svn_ra_get_file(b->ra_session, "", revision, contents,
@@ -99,11 +109,27 @@ svn_client__textbase_sync(const char *lo
   baton.ctx = ctx;
   baton.ra_session = NULL;
 
+  if (ctx->notify_func2 && allow_hydrate)
+    {
+      svn_wc_notify_t *notify
+        = svn_wc_create_notify(local_abspath, svn_wc_notify_hydrating_start,
+                               scratch_pool);
+      ctx->notify_func2(ctx->notify_baton2, notify, scratch_pool);
+    }
+
   SVN_ERR(svn_wc__textbase_sync(ctx->wc_ctx, local_abspath,
                                 allow_hydrate, allow_dehydrate,
                                 textbase_hydrate_cb, &baton,
                                 ctx->cancel_func, ctx->cancel_baton,
                                 scratch_pool));
 
+  if (ctx->notify_func2 && allow_hydrate)
+    {
+      svn_wc_notify_t *notify
+        = svn_wc_create_notify(local_abspath, svn_wc_notify_hydrating_end,
+                               scratch_pool);
+      ctx->notify_func2(ctx->notify_baton2, notify, scratch_pool);
+    }
+
   return SVN_NO_ERROR;
 }

Modified: subversion/branches/pristines-on-demand-on-mwf/subversion/svn/cat-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/pristines-on-demand-on-mwf/subversion/svn/cat-cmd.c?rev=1899173&r1=1899172&r2=1899173&view=diff
==============================================================================
--- subversion/branches/pristines-on-demand-on-mwf/subversion/svn/cat-cmd.c (original)
+++ subversion/branches/pristines-on-demand-on-mwf/subversion/svn/cat-cmd.c Thu Mar 24 16:09:54 2022
@@ -53,6 +53,9 @@ svn_cl__cat(apr_getopt_t *os,
   apr_array_header_t *errors = apr_array_make(pool, 0, sizeof(apr_status_t));
   svn_error_t *err;
 
+  /* Don't print any feedback notifications. (At least not on stdout.) */
+  ctx->notify_func2 = NULL;
+
   SVN_ERR(svn_cl__args_to_target_array_print_reserved(&targets, os,
                                                       opt_state->targets,
                                                       ctx, FALSE, pool));

Modified: subversion/branches/pristines-on-demand-on-mwf/subversion/svn/diff-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/pristines-on-demand-on-mwf/subversion/svn/diff-cmd.c?rev=1899173&r1=1899172&r2=1899173&view=diff
==============================================================================
--- subversion/branches/pristines-on-demand-on-mwf/subversion/svn/diff-cmd.c (original)
+++ subversion/branches/pristines-on-demand-on-mwf/subversion/svn/diff-cmd.c Thu Mar 24 16:09:54 2022
@@ -222,6 +222,9 @@ svn_cl__diff(apr_getopt_t *os,
     opt_state->diff.patch_compatible || opt_state->diff.ignore_properties;
   int i;
 
+  /* Don't print any feedback notifications. (At least not on stdout.) */
+  ctx->notify_func2 = NULL;
+
   if (opt_state->extensions)
     options = svn_cstring_split(opt_state->extensions, " \t\n\r", TRUE, pool);
   else

Modified: subversion/branches/pristines-on-demand-on-mwf/subversion/svn/notify.c
URL: http://svn.apache.org/viewvc/subversion/branches/pristines-on-demand-on-mwf/subversion/svn/notify.c?rev=1899173&r1=1899172&r2=1899173&view=diff
==============================================================================
--- subversion/branches/pristines-on-demand-on-mwf/subversion/svn/notify.c (original)
+++ subversion/branches/pristines-on-demand-on-mwf/subversion/svn/notify.c Thu Mar 24 16:09:54 2022
@@ -53,6 +53,7 @@ struct notify_baton
   svn_boolean_t is_export;
   svn_boolean_t is_wc_to_repos_copy;
   svn_boolean_t sent_first_txdelta;
+  svn_boolean_t hydrating_printed_start;
   int in_external;
   svn_revnum_t progress_revision;
   svn_boolean_t had_print_error; /* Used to not keep printing error messages
@@ -1207,6 +1208,26 @@ notify_body(struct notify_baton *nb,
       SVN_ERR(svn_cmdline_printf(pool, _("Committing transaction...\n")));
       break;
 
+    case svn_wc_notify_hydrating_start:
+      nb->hydrating_printed_start = FALSE;
+      break;
+
+    case svn_wc_notify_hydrating_file:
+      if (!nb->hydrating_printed_start)
+        {
+          SVN_ERR(svn_cmdline_printf(pool, _("Fetching text bases ")));
+          nb->hydrating_printed_start = TRUE;
+        }
+      SVN_ERR(svn_cmdline_printf(pool, "."));
+      break;
+
+    case svn_wc_notify_hydrating_end:
+      if (nb->hydrating_printed_start)
+        {
+          SVN_ERR(svn_cmdline_printf(pool, _("done\n")));
+        }
+      break;
+
     case svn_wc_notify_warning:
       /* using handle_error rather than handle_warning in order to show the
        * whole error chain; the latter only shows one error in the chain */
@@ -1261,6 +1282,7 @@ svn_cl__get_notifier(svn_wc_notify_func2
 
   nb->received_some_change = FALSE;
   nb->sent_first_txdelta = FALSE;
+  nb->hydrating_printed_start = FALSE;
   nb->is_checkout = FALSE;
   nb->is_export = FALSE;
   nb->is_wc_to_repos_copy = FALSE;

Modified: subversion/branches/pristines-on-demand-on-mwf/subversion/tests/cmdline/depth_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/pristines-on-demand-on-mwf/subversion/tests/cmdline/depth_tests.py?rev=1899173&r1=1899172&r2=1899173&view=diff
==============================================================================
--- subversion/branches/pristines-on-demand-on-mwf/subversion/tests/cmdline/depth_tests.py (original)
+++ subversion/branches/pristines-on-demand-on-mwf/subversion/tests/cmdline/depth_tests.py Thu Mar 24 16:09:54 2022
@@ -2781,23 +2781,23 @@ def revert_depth_files(sbox):
 
   sbox.build(read_only = True)
 
-  expected_output = "Reverted '" + re.escape(sbox.ospath('A/mu')) + "'"
+  expected_paths = [sbox.ospath('A/mu')]
 
   # Apply an unrelated delete one level to deep
   sbox.simple_rm('A/D/gamma')
 
   sbox.simple_rm('A/mu')
   # Expect reversion of just 'mu'
-  svntest.actions.run_and_verify_svn(expected_output, [],
-                                     'revert', '--depth=immediates', sbox.ospath('A'))
+  svntest.actions.run_and_verify_revert(expected_paths,
+                                        '--depth=immediates', sbox.ospath('A'))
 
   # Apply an unrelated directory delete
   sbox.simple_rm('A/D')
 
   sbox.simple_rm('A/mu')
   # Expect reversion of just 'mu'
-  svntest.actions.run_and_verify_svn(expected_output, [],
-                                     'revert', '--depth=files', sbox.ospath('A'))
+  svntest.actions.run_and_verify_revert(expected_paths,
+                                        '--depth=files', sbox.ospath('A'))
 
 @Issue(4257)
 def spurious_nodes_row(sbox):

Modified: subversion/branches/pristines-on-demand-on-mwf/subversion/tests/cmdline/merge_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/pristines-on-demand-on-mwf/subversion/tests/cmdline/merge_tests.py?rev=1899173&r1=1899172&r2=1899173&view=diff
==============================================================================
--- subversion/branches/pristines-on-demand-on-mwf/subversion/tests/cmdline/merge_tests.py (original)
+++ subversion/branches/pristines-on-demand-on-mwf/subversion/tests/cmdline/merge_tests.py Thu Mar 24 16:09:54 2022
@@ -5067,11 +5067,10 @@ def merge_to_switched_path(sbox):
   # but as it is switched this empty mergeinfo just elides to the
   # repository (empty mergeinfo on a path can elide if that path doesn't
   # inherit *any* mergeinfo).
-  svntest.actions.run_and_verify_svn(["Reverted '" + A_COPY_path+ "'\n",
-                                      "Reverted '" + A_COPY_D_G_path+ "'\n",
-                                      "Reverted '" + A_COPY_D_G_rho_path +
-                                      "'\n"],
-                                     [], 'revert', '-R', wc_dir)
+  svntest.actions.run_and_verify_revert([A_COPY_path,
+                                         A_COPY_D_G_path,
+                                         A_COPY_D_G_rho_path],
+                                        '-R', wc_dir)
   svntest.actions.run_and_verify_svn(["property '" + SVN_PROP_MERGEINFO +
                                       "' set on '" + A_COPY_D_path+ "'" +
                                       "\n"], [], 'ps', SVN_PROP_MERGEINFO,
@@ -9635,9 +9634,9 @@ def dont_add_mergeinfo_from_own_history(
                                        '--allow-mixed-revisions', A_path)
 
   # Revert all local mods
-  svntest.actions.run_and_verify_svn(["Reverted '" + A_path + "'\n",
-                                      "Reverted '" + mu_path + "'\n"],
-                                     [], 'revert', '-R', wc_dir)
+  svntest.actions.run_and_verify_revert([A_path,
+                                         mu_path],
+                                        '-R', wc_dir)
 
   # Move 'A' to 'A_MOVED' and once again merge r7 from 'A_COPY', this time
   # to 'A_MOVED'.  This attempts to add the mergeinfo '/A:3' to
@@ -9772,9 +9771,9 @@ def dont_add_mergeinfo_from_own_history(
                                        check_props=True)
 
   # Revert all local mods
-  svntest.actions.run_and_verify_svn(["Reverted '" + A_MOVED_path + "'\n",
-                                      "Reverted '" + mu_MOVED_path + "'\n"],
-                                     [], 'revert', '-R', wc_dir)
+  svntest.actions.run_and_verify_revert([A_MOVED_path,
+                                         mu_MOVED_path],
+                                        '-R', wc_dir)
 
   # Create a new 'A' unrelated to the old 'A' which was moved.  Then merge
   # r7 from 'A_COPY' to this new 'A'.  Since the new 'A' shares no history

Modified: subversion/branches/pristines-on-demand-on-mwf/subversion/tests/cmdline/move_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/pristines-on-demand-on-mwf/subversion/tests/cmdline/move_tests.py?rev=1899173&r1=1899172&r2=1899173&view=diff
==============================================================================
--- subversion/branches/pristines-on-demand-on-mwf/subversion/tests/cmdline/move_tests.py (original)
+++ subversion/branches/pristines-on-demand-on-mwf/subversion/tests/cmdline/move_tests.py Thu Mar 24 16:09:54 2022
@@ -1600,20 +1600,25 @@ def move_conflict_details(sbox):
   sbox.simple_add('B/E/new-dir3')
 
 
-  expected_output = [
-    " C   %s\n" % sbox.ospath('B'),         # Property conflicted
-    " U   %s\n" % sbox.ospath('B/E'),       # Just updated
-    "C    %s\n" % sbox.ospath('B/E/alpha'), # Text conflicted
-    "   C %s\n" % sbox.ospath('B/E/beta'),
-    "   C %s\n" % sbox.ospath('B/E/new'),
-    "   C %s\n" % sbox.ospath('B/E/new-dir1'),
-    "   C %s\n" % sbox.ospath('B/E/new-dir2'),
-    "   C %s\n" % sbox.ospath('B/E/new-dir3'),
-    "   C %s\n" % sbox.ospath('B/F'),
-    "   C %s\n" % sbox.ospath('B/lambda'),
-    "Updated to revision 2.\n",
-    "Tree conflict at '%s' marked as resolved.\n" % sbox.ospath('A/B')
-  ]
+  expected_output = svntest.verify.RegexListOutput(
+    (["Fetching text bases [.]+done"]
+      if sbox.pristines_on_demand_enabled() else [])
+    +
+    [re.escape(x) for x in [
+      " C   %s\n" % sbox.ospath('B'),         # Property conflicted
+      " U   %s\n" % sbox.ospath('B/E'),       # Just updated
+      "C    %s\n" % sbox.ospath('B/E/alpha'), # Text conflicted
+      "   C %s\n" % sbox.ospath('B/E/beta'),
+      "   C %s\n" % sbox.ospath('B/E/new'),
+      "   C %s\n" % sbox.ospath('B/E/new-dir1'),
+      "   C %s\n" % sbox.ospath('B/E/new-dir2'),
+      "   C %s\n" % sbox.ospath('B/E/new-dir3'),
+      "   C %s\n" % sbox.ospath('B/F'),
+      "   C %s\n" % sbox.ospath('B/lambda'),
+      "Updated to revision 2.\n",
+      "Tree conflict at '%s' marked as resolved.\n" % sbox.ospath('A/B')
+    ]]
+  )
   svntest.actions.run_and_verify_svn(expected_output, [],
                                      'resolve', sbox.ospath('A/B'),
                                      '--depth', 'empty',

Modified: subversion/branches/pristines-on-demand-on-mwf/subversion/tests/cmdline/patch_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/pristines-on-demand-on-mwf/subversion/tests/cmdline/patch_tests.py?rev=1899173&r1=1899172&r2=1899173&view=diff
==============================================================================
--- subversion/branches/pristines-on-demand-on-mwf/subversion/tests/cmdline/patch_tests.py (original)
+++ subversion/branches/pristines-on-demand-on-mwf/subversion/tests/cmdline/patch_tests.py Thu Mar 24 16:09:54 2022
@@ -1662,9 +1662,9 @@ def patch_no_svn_eol_style(sbox):
                                             [], True, True,
                                             keep_eol_style=True)
 
-      expected_output = ["Reverted '" + mu_path + "'\n"]
-      svntest.actions.run_and_verify_svn(expected_output, [],
-                                         'revert', '-R', wc_dir)
+      expected_paths = [mu_path]
+      svntest.actions.run_and_verify_revert(expected_paths,
+                                            '-R', wc_dir)
 
 def patch_with_svn_eol_style(sbox):
   "patch target with svn:eol-style"
@@ -1779,8 +1779,9 @@ def patch_with_svn_eol_style(sbox):
                                             1, # dry-run
                                             keep_eol_style=True)
 
-      expected_output = ["Reverted '" + mu_path + "'\n"]
-      svntest.actions.run_and_verify_svn(expected_output, [], 'revert', '-R', wc_dir)
+      expected_paths = [mu_path]
+      svntest.actions.run_and_verify_revert(expected_paths,
+                                            '-R', wc_dir)
 
 def patch_with_svn_eol_style_uncommitted(sbox):
   "patch target with uncommitted svn:eol-style"
@@ -1889,8 +1890,9 @@ def patch_with_svn_eol_style_uncommitted
                                             1, # dry-run
                                             keep_eol_style=True)
 
-      expected_output = ["Reverted '" + mu_path + "'\n"]
-      svntest.actions.run_and_verify_svn(expected_output, [], 'revert', '-R', wc_dir)
+      expected_paths = [mu_path]
+      svntest.actions.run_and_verify_revert(expected_paths,
+                                            '-R', wc_dir)
 
 def patch_with_ignore_whitespace(sbox):
   "ignore whitespace when patching"

Modified: subversion/branches/pristines-on-demand-on-mwf/subversion/tests/cmdline/revert_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/pristines-on-demand-on-mwf/subversion/tests/cmdline/revert_tests.py?rev=1899173&r1=1899172&r2=1899173&view=diff
==============================================================================
--- subversion/branches/pristines-on-demand-on-mwf/subversion/tests/cmdline/revert_tests.py (original)
+++ subversion/branches/pristines-on-demand-on-mwf/subversion/tests/cmdline/revert_tests.py Thu Mar 24 16:09:54 2022
@@ -60,8 +60,8 @@ def run_and_verify_revert(targets, optio
   if reverted_paths is None:
     reverted_paths = targets
   expected_output = expected_output_revert(reverted_paths, skipped_paths)
-  svntest.actions.run_and_verify_svn(expected_output, [],
-                                     *(['revert'] + options + targets))
+  svntest.actions.run_and_verify_revert_output(expected_output,
+                                               *(options + targets))
 
 def revert_replacement_with_props(sbox, wc_copy):
   """Helper implementing the core of

Modified: subversion/branches/pristines-on-demand-on-mwf/subversion/tests/cmdline/schedule_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/pristines-on-demand-on-mwf/subversion/tests/cmdline/schedule_tests.py?rev=1899173&r1=1899172&r2=1899173&view=diff
==============================================================================
--- subversion/branches/pristines-on-demand-on-mwf/subversion/tests/cmdline/schedule_tests.py (original)
+++ subversion/branches/pristines-on-demand-on-mwf/subversion/tests/cmdline/schedule_tests.py Thu Mar 24 16:09:54 2022
@@ -253,19 +253,6 @@ def delete_dirs(sbox):
 #  and then also tests reversion of those changes.
 #
 
-def check_reversion(files, output):
-  expected_output = []
-  for file in files:
-    expected_output = expected_output + ["Reverted '" + file + "'\n"]
-  output.sort()
-  expected_output.sort()
-  if output != expected_output:
-    logger.warn("Expected output: %s", expected_output)
-    logger.warn("Actual output:   %s", output)
-    raise svntest.Failure
-
-#----------------------------------------------------------------------
-
 def revert_add_files(sbox):
   "revert: add some files"
 
@@ -278,11 +265,7 @@ def revert_add_files(sbox):
   epsilon_path = sbox.ospath('A/D/G/epsilon')
   files = [delta_path, zeta_path, epsilon_path]
 
-  exit_code, output, err = svntest.actions.run_and_verify_svn(None, [],
-                                                              'revert',
-                                                              '--recursive',
-                                                              wc_dir)
-  check_reversion(files, output)
+  svntest.actions.run_and_verify_revert(files, '--recursive', wc_dir)
 
 #----------------------------------------------------------------------
 
@@ -298,11 +281,7 @@ def revert_add_directories(sbox):
   Z_path = sbox.ospath('A/D/H/Z')
   files = [X_path, Y_path, Z_path]
 
-  exit_code, output, err = svntest.actions.run_and_verify_svn(None, [],
-                                                              'revert',
-                                                              '--recursive',
-                                                              wc_dir)
-  check_reversion(files, output)
+  svntest.actions.run_and_verify_revert(files, '--recursive', wc_dir)
 
 #----------------------------------------------------------------------
 
@@ -324,11 +303,7 @@ def revert_nested_adds(sbox):
            + [os.path.join(Z_path, child)
               for child in ['R', 'zeta']])
 
-  exit_code, output, err = svntest.actions.run_and_verify_svn(None, [],
-                                                              'revert',
-                                                              '--recursive',
-                                                              wc_dir)
-  check_reversion(files, output)
+  svntest.actions.run_and_verify_revert(files, '--recursive', wc_dir)
 
 #----------------------------------------------------------------------
 @SkipUnless(svntest.main.is_posix_os)
@@ -345,11 +320,7 @@ def revert_add_executable(sbox):
   other_path = sbox.ospath('other_exe')
   files = [all_path, none_path, user_path, group_path, other_path]
 
-  exit_code, output, err = svntest.actions.run_and_verify_svn(None, [],
-                                                              'revert',
-                                                              '--recursive',
-                                                              wc_dir)
-  check_reversion(files, output)
+  svntest.actions.run_and_verify_revert(files, '--recursive', wc_dir)
 
 #----------------------------------------------------------------------
 
@@ -366,11 +337,7 @@ def revert_delete_files(sbox):
   omega_path = sbox.ospath('A/D/H/omega')
   files = [iota_path, mu_path, omega_path, rho_path]
 
-  exit_code, output, err = svntest.actions.run_and_verify_svn(None, [],
-                                                              'revert',
-                                                              '--recursive',
-                                                              wc_dir)
-  check_reversion(files, output)
+  svntest.actions.run_and_verify_revert(files, '--recursive', wc_dir)
 
 #----------------------------------------------------------------------
 
@@ -392,11 +359,7 @@ def revert_delete_dirs(sbox):
   files = [E_path, F_path, H_path,
            alpha_path, beta_path, chi_path, omega_path, psi_path]
 
-  exit_code, output, err = svntest.actions.run_and_verify_svn(None, [],
-                                                              'revert',
-                                                              '--recursive',
-                                                              wc_dir)
-  check_reversion(files, output)
+  svntest.actions.run_and_verify_revert(files, '--recursive', wc_dir)
 
 
 #######################################################################

Modified: subversion/branches/pristines-on-demand-on-mwf/subversion/tests/cmdline/svntest/actions.py
URL: http://svn.apache.org/viewvc/subversion/branches/pristines-on-demand-on-mwf/subversion/tests/cmdline/svntest/actions.py?rev=1899173&r1=1899172&r2=1899173&view=diff
==============================================================================
--- subversion/branches/pristines-on-demand-on-mwf/subversion/tests/cmdline/svntest/actions.py (original)
+++ subversion/branches/pristines-on-demand-on-mwf/subversion/tests/cmdline/svntest/actions.py Thu Mar 24 16:09:54 2022
@@ -527,7 +527,7 @@ def expected_noop_update_output(rev):
   """Return an ExpectedOutput object describing what we'd expect to
   see from an update to revision REV that was effectively a no-op (no
   server changes transmitted)."""
-  return verify.createExpectedOutput("Updating '.*':|At revision %d."
+  return verify.createExpectedOutput("Updating '.*':|Fetching text bases [.]+done|At revision %d."
                                      % (rev),
                                      "no-op update")
 
@@ -1931,8 +1931,12 @@ def _run_and_verify_resolve(cmd, expecte
         expected_paths]),
     ],
     match_all=False)
-  run_and_verify_svn(expected_output, [],
-                     cmd, *args)
+  exit_code, out, err = main.run_svn(None, cmd, *args)
+  out = [line for line in out
+         if not re.match(r'Fetching text bases [.]+done\n', line)]
+  verify.verify_outputs("Unexpected output", out, err,
+                        expected_output, [])
+  verify.verify_exit_code("Unexpected return code", exit_code, 0)
 
 def run_and_verify_resolve(expected_paths, *args):
   """Run "svn resolve" with arguments ARGS, and verify that it resolves the
@@ -1955,8 +1959,18 @@ def run_and_verify_revert(expected_paths
   expected_output = verify.UnorderedOutput([
     "Reverted '" + path + "'\n" for path in
     expected_paths])
-  run_and_verify_svn(expected_output, [],
-                     "revert", *args)
+  run_and_verify_revert_output(expected_output, *args)
+
+def run_and_verify_revert_output(expected_output, *args):
+  """Run "svn revert" with arguments ARGS, and verify that it outputs
+     the text in EXPECTED_OUTPUT (and no stderr or exit code).
+  """
+  exit_code, out, err = main.run_svn(None, "revert", *args)
+  out = [line for line in out
+         if not re.match(r'Fetching text bases [.]+done\n', line)]
+  verify.verify_outputs("Unexpected output", out, err,
+                        expected_output, [])
+  verify.verify_exit_code("Unexpected return code", exit_code, 0)
 
 
 ######################################################################

Modified: subversion/branches/pristines-on-demand-on-mwf/subversion/tests/cmdline/svntest/mergetrees.py
URL: http://svn.apache.org/viewvc/subversion/branches/pristines-on-demand-on-mwf/subversion/tests/cmdline/svntest/mergetrees.py?rev=1899173&r1=1899172&r2=1899173&view=diff
==============================================================================
--- subversion/branches/pristines-on-demand-on-mwf/subversion/tests/cmdline/svntest/mergetrees.py (original)
+++ subversion/branches/pristines-on-demand-on-mwf/subversion/tests/cmdline/svntest/mergetrees.py Thu Mar 24 16:09:54 2022
@@ -95,6 +95,8 @@ def expected_merge_output(rev_ranges, ad
   if (two_url):
     lines += ["--- Recording mergeinfo for merge between repository URLs .*\n"]
 
+  lines += ["Fetching text bases [.]+done\n"]
+
   # Address "The Backslash Plague"
   #
   # If ADDITIONAL_LINES are present there are possibly paths in it with

Modified: subversion/branches/pristines-on-demand-on-mwf/subversion/tests/cmdline/svntest/sandbox.py
URL: http://svn.apache.org/viewvc/subversion/branches/pristines-on-demand-on-mwf/subversion/tests/cmdline/svntest/sandbox.py?rev=1899173&r1=1899172&r2=1899173&view=diff
==============================================================================
--- subversion/branches/pristines-on-demand-on-mwf/subversion/tests/cmdline/svntest/sandbox.py (original)
+++ subversion/branches/pristines-on-demand-on-mwf/subversion/tests/cmdline/svntest/sandbox.py Thu Mar 24 16:09:54 2022
@@ -609,6 +609,9 @@ class Sandbox:
     db.close()
     return found_format
 
+  def pristines_on_demand_enabled(self):
+    return self.read_wc_format() == 32
+
 def is_url(target):
   return (target.startswith('^/')
           or target.startswith('file://')

Modified: subversion/branches/pristines-on-demand-on-mwf/subversion/tests/cmdline/svntest/wc.py
URL: http://svn.apache.org/viewvc/subversion/branches/pristines-on-demand-on-mwf/subversion/tests/cmdline/svntest/wc.py?rev=1899173&r1=1899172&r2=1899173&view=diff
==============================================================================
--- subversion/branches/pristines-on-demand-on-mwf/subversion/tests/cmdline/svntest/wc.py (original)
+++ subversion/branches/pristines-on-demand-on-mwf/subversion/tests/cmdline/svntest/wc.py Thu Mar 24 16:09:54 2022
@@ -590,7 +590,7 @@ class State:
 
     desc = { }
     for line in lines:
-      if line.startswith('DBG:'):
+      if line.startswith('DBG:') or re.match('^Fetching text bases [.]+done$', line):
         continue
 
       match = _re_parse_checkout.search(line)

Modified: subversion/branches/pristines-on-demand-on-mwf/subversion/tests/cmdline/update_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/pristines-on-demand-on-mwf/subversion/tests/cmdline/update_tests.py?rev=1899173&r1=1899172&r2=1899173&view=diff
==============================================================================
--- subversion/branches/pristines-on-demand-on-mwf/subversion/tests/cmdline/update_tests.py (original)
+++ subversion/branches/pristines-on-demand-on-mwf/subversion/tests/cmdline/update_tests.py Thu Mar 24 16:09:54 2022
@@ -1188,10 +1188,13 @@ def another_hudson_problem(sbox):
                      'D    '+G_path+'\n',
                      'Updated to revision 3.\n',
                     ]
+  expected_output = [re.escape(s) for s in expected_output]
+  if sbox.pristines_on_demand_enabled():
+    expected_output.append('Fetching text bases [.]*done\n')
 
   # Sigh, I can't get run_and_verify_update to work (but not because
   # of issue 919 as far as I can tell)
-  expected_output = svntest.verify.UnorderedOutput(expected_output)
+  expected_output = svntest.verify.UnorderedRegexListOutput(expected_output)
   svntest.actions.run_and_verify_svn(expected_output, [],
                                      'up', G_path)
 
@@ -3713,65 +3716,74 @@ def update_accept_conflicts(sbox):
   # Setup SVN_EDITOR and SVN_MERGE for --accept={edit,launch}.
   svntest.main.use_editor('append_foo')
 
+  def run_and_verify_update_output(expected_stdout, expected_stderr, *args):
+    expected_exit = 0
+    exit_code, out, err = svntest.main.run_svn(True, *args)
+    out = [line for line in out
+           if not re.match(r'Fetching text bases [.]+done\n', line)]
+    verify.verify_outputs("Unexpected output", out, err,
+                          expected_stdout, expected_stderr)
+    verify.verify_exit_code("Unexpected return code", exit_code, expected_exit)
+
   # iota: no accept option
   # Just leave the conflicts alone, since run_and_verify_svn already uses
   # the --non-interactive option.
-  svntest.actions.run_and_verify_svn(update_output_with_conflicts(
-                                       3, iota_path_backup),
-                                     [],
-                                     'update', iota_path_backup)
+  run_and_verify_update_output(update_output_with_conflicts(
+                                 3, iota_path_backup),
+                               [],
+                               'update', iota_path_backup)
 
   # lambda: --accept=postpone
   # Just leave the conflicts alone.
-  svntest.actions.run_and_verify_svn(update_output_with_conflicts(
-                                       3, lambda_path_backup),
-                                     [],
-                                     'update', '--accept=postpone',
-                                     lambda_path_backup)
+  run_and_verify_update_output(update_output_with_conflicts(
+                                 3, lambda_path_backup),
+                               [],
+                               'update', '--accept=postpone',
+                               lambda_path_backup)
 
   # mu: --accept=base
   # Accept the pre-update base file.
-  svntest.actions.run_and_verify_svn(update_output_with_conflicts_resolved(
-                                       3, mu_path_backup),
-                                     [],
-                                     'update', '--accept=base',
-                                     mu_path_backup)
+  run_and_verify_update_output(update_output_with_conflicts_resolved(
+                                 3, mu_path_backup),
+                               [],
+                               'update', '--accept=base',
+                               mu_path_backup)
 
   # alpha: --accept=mine
   # Accept the user's working file.
-  svntest.actions.run_and_verify_svn(update_output_with_conflicts_resolved(
-                                       3, alpha_path_backup),
-                                     [],
-                                     'update', '--accept=mine-full',
-                                     alpha_path_backup)
+  run_and_verify_update_output(update_output_with_conflicts_resolved(
+                                 3, alpha_path_backup),
+                               [],
+                               'update', '--accept=mine-full',
+                               alpha_path_backup)
 
   # beta: --accept=theirs
   # Accept their file.
-  svntest.actions.run_and_verify_svn(update_output_with_conflicts_resolved(
-                                       3, beta_path_backup),
-                                     [],
-                                     'update', '--accept=theirs-full',
-                                     beta_path_backup)
+  run_and_verify_update_output(update_output_with_conflicts_resolved(
+                                 3, beta_path_backup),
+                               [],
+                               'update', '--accept=theirs-full',
+                               beta_path_backup)
 
   # pi: --accept=edit
   # Run editor and accept the edited file. The merge tool will leave
   # conflicts in place, so expect a message on stderr, but expect
   # svn to exit with an exit code of 0.
-  svntest.actions.run_and_verify_svn2(update_output_with_conflicts_resolved(
-                                        3, p_i_path_backup),
-                                      "system(.*) returned.*", 0,
-                                      'update', '--accept=edit',
-                                      '--force-interactive',
-                                      p_i_path_backup)
+  run_and_verify_update_output(update_output_with_conflicts_resolved(
+                                 3, p_i_path_backup),
+                               "system(.*) returned.*",
+                               'update', '--accept=edit',
+                               '--force-interactive',
+                               p_i_path_backup)
 
   # rho: --accept=launch
   # Run the external merge tool, it should leave conflict markers in place.
-  svntest.actions.run_and_verify_svn(update_output_with_conflicts(
-                                       3, rho_path_backup),
-                                     [],
-                                     'update', '--accept=launch',
-                                     '--force-interactive',
-                                     rho_path_backup)
+  run_and_verify_update_output(update_output_with_conflicts(
+                                 3, rho_path_backup),
+                               [],
+                               'update', '--accept=launch',
+                               '--force-interactive',
+                               rho_path_backup)
 
   # Set the expected disk contents for the test
   expected_disk = svntest.main.greek_state.copy()