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

Re: svn commit: r31987 - in branches/issue-2843-dev/subversion: libsvn_wc tests/cmdline

From: Karl Fogel <kfogel_at_red-bean.com>
Date: Mon, 07 Jul 2008 15:09:37 -0400

firemeteor_at_tigris.org writes:
> Log:
> On the issue-2843-dev branch.
>
> Fix copying excluded items.
>
> * subversion/libsvn_wc/copy.c
> (post_copy_cleanup): Skip excluded entry.
>
> * subversion/tests/cmdline/depth_tests.py
> (excluded_path_operation): Add copy test.
>
> --- branches/issue-2843-dev/subversion/libsvn_wc/copy.c (r31986)
> +++ branches/issue-2843-dev/subversion/libsvn_wc/copy.c (r31987)
> @@ -559,12 +559,14 @@ post_copy_cleanup(svn_wc_adm_access_t *a
>
> svn_pool_clear(subpool);
>
> - /* TODO(#2843) Check if we need to handle exclude here. Possibly not. */
> apr_hash_this(hi, &key, NULL, &val);
> entry = val;
> kind = entry->kind;
> deleted = entry->deleted;
>
> + if (entry->depth == svn_depth_exclude)
> + continue;
> +
> /* Convert deleted="true" into schedule="delete" for all
> children (and grandchildren, if RECURSE is set) of the path
> represented by ADM_ACCESS. The result of this is that when

What if a child has both entry->deleted==TRUE and
entry->depth==svn_depth_exclude? Or is that supposed to be impossible?

Also, in the test change below...

> --- branches/issue-2843-dev/subversion/tests/cmdline/depth_tests.py (r31986)
> +++ branches/issue-2843-dev/subversion/tests/cmdline/depth_tests.py (r31987)
> @@ -2034,6 +2034,7 @@ def excluded_path_operation(sbox):
> infinity=True)
> A_path = os.path.join(wc_dir, 'A')
> B_path = os.path.join(A_path, 'B')
> + L_path = os.path.join(A_path, 'L')
> E_path = os.path.join(B_path, 'E')
>
> # Simply exclude a subtree
> @@ -2077,6 +2078,19 @@ def excluded_path_operation(sbox):
> svntest.actions.run_and_verify_svn(None, None, [],
> 'up', '--set-depth', 'exclude', E_path)
>
> + # copy A/B to A/L
> + expected_output = ['A '+L_path+'\n']
> + svntest.actions.run_and_verify_svn(None, expected_output, [],
> + 'cp', B_path, L_path)
> +
> + # revert A/L
> + expected_output = ["Reverted '"+L_path+"'\n"]
> + svntest.actions.run_and_verify_svn(None, expected_output, [],
> + 'revert', '--depth=infinity', L_path)
> +
> + svntest.actions.run_and_verify_svn(None, None, [],
> + 'rm', '--force', L_path)
> +
> # Exclude path B totally, in which contains an excluded subtree.
> expected_output = svntest.wc.State(wc_dir, {
> 'A/B' : Item(status='D '),

...it might be good to add a comment about what is being tested for in
this new code.

-Karl

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org
Received on 2008-07-07 21:09:51 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.