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

Re: [PATCH] incomplete-directories: depth_zero_bring_in_dir test

From: Karl Fogel <kfogel_at_google.com>
Date: 2006-10-10 23:09:34 CEST

Lieven Govaerts <lgo@mobsol.be> writes:
> Attached is an implementation of the depth_zero_bring_in_dir test for
> the incomplete-directories branch.
>
> The test consists of two parts, one that is passing and one that is
> failing. It fails when I try to do an 'svn update --depth 2' on the
> folder A that is a depth 0, because the descendants of A are not
> added.
>
> I'm not sure what's the problem here, is this part already implemented?
>
> Note: According to requirements there should be a depth:inf parameter,
> but the help text of update refers to depth=2.

Thanks for writing this test!

Yes, some of the functionality is not expected to work right now; I'm
basically implementing it along with the tests. And this test was
next on my list too. Did you see r21869? It's relevant to this test
because it provides a helper function that does a lot of the setup for
you...

Want to repost? I'll hold off on this test until hear from you.

Thanks for daring to enter the world of incomplete directories...

-Karl

> Lieven.
> Index: subversion/tests/cmdline/depth_tests.py
> ===================================================================
> --- subversion/tests/cmdline/depth_tests.py (revision 21872)
> +++ subversion/tests/cmdline/depth_tests.py (working copy)
> @@ -231,8 +231,57 @@
> def depth_zero_bring_in_dir(sbox):
> "bring a dir into a depth-0 working copy"
> # Run 'svn up A' to bring A permanently into the working copy.
> - raise svntest.Failure("<test not yet written>")
> +
> + sbox.build()
> + if os.path.exists(sbox.wc_dir):
> + svntest.main.safe_rmtree(sbox.wc_dir)
>
> + wc2 = sbox.wc_dir + '-2'
> + if os.path.exists(wc2):
> + svntest.main.safe_rmtree(wc2)
> +
> + svntest.actions.run_and_verify_svn("Unexpected error during co --depth 0",
> + SVNAnyOutput, [], "co",
> + "--depth", "0",
> + svntest.main.current_repo_url,
> + wc2)
> +
> + # Update A in the depth-0 wc2, expecting to receive only the A folder.
> + A_path = os.path.join(wc2, 'A')
> +
> + expected_output = svntest.wc.State(wc2,
> + { 'A' : Item(status='A ') })
> + expected_disk = svntest.wc.State('', { })
> + expected_disk.add(\
> + {'A' : Item(contents=None) } )
> +
> + expected_status = svntest.wc.State(wc2,
> + { '' : svntest.wc.StateItem() })
> + expected_status.tweak(contents=None, status=' ', wc_rev=1)
> + expected_status.add(\
> + {'A' : Item(status=' ', wc_rev=1) } )
> +
> + svntest.actions.run_and_verify_update(wc2,
> + expected_output,
> + expected_disk,
> + expected_status,
> + None, None,
> + None, None, None, None,
> + A_path)
> +
> + # is the next already expected to work??
> + expected_disk = svntest.main.greek_state.copy()
> + expected_disk.remove('iota')
> + expected_status = svntest.actions.get_virginal_state(wc2, 1)
> + expected_status.remove('iota')
> + svntest.actions.run_and_verify_update(A_path,
> + expected_output,
> + expected_disk,
> + expected_status,
> + None, None,
> + None, None, None, None,
> + '--depth', '2', A_path)
> +
> #----------------------------------------------------------------------
> def depth_one_bring_in_file(sbox):
> "bring a file into a depth-1 working copy"

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Oct 10 23:10:04 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.