[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn commit: r29434 - trunk/subversion/tests/cmdline

From: David Glasser <glasser_at_davidglasser.net>
Date: Tue, 20 May 2008 12:50:32 -0700

On Tue, Feb 19, 2008 at 11:19 AM, <kfogel_at_tigris.org> wrote:
> Author: kfogel
> Date: Tue Feb 19 10:19:49 2008
> New Revision: 29434
>
> Log:
> Add a regression test for what remains of issue #2986: we sometimes
> choose the wrong base file for copies, resulting in error.
>
> This just tests file content; we may extend to cover properties too.
> See http://subversion.tigris.org/issues/show_bug.cgi?id=2986#desc9.
>
> * subversion/tests/cmdline/copy_tests.py: Import shutil.
> (replaced_local_source_for_incoming_copy): New test.
> (test_list): Run it, XFail for now.
>
>
> Modified:
> trunk/subversion/tests/cmdline/copy_tests.py
>
> Modified: trunk/subversion/tests/cmdline/copy_tests.py
> URL: http://svn.collab.net/viewvc/svn/trunk/subversion/tests/cmdline/copy_tests.py?pathrev=29434&r1=29433&r2=29434
> ==============================================================================
> --- trunk/subversion/tests/cmdline/copy_tests.py (original)
> +++ trunk/subversion/tests/cmdline/copy_tests.py Tue Feb 19 10:19:49 2008
> @@ -17,7 +17,7 @@
> ######################################################################
>
> # General modules
> -import stat, os, re
> +import stat, os, re, shutil
>
> # Our testing module
> import svntest
> @@ -3721,6 +3721,39 @@
> copy_to_path)
>
>
> +#----------------------------------------------------------------------
> +# Issue #2986
> +def replaced_local_source_for_incoming_copy(sbox):
> + "update receives copy, but local source is replaced"
> + sbox.build(read_only = True)

This read_only=True means "I'm not going to commit to the repository".

> + wc_dir = sbox.wc_dir
> + other_wc_dir = wc_dir + '-other'
> + tau_path = os.path.join(wc_dir, 'A', 'D', 'G', 'tau')
> + rho_url = sbox.repo_url + '/A/D/G/rho'
> + pi_url = sbox.repo_url + '/A/D/G/pi'
> + other_rho_path = os.path.join(other_wc_dir, 'A', 'D', 'G', 'rho')
> +
> + # Make the duplicate working copy.
> + shutil.copytree(wc_dir, other_wc_dir)
> +
> + # Commit a replacement from the first working copy.
> + svntest.actions.run_and_verify_svn(None, None, [], 'rm',
> + tau_path);
> + svntest.actions.run_and_verify_svn(None, None, [], 'cp',
> + rho_url, tau_path);
> + svntest.actions.run_and_verify_svn(None, None, [], 'ci',
> + '-m', 'copy rho to tau', wc_dir);

Oops!

Now the next test to run will fail. Yay non-local errors :) See r31317.

--dave

> +
> + # Now schedule a replacement in the second working copy, then update
> + # to receive the replacement from the first working copy, with the
> + # source being the now-scheduled-replace file.
> + svntest.actions.run_and_verify_svn(None, None, [], 'rm',
> + other_rho_path);
> + svntest.actions.run_and_verify_svn(None, None, [], 'cp',
> + pi_url, other_rho_path);
> + svntest.actions.run_and_verify_svn(None, None, [], 'up',
> + other_wc_dir)
> +
> ########################################################################
> # Run the tests
>
> @@ -3796,6 +3829,7 @@
> copy_make_parents_repo_repo,
> URI_encoded_repos_to_wc,
> allow_unversioned_parent_for_copy_src,
> + XFail(replaced_local_source_for_incoming_copy),
> ]
>
> if __name__ == '__main__':
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: svn-unsubscribe_at_subversion.tigris.org
> For additional commands, e-mail: svn-help_at_subversion.tigris.org
>
>

-- 
David Glasser | glasser@davidglasser.net | http://www.davidglasser.net/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org
Received on 2008-05-20 21:50:48 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.