Author: julianfoad
Date: Thu Nov 22 21:02:33 2018
New Revision: 1847206
URL: http://svn.apache.org/viewvc?rev=1847206&view=rev
Log:
Make 'svn copy URL WC' notifications consistent with 'svn copy WC WC'.
Part of issue SVN-2198 "clean up svn_wc_repos_add_repos_file() situation".
Previously we emitted the notifications from 'checkout', revealing an
implementation detail.
Old:
| A A/D/G_COPY/pi
| A A/D/G_COPY/rho
| A A/D/G_COPY/tau
| Checked out revision 6.
| A A/D/G_COPY
New:
| A A/D/G_COPY
| A A/D/G_COPY/pi
| A A/D/G_COPY/rho
| A A/D/G_COPY/tau
* subversion/libsvn_client/copy.c
(notification_adjust_func): Change 'checkout' notifications into plain WC
'add' notifications, discarding unwanted details at the start and end of
checkout.
(svn_client__repos_to_wc_copy_file): Notify here.
(repos_to_wc_copy_single): Do not notify here. Remove an early return, now
that there is no need for it.
* subversion/tests/cmdline/copy_tests.py
(URI_encoded_repos_to_wc): Adjust expectations.
* subversion/tests/cmdline/externals_tests.py
(url_to_wc_copy_of_externals): Same.
* subversion/tests/cmdline/merge_tests.py
(merge_to_switched_path,
natural_history_filtering): Same.
* subversion/tests/cmdline/svntest/mergetrees.py
(set_up_branch): Same.
* subversion/tests/cmdline/switch_tests.py
(mergeinfo_switch_elision): Same.
* subversion/tests/cmdline/update_tests.py
(mergeinfo_update_elision): Same.
Modified:
subversion/trunk/subversion/libsvn_client/copy.c
subversion/trunk/subversion/tests/cmdline/copy_tests.py
subversion/trunk/subversion/tests/cmdline/externals_tests.py
subversion/trunk/subversion/tests/cmdline/merge_tests.py
subversion/trunk/subversion/tests/cmdline/svntest/mergetrees.py
subversion/trunk/subversion/tests/cmdline/switch_tests.py
subversion/trunk/subversion/tests/cmdline/update_tests.py
Modified: subversion/trunk/subversion/libsvn_client/copy.c
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/copy.c?rev=1847206&r1=1847205&r2=1847206&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/copy.c (original)
+++ subversion/trunk/subversion/libsvn_client/copy.c Thu Nov 22 21:02:33 2018
@@ -2310,9 +2310,15 @@ struct notification_adjust_baton
};
/* A svn_wc_notify_func2_t function that wraps BATON->inner_func (whose
- * baton is BATON->inner_baton) and adjusts the notification paths that
- * start with BATON->checkout_abspath to start instead with
- * BATON->final_abspath. */
+ * baton is BATON->inner_baton) to turn the result of a 'checkout' into
+ * what we want to see for a 'copy to WC' operation.
+ *
+ * - Adjust the notification paths that start with BATON->checkout_abspath
+ * to start instead with BATON->final_abspath.
+ * - Change start-of-update notification into a plain WC 'add' for the root.
+ * - Change checkout 'add' notifications into a plain WC 'add'.
+ * - Discard 'update_completed' notifications.
+ */
static void
notification_adjust_func(void *baton,
const svn_wc_notify_t *notify,
@@ -2325,6 +2331,21 @@ notification_adjust_func(void *baton,
relpath = svn_dirent_skip_ancestor(nb->checkout_abspath, notify->path);
inner_notify->path = svn_dirent_join(nb->final_abspath, relpath, pool);
+ /* Convert 'update' notifications to plain 'add' notifications; discard
+ notifications about checkout/update starting/finishing. */
+ if (notify->action == svn_wc_notify_update_started /* root */
+ || notify->action == svn_wc_notify_update_add) /* non-root */
+ {
+ inner_notify->action = svn_wc_notify_add;
+ }
+ else if (notify->action == svn_wc_notify_update_update
+ || notify->action == svn_wc_notify_update_completed)
+ {
+ /* update_update happens only for a prop mod on root; the root was
+ already notified so discard this */
+ return;
+ }
+
if (nb->inner_func)
nb->inner_func(nb->inner_baton, inner_notify, pool);
}
@@ -2367,6 +2388,8 @@ svn_client__repos_to_wc_copy_dir(svn_boo
SVN_ERR(svn_wc__get_tmpdir(&tmpdir_abspath, ctx->wc_ctx, dst_abspath,
scratch_pool, scratch_pool));
+ /* Get a temporary path. The crude way we do this is to create a
+ temporary file, remember its name, and let it be deleted immediately. */
SVN_ERR(svn_io_open_unique_file3(NULL, &tmp_abspath, tmpdir_abspath,
svn_io_file_del_on_close,
scratch_pool, scratch_pool));
@@ -2463,6 +2486,16 @@ svn_client__repos_to_wc_copy_file(svn_bo
same_repositories ? src_rev : SVN_INVALID_REVNUM,
ctx->cancel_func, ctx->cancel_baton,
scratch_pool));
+ /* Do our own notification for the root node, even if we could possibly
+ have delegated it. See also issue #2198. */
+ if (ctx->notify_func2)
+ {
+ svn_wc_notify_t *notify
+ = svn_wc_create_notify(dst_abspath, svn_wc_notify_add, scratch_pool);
+
+ notify->kind = svn_node_file;
+ ctx->notify_func2(ctx->notify_baton2, notify, scratch_pool);
+ }
return SVN_NO_ERROR;
}
@@ -2522,10 +2555,8 @@ repos_to_wc_copy_single(svn_boolean_t *t
ignore_externals,
same_repositories,
ra_session, ctx, pool));
- if (!same_repositories)
- return SVN_NO_ERROR;
- if (pin_externals)
+ if (same_repositories && pin_externals)
{
apr_hash_t *pinned_externals;
apr_hash_index_t *hi;
@@ -2603,18 +2634,8 @@ repos_to_wc_copy_single(svn_boolean_t *t
TRUE /*squelch_incapable*/,
pool));
SVN_ERR(extend_wc_mergeinfo(dst_abspath, src_mergeinfo, ctx, pool));
- }
-
- /* Do our own notification for the root node, even if we could possibly
- have delegated it. See also issue #1552.
- ### Maybe this notification should mention the mergeinfo change. */
- if (ctx->notify_func2)
- {
- svn_wc_notify_t *notify = svn_wc_create_notify(
- dst_abspath, svn_wc_notify_add, pool);
- notify->kind = pair->src_kind;
- ctx->notify_func2(ctx->notify_baton2, notify, pool);
+ /* ### Maybe the notification should mention this mergeinfo change. */
}
return SVN_NO_ERROR;
Modified: subversion/trunk/subversion/tests/cmdline/copy_tests.py
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/copy_tests.py?rev=1847206&r1=1847205&r2=1847206&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/copy_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/copy_tests.py Thu Nov 22 21:02:33
2018
@@ -3808,70 +3808,49 @@ def URI_encoded_repos_to_wc(sbox):
expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
expected_disk = svntest.main.greek_state.copy()
+ def path_join(head, tail):
+ if not head: return tail
+ if not tail: return head
+ return head + '/' + tail
+
+ def greek_file_item(path):
+ if path[-1:].islower():
+ basename = re.sub('.*/', '', path)
+ return Item("This is the file '" + basename + "'.\n")
+ return Item()
+
+ A_paths = [
+ "",
+ "B",
+ "B/lambda",
+ "B/E",
+ "B/E/alpha",
+ "B/E/beta",
+ "B/F",
+ "mu",
+ "C",
+ "D",
+ "D/gamma",
+ "D/G",
+ "D/G/pi",
+ "D/G/rho",
+ "D/G/tau",
+ "D/H",
+ "D/H/chi",
+ "D/H/omega",
+ "D/H/psi",
+ ]
+
def copy_URL_to_WC(URL_rel_path, dest_name, rev):
- lines = [
- "A " + os.path.join(wc_dir, dest_name, "B") + "\n",
- "A " + os.path.join(wc_dir, dest_name, "B", "lambda") + "\n",
- "A " + os.path.join(wc_dir, dest_name, "B", "E") + "\n",
- "A " + os.path.join(wc_dir, dest_name, "B", "E", "alpha") + "\n",
- "A " + os.path.join(wc_dir, dest_name, "B", "E", "beta") + "\n",
- "A " + os.path.join(wc_dir, dest_name, "B", "F") + "\n",
- "A " + os.path.join(wc_dir, dest_name, "mu") + "\n",
- "A " + os.path.join(wc_dir, dest_name, "C") + "\n",
- "A " + os.path.join(wc_dir, dest_name, "D") + "\n",
- "A " + os.path.join(wc_dir, dest_name, "D", "gamma") + "\n",
- "A " + os.path.join(wc_dir, dest_name, "D", "G") + "\n",
- "A " + os.path.join(wc_dir, dest_name, "D", "G", "pi") + "\n",
- "A " + os.path.join(wc_dir, dest_name, "D", "G", "rho") + "\n",
- "A " + os.path.join(wc_dir, dest_name, "D", "G", "tau") + "\n",
- "A " + os.path.join(wc_dir, dest_name, "D", "H") + "\n",
- "A " + os.path.join(wc_dir, dest_name, "D", "H", "chi") + "\n",
- "A " + os.path.join(wc_dir, dest_name, "D", "H", "omega") + "\n",
- "A " + os.path.join(wc_dir, dest_name, "D", "H", "psi") + "\n",
- "Checked out revision " + str(rev - 1) + ".\n",
- "A " + os.path.join(wc_dir, dest_name) + "\n"]
- expected = svntest.verify.UnorderedOutput(lines)
- expected_status.add({
- dest_name + "/B" : Item(status=' ', wc_rev=rev),
- dest_name + "/B/lambda" : Item(status=' ', wc_rev=rev),
- dest_name + "/B/E" : Item(status=' ', wc_rev=rev),
- dest_name + "/B/E/alpha" : Item(status=' ', wc_rev=rev),
- dest_name + "/B/E/beta" : Item(status=' ', wc_rev=rev),
- dest_name + "/B/F" : Item(status=' ', wc_rev=rev),
- dest_name + "/mu" : Item(status=' ', wc_rev=rev),
- dest_name + "/C" : Item(status=' ', wc_rev=rev),
- dest_name + "/D" : Item(status=' ', wc_rev=rev),
- dest_name + "/D/gamma" : Item(status=' ', wc_rev=rev),
- dest_name + "/D/G" : Item(status=' ', wc_rev=rev),
- dest_name + "/D/G/pi" : Item(status=' ', wc_rev=rev),
- dest_name + "/D/G/rho" : Item(status=' ', wc_rev=rev),
- dest_name + "/D/G/tau" : Item(status=' ', wc_rev=rev),
- dest_name + "/D/H" : Item(status=' ', wc_rev=rev),
- dest_name + "/D/H/chi" : Item(status=' ', wc_rev=rev),
- dest_name + "/D/H/omega" : Item(status=' ', wc_rev=rev),
- dest_name + "/D/H/psi" : Item(status=' ', wc_rev=rev),
- dest_name : Item(status=' ', wc_rev=rev)})
- expected_disk.add({
- dest_name : Item(props={}),
- dest_name + '/B' : Item(),
- dest_name + '/B/lambda' : Item("This is the file 'lambda'.\n"),
- dest_name + '/B/E' : Item(),
- dest_name + '/B/E/alpha' : Item("This is the file 'alpha'.\n"),
- dest_name + '/B/E/beta' : Item("This is the file 'beta'.\n"),
- dest_name + '/B/F' : Item(),
- dest_name + '/mu' : Item("This is the file 'mu'.\n"),
- dest_name + '/C' : Item(),
- dest_name + '/D' : Item(),
- dest_name + '/D/gamma' : Item("This is the file 'gamma'.\n"),
- dest_name + '/D/G' : Item(),
- dest_name + '/D/G/pi' : Item("This is the file 'pi'.\n"),
- dest_name + '/D/G/rho' : Item("This is the file 'rho'.\n"),
- dest_name + '/D/G/tau' : Item("This is the file 'tau'.\n"),
- dest_name + '/D/H' : Item(),
- dest_name + '/D/H/chi' : Item("This is the file 'chi'.\n"),
- dest_name + '/D/H/omega' : Item("This is the file 'omega'.\n"),
- dest_name + '/D/H/psi' : Item("This is the file 'psi'.\n"),
- })
+ expected = svntest.verify.UnorderedOutput(
+ [ "A " + sbox.ospath(path_join(dest_name, p)) + "\n"
+ for p in A_paths ])
+ expected_status.add(
+ { path_join(dest_name, p) : Item(status=' ', wc_rev=rev)
+ for p in A_paths })
+ expected_disk.add(
+ { path_join(dest_name, p) : greek_file_item(p)
+ for p in A_paths })
# Make a copy
svntest.actions.run_and_verify_svn(expected, [],
Modified: subversion/trunk/subversion/tests/cmdline/externals_tests.py
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/externals_tests.py?rev=1847206&r1=1847205&r2=1847206&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/externals_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/externals_tests.py Thu Nov 22
21:02:33 2018
@@ -2946,16 +2946,13 @@ def url_to_wc_copy_of_externals(sbox):
external_tau_path = os.path.join(wc_dir, "External-WC-to-URL-Copy",
"external", "tau")
expected_stdout = verify.UnorderedOutput([
- " U " + external_root_path + "\n",
+ "A " + external_root_path + "\n",
"\n",
"Fetching external item into '" + external_ex_path + "':\n",
- "A " + external_pi_path + "\n",
- "A " + external_rho_path + "\n",
- "A " + external_tau_path + "\n",
- "Checked out external at revision 2.\n",
- "\n",
- "Checked out revision 2.\n",
- "A " + external_root_path + "\n"
+ "A " + external_ex_path + "\n",
+ "A " + external_pi_path + "\n",
+ "A " + external_rho_path + "\n",
+ "A " + external_tau_path + "\n",
])
exit_code, stdout, stderr = svntest.actions.run_and_verify_svn2(
expected_stdout, [], 0, 'copy', repo_url + '/A/C',
Modified: subversion/trunk/subversion/tests/cmdline/merge_tests.py
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/merge_tests.py?rev=1847206&r1=1847205&r2=1847206&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/merge_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/merge_tests.py Thu Nov 22
21:02:33 2018
@@ -4966,11 +4966,11 @@ def merge_to_switched_path(sbox):
A_COPY_D_G_rho_path = sbox.ospath('A_COPY/D/G/rho')
expected = svntest.verify.UnorderedOutput(
- ["A " + os.path.join(G_COPY_path, "pi") + "\n",
- "A " + os.path.join(G_COPY_path, "rho") + "\n",
- "A " + os.path.join(G_COPY_path, "tau") + "\n",
- "Checked out revision 6.\n",
- "A " + G_COPY_path + "\n"])
+ ["A " + G_COPY_path + "\n",
+ "A " + os.path.join(G_COPY_path, "pi") + "\n",
+ "A " + os.path.join(G_COPY_path, "rho") + "\n",
+ "A " + os.path.join(G_COPY_path, "tau") + "\n",
+ ])
# r7 - Copy A/D/G to A/D/G_COPY and commit.
svntest.actions.run_and_verify_svn(expected, [], 'copy',
@@ -12848,6 +12848,39 @@ def natural_history_filtering(sbox):
# the revisions on 'trunk' which occurred after 'branch2' was copied as
# these are not part of 'branch2's natural history.
+ def path_join(head, tail):
+ if not head: return tail
+ if not tail: return head
+ return head + '/' + tail
+
+ def greek_file_item(path):
+ if path[-1:].islower():
+ basename = re.sub('.*/', '', path)
+ return Item("This is the file '" + basename + "'.\n")
+ return Item()
+
+ A_paths = [
+ "",
+ "B",
+ "B/lambda",
+ "B/E",
+ "B/E/alpha",
+ "B/E/beta",
+ "B/F",
+ "mu",
+ "C",
+ "D",
+ "D/gamma",
+ "D/G",
+ "D/G/pi",
+ "D/G/rho",
+ "D/G/tau",
+ "D/H",
+ "D/H/chi",
+ "D/H/omega",
+ "D/H/psi",
+ ]
+
sbox.build()
wc_dir = sbox.wc_dir
@@ -12861,68 +12894,16 @@ def natural_history_filtering(sbox):
# r7: Make a second 'branch': Copy A to A_COPY_2
expected = svntest.verify.UnorderedOutput(
- ["A " + os.path.join(A_COPY_2_path, "B") + "\n",
- "A " + os.path.join(A_COPY_2_path, "B", "lambda") + "\n",
- "A " + os.path.join(A_COPY_2_path, "B", "E") + "\n",
- "A " + os.path.join(A_COPY_2_path, "B", "E", "alpha") + "\n",
- "A " + os.path.join(A_COPY_2_path, "B", "E", "beta") + "\n",
- "A " + os.path.join(A_COPY_2_path, "B", "F") + "\n",
- "A " + os.path.join(A_COPY_2_path, "mu") + "\n",
- "A " + os.path.join(A_COPY_2_path, "C") + "\n",
- "A " + os.path.join(A_COPY_2_path, "D") + "\n",
- "A " + os.path.join(A_COPY_2_path, "D", "gamma") + "\n",
- "A " + os.path.join(A_COPY_2_path, "D", "G") + "\n",
- "A " + os.path.join(A_COPY_2_path, "D", "G", "pi") + "\n",
- "A " + os.path.join(A_COPY_2_path, "D", "G", "rho") + "\n",
- "A " + os.path.join(A_COPY_2_path, "D", "G", "tau") + "\n",
- "A " + os.path.join(A_COPY_2_path, "D", "H") + "\n",
- "A " + os.path.join(A_COPY_2_path, "D", "H", "chi") + "\n",
- "A " + os.path.join(A_COPY_2_path, "D", "H", "omega") + "\n",
- "A " + os.path.join(A_COPY_2_path, "D", "H", "psi") + "\n",
- "Checked out revision 6.\n",
- "A " + A_COPY_2_path + "\n"])
- wc_status.add({
- "A_COPY_2" + "/B" : Item(status=' ', wc_rev=7),
- "A_COPY_2" + "/B/lambda" : Item(status=' ', wc_rev=7),
- "A_COPY_2" + "/B/E" : Item(status=' ', wc_rev=7),
- "A_COPY_2" + "/B/E/alpha" : Item(status=' ', wc_rev=7),
- "A_COPY_2" + "/B/E/beta" : Item(status=' ', wc_rev=7),
- "A_COPY_2" + "/B/F" : Item(status=' ', wc_rev=7),
- "A_COPY_2" + "/mu" : Item(status=' ', wc_rev=7),
- "A_COPY_2" + "/C" : Item(status=' ', wc_rev=7),
- "A_COPY_2" + "/D" : Item(status=' ', wc_rev=7),
- "A_COPY_2" + "/D/gamma" : Item(status=' ', wc_rev=7),
- "A_COPY_2" + "/D/G" : Item(status=' ', wc_rev=7),
- "A_COPY_2" + "/D/G/pi" : Item(status=' ', wc_rev=7),
- "A_COPY_2" + "/D/G/rho" : Item(status=' ', wc_rev=7),
- "A_COPY_2" + "/D/G/tau" : Item(status=' ', wc_rev=7),
- "A_COPY_2" + "/D/H" : Item(status=' ', wc_rev=7),
- "A_COPY_2" + "/D/H/chi" : Item(status=' ', wc_rev=7),
- "A_COPY_2" + "/D/H/omega" : Item(status=' ', wc_rev=7),
- "A_COPY_2" + "/D/H/psi" : Item(status=' ', wc_rev=7),
- "A_COPY_2" : Item(status=' ', wc_rev=7),
- })
- wc_disk.add({
- "A_COPY_2" : Item(),
- "A_COPY_2" + '/B' : Item(),
- "A_COPY_2" + '/B/lambda' : Item("This is the file 'lambda'.\n"),
- "A_COPY_2" + '/B/E' : Item(),
- "A_COPY_2" + '/B/E/alpha' : Item("This is the file 'alpha'.\n"),
- "A_COPY_2" + '/B/E/beta' : Item("New content"),
- "A_COPY_2" + '/B/F' : Item(),
- "A_COPY_2" + '/mu' : Item("This is the file 'mu'.\n"),
- "A_COPY_2" + '/C' : Item(),
- "A_COPY_2" + '/D' : Item(),
- "A_COPY_2" + '/D/gamma' : Item("This is the file 'gamma'.\n"),
- "A_COPY_2" + '/D/G' : Item(),
- "A_COPY_2" + '/D/G/pi' : Item("This is the file 'pi'.\n"),
- "A_COPY_2" + '/D/G/rho' : Item("New content"),
- "A_COPY_2" + '/D/G/tau' : Item("This is the file 'tau'.\n"),
- "A_COPY_2" + '/D/H' : Item(),
- "A_COPY_2" + '/D/H/chi' : Item("New content"),
- "A_COPY_2" + '/D/H/omega' : Item("This is the file 'omega'.\n"),
- "A_COPY_2" + '/D/H/psi' : Item("New content"),
- })
+ [ "A " + sbox.ospath(path_join("A_COPY_2", p)) + "\n"
+ for p in A_paths ])
+ wc_status.add(
+ { path_join("A_COPY_2", p) : Item(status=' ', wc_rev=7)
+ for p in A_paths })
+ wc_disk.add(
+ { path_join("A_COPY_2", p) :
+ Item("New content") if p in ['B/E/beta', 'D/G/rho', 'D/H/chi',
'D/H/psi']
+ else greek_file_item(p)
+ for p in A_paths })
svntest.actions.run_and_verify_svn(expected, [], 'copy',
sbox.repo_url + "/A",
A_COPY_2_path)
Modified: subversion/trunk/subversion/tests/cmdline/svntest/mergetrees.py
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/svntest/mergetrees.py?rev=1847206&r1=1847205&r2=1847206&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/svntest/mergetrees.py (original)
+++ subversion/trunk/subversion/tests/cmdline/svntest/mergetrees.py Thu Nov 22
21:02:33 2018
@@ -253,69 +253,48 @@ def set_up_branch(sbox, branch_only = Fa
expected_status = actions.get_virginal_state(wc_dir, 1)
expected_disk = main.greek_state.copy()
+ def path_join(head, tail):
+ if not head: return tail
+ if not tail: return head
+ return head + '/' + tail
+
+ def greek_file_item(path):
+ if path[-1:].islower():
+ basename = re.sub('.*/', '', path)
+ return Item("This is the file '" + basename + "'.\n")
+ return Item()
+
+ A_paths = [
+ "",
+ "B",
+ "B/lambda",
+ "B/E",
+ "B/E/alpha",
+ "B/E/beta",
+ "B/F",
+ "mu",
+ "C",
+ "D",
+ "D/gamma",
+ "D/G",
+ "D/G/pi",
+ "D/G/rho",
+ "D/G/tau",
+ "D/H",
+ "D/H/chi",
+ "D/H/omega",
+ "D/H/psi",
+ ]
def copy_A(dest_name, rev):
expected = verify.UnorderedOutput(
- ["A " + os.path.join(wc_dir, dest_name, "B") + "\n",
- "A " + os.path.join(wc_dir, dest_name, "B", "lambda") + "\n",
- "A " + os.path.join(wc_dir, dest_name, "B", "E") + "\n",
- "A " + os.path.join(wc_dir, dest_name, "B", "E", "alpha") + "\n",
- "A " + os.path.join(wc_dir, dest_name, "B", "E", "beta") + "\n",
- "A " + os.path.join(wc_dir, dest_name, "B", "F") + "\n",
- "A " + os.path.join(wc_dir, dest_name, "mu") + "\n",
- "A " + os.path.join(wc_dir, dest_name, "C") + "\n",
- "A " + os.path.join(wc_dir, dest_name, "D") + "\n",
- "A " + os.path.join(wc_dir, dest_name, "D", "gamma") + "\n",
- "A " + os.path.join(wc_dir, dest_name, "D", "G") + "\n",
- "A " + os.path.join(wc_dir, dest_name, "D", "G", "pi") + "\n",
- "A " + os.path.join(wc_dir, dest_name, "D", "G", "rho") + "\n",
- "A " + os.path.join(wc_dir, dest_name, "D", "G", "tau") + "\n",
- "A " + os.path.join(wc_dir, dest_name, "D", "H") + "\n",
- "A " + os.path.join(wc_dir, dest_name, "D", "H", "chi") + "\n",
- "A " + os.path.join(wc_dir, dest_name, "D", "H", "omega") + "\n",
- "A " + os.path.join(wc_dir, dest_name, "D", "H", "psi") + "\n",
- "Checked out revision " + str(rev - 1) + ".\n",
- "A " + os.path.join(wc_dir, dest_name) + "\n"])
- expected_status.add({
- dest_name + "/B" : Item(status=' ', wc_rev=rev),
- dest_name + "/B/lambda" : Item(status=' ', wc_rev=rev),
- dest_name + "/B/E" : Item(status=' ', wc_rev=rev),
- dest_name + "/B/E/alpha" : Item(status=' ', wc_rev=rev),
- dest_name + "/B/E/beta" : Item(status=' ', wc_rev=rev),
- dest_name + "/B/F" : Item(status=' ', wc_rev=rev),
- dest_name + "/mu" : Item(status=' ', wc_rev=rev),
- dest_name + "/C" : Item(status=' ', wc_rev=rev),
- dest_name + "/D" : Item(status=' ', wc_rev=rev),
- dest_name + "/D/gamma" : Item(status=' ', wc_rev=rev),
- dest_name + "/D/G" : Item(status=' ', wc_rev=rev),
- dest_name + "/D/G/pi" : Item(status=' ', wc_rev=rev),
- dest_name + "/D/G/rho" : Item(status=' ', wc_rev=rev),
- dest_name + "/D/G/tau" : Item(status=' ', wc_rev=rev),
- dest_name + "/D/H" : Item(status=' ', wc_rev=rev),
- dest_name + "/D/H/chi" : Item(status=' ', wc_rev=rev),
- dest_name + "/D/H/omega" : Item(status=' ', wc_rev=rev),
- dest_name + "/D/H/psi" : Item(status=' ', wc_rev=rev),
- dest_name : Item(status=' ', wc_rev=rev)})
- expected_disk.add({
- dest_name : Item(),
- dest_name + '/B' : Item(),
- dest_name + '/B/lambda' : Item("This is the file 'lambda'.\n"),
- dest_name + '/B/E' : Item(),
- dest_name + '/B/E/alpha' : Item("This is the file 'alpha'.\n"),
- dest_name + '/B/E/beta' : Item("This is the file 'beta'.\n"),
- dest_name + '/B/F' : Item(),
- dest_name + '/mu' : Item("This is the file 'mu'.\n"),
- dest_name + '/C' : Item(),
- dest_name + '/D' : Item(),
- dest_name + '/D/gamma' : Item("This is the file 'gamma'.\n"),
- dest_name + '/D/G' : Item(),
- dest_name + '/D/G/pi' : Item("This is the file 'pi'.\n"),
- dest_name + '/D/G/rho' : Item("This is the file 'rho'.\n"),
- dest_name + '/D/G/tau' : Item("This is the file 'tau'.\n"),
- dest_name + '/D/H' : Item(),
- dest_name + '/D/H/chi' : Item("This is the file 'chi'.\n"),
- dest_name + '/D/H/omega' : Item("This is the file 'omega'.\n"),
- dest_name + '/D/H/psi' : Item("This is the file 'psi'.\n"),
- })
+ [ "A " + sbox.ospath(path_join(dest_name, p)) + "\n"
+ for p in A_paths ])
+ expected_status.add(
+ { path_join(dest_name, p) : Item(status=' ', wc_rev=rev)
+ for p in A_paths })
+ expected_disk.add(
+ { path_join(dest_name, p) : greek_file_item(p)
+ for p in A_paths })
# Make a branch A_COPY to merge into.
actions.run_and_verify_svn(expected, [], 'copy',
Modified: subversion/trunk/subversion/tests/cmdline/switch_tests.py
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/switch_tests.py?rev=1847206&r1=1847205&r2=1847206&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/switch_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/switch_tests.py Thu Nov 22
21:02:33 2018
@@ -1336,25 +1336,23 @@ def mergeinfo_switch_elision(sbox):
# Make branches A/B_COPY_1 and A/B_COPY_2
expected_stdout = verify.UnorderedOutput([
- "A " + sbox.ospath('A/B_COPY_1/lambda') + "\n",
- "A " + sbox.ospath('A/B_COPY_1/E') + "\n",
- "A " + sbox.ospath('A/B_COPY_1/E/alpha') + "\n",
- "A " + sbox.ospath('A/B_COPY_1/E/beta') + "\n",
- "A " + sbox.ospath('A/B_COPY_1/F') + "\n",
- "Checked out revision 1.\n",
"A " + B_COPY_1_path + "\n",
+ "A " + sbox.ospath('A/B_COPY_1/lambda') + "\n",
+ "A " + sbox.ospath('A/B_COPY_1/E') + "\n",
+ "A " + sbox.ospath('A/B_COPY_1/E/alpha') + "\n",
+ "A " + sbox.ospath('A/B_COPY_1/E/beta') + "\n",
+ "A " + sbox.ospath('A/B_COPY_1/F') + "\n",
])
svntest.actions.run_and_verify_svn(expected_stdout, [], 'copy',
sbox.repo_url + "/A/B", B_COPY_1_path)
expected_stdout = verify.UnorderedOutput([
- "A " + sbox.ospath('A/B_COPY_2/lambda') + "\n",
- "A " + sbox.ospath('A/B_COPY_2/E') + "\n",
- "A " + sbox.ospath('A/B_COPY_2/E/alpha') + "\n",
- "A " + sbox.ospath('A/B_COPY_2/E/beta') + "\n",
- "A " + sbox.ospath('A/B_COPY_2/F') + "\n",
- "Checked out revision 1.\n",
"A " + B_COPY_2_path + "\n",
+ "A " + sbox.ospath('A/B_COPY_2/lambda') + "\n",
+ "A " + sbox.ospath('A/B_COPY_2/E') + "\n",
+ "A " + sbox.ospath('A/B_COPY_2/E/alpha') + "\n",
+ "A " + sbox.ospath('A/B_COPY_2/E/beta') + "\n",
+ "A " + sbox.ospath('A/B_COPY_2/F') + "\n",
])
svntest.actions.run_and_verify_svn(expected_stdout, [], 'copy',
sbox.repo_url + "/A/B", B_COPY_2_path)
Modified: subversion/trunk/subversion/tests/cmdline/update_tests.py
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/update_tests.py?rev=1847206&r1=1847205&r2=1847206&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/update_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/update_tests.py Thu Nov 22
21:02:33 2018
@@ -3046,13 +3046,12 @@ def mergeinfo_update_elision(sbox):
# Make a branch A/B_COPY
expected_stdout = verify.UnorderedOutput([
- "A " + sbox.ospath('A/B_COPY/lambda') + "\n",
- "A " + sbox.ospath('A/B_COPY/E') + "\n",
- "A " + sbox.ospath('A/B_COPY/E/alpha') + "\n",
- "A " + sbox.ospath('A/B_COPY/E/beta') + "\n",
- "A " + sbox.ospath('A/B_COPY/F') + "\n",
- "Checked out revision 1.\n",
"A " + B_COPY_path + "\n",
+ "A " + sbox.ospath('A/B_COPY/lambda') + "\n",
+ "A " + sbox.ospath('A/B_COPY/E') + "\n",
+ "A " + sbox.ospath('A/B_COPY/E/alpha') + "\n",
+ "A " + sbox.ospath('A/B_COPY/E/beta') + "\n",
+ "A " + sbox.ospath('A/B_COPY/F') + "\n",
])
svntest.actions.run_and_verify_svn(expected_stdout, [], 'copy',
sbox.repo_url + "/A/B", B_COPY_path)