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

Re: [PATCH] simple optimization and new test case for 'svn cp URL wc'

From: Daniel Rall <dlr_at_collab.net>
Date: 2006-08-09 19:25:06 CEST

On Wed, 09 Aug 2006, Madan S. wrote:

> Hi,
>
> Please find attached a simple optimization that was possible in
> repos_to_wc_copy().

Nice one, Madan. I've committed this portion of your patch in r21027.

> Also, I almost broke a case trying one more optimization - Using
> svn_wc_adm_open3() instead of svn_wc_adm_probe_open3(). But the tests kept
> passing - of course, that case was not being tested by the respos_to_wc()
> test of copy tests. So, I added it.

Could you describe the test case? This is not enough context to
understand.

Thanks, Dan

...
> Index: subversion/tests/cmdline/copy_tests.py
> ===================================================================
> --- subversion/tests/cmdline/copy_tests.py (revision 21026)
> +++ subversion/tests/cmdline/copy_tests.py (working copy)
> @@ -1014,7 +1014,30 @@
> })
> svntest.actions.run_and_verify_status (wc_dir, expected_output)
>
> + # Revert everything and verify.
> + svntest.actions.run_and_verify_svn(None, None, [], 'revert', '-R', wc_dir)
> + expected_output = svntest.actions.get_virginal_state(wc_dir, 1)
>
> + # URL->wc copy:
> + # copy a directory to an already existing wc directory.
> + # The source directory should be copied *under* the target directory.
> + B_url = svntest.main.current_repo_url + "/A/B"
> + D_dir = os.path.join (wc_dir, 'A', 'D')
> +
> + svntest.actions.run_and_verify_svn(None, None, [],
> + 'copy', B_url, D_dir)
> +
> + expected_output = svntest.actions.get_virginal_state(wc_dir, 1)
> + expected_output.add({
> + 'A/D/B' : Item(status='A ', copied='+', wc_rev='-'),
> + 'A/D/B/lambda' : Item(status=' ', copied='+', wc_rev='-'),
> + 'A/D/B/E' : Item(status=' ', copied='+', wc_rev='-'),
> + 'A/D/B/E/beta' : Item(status=' ', copied='+', wc_rev='-'),
> + 'A/D/B/E/alpha' : Item(status=' ', copied='+', wc_rev='-'),
> + 'A/D/B/F' : Item(status=' ', copied='+', wc_rev='-'),
> + })
> + svntest.actions.run_and_verify_status (wc_dir, expected_output)
> +
> #----------------------------------------------------------------------
> # Issue 1084: ra_svn move/copy bug
>
...
> * subversion/tests/cmdline/copy_tests.py
> (repos_to_wc): Add case for copy to already existing directory.

  • application/pgp-signature attachment: stored
Received on Wed Aug 9 19:27:28 2006

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.