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

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

From: David Glasser <glasser_at_davidglasser.net>
Date: 2007-10-12 03:42:43 CEST

On 10/11/07, sussman@tigris.org <sussman@tigris.org> wrote:
> Author: sussman
> Date: Thu Oct 11 09:43:12 2007
> New Revision: 27110
>
> Log:
> One more test for issue 503 (copy-on-update).
>
> * subversion/tests/cmdline/update_tests.py
> (update_handles_copyfrom_with_txdeltas): one more new test.
>
> Modified:
> trunk/subversion/tests/cmdline/update_tests.py
>
> Modified: trunk/subversion/tests/cmdline/update_tests.py
> URL: http://svn.collab.net/viewvc/svn/trunk/subversion/tests/cmdline/update_tests.py?pathrev=27110&r1=27109&r2=27110
> ==============================================================================
> --- trunk/subversion/tests/cmdline/update_tests.py (original)
> +++ trunk/subversion/tests/cmdline/update_tests.py Thu Oct 11 09:43:12 2007
> @@ -3335,6 +3335,83 @@
> expected_status)
>
> #----------------------------------------------------------------------
> +# If the update editor receives add_file(foo, copyfrom='blah'), it
> +# should attempt to locate 'blah' in the wc, and then copy it into
> +# place. Furthermore, the new file should be able to receive
> +# subsequent txdeltas coming from the server.
> +
> +def update_handles_copyfrom_with_txdeltas(sbox):
> + "update uses copyfrom & accepts further txdeltas"
> +
> + sbox.build()
> + wc_dir = sbox.wc_dir
> +
> + # Make a backup copy of the working copy.
> + wc_backup = sbox.add_wc_path('backup')
> + svntest.actions.duplicate_dir(wc_dir, wc_backup)
> +
> + # Copy 'rho' to 'glub'
> + rho_path = os.path.join(wc_dir, 'A', 'D', 'G', 'rho')
> + glub_path = os.path.join(wc_dir, 'A', 'D', 'G', 'glub')
> + svntest.actions.run_and_verify_svn(None, None, [],
> + 'copy', rho_path, glub_path)
> +
> + # Commit that change, creating r2.
> + expected_output = svntest.wc.State(wc_dir, {
> + 'A/D/G/glub' : Item(verb='Adding'),
> + })
> + expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
> + expected_status.add({
> + 'A/D/G/glub' : Item(status=' ', wc_rev=2),
> + })
> + svntest.actions.run_and_verify_commit(wc_dir, expected_output,
> + expected_status, None,
> + None, None, None, None, wc_dir)
> +
> + # Make additional edits to glub...
> + svntest.main.file_append(glub_path, "Some new text.\n")
> + svntest.main.run_svn(None, 'propset', 'Kubla', 'Khan', glub_path)
> +
> + # Commit the changes, creating r3.
> + expected_output = svntest.wc.State(wc_dir, {
> + 'A/D/G/glub' : Item(verb='Sending'),
> + })
> + expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
> + expected_status.add({
> + 'A/D/G/glub' : Item(status=' ', wc_rev=3),
> + })
> + svntest.actions.run_and_verify_commit(wc_dir, expected_output,
> + expected_status, None,
> + None, None, None, None, wc_dir)
> +
> + # Now try updating our backup working copy: it should receive glub,
> + # but with copyfrom args of rho@1, and thus copy the existing rho to
> + # glub. Furthermore, it should then apply the extra r3 edits to the
> + # copied file.

So, you don't actually modify the backup version of it, so while this
test ensures that svn up is not broken in general, it's
indistinguishable from the server not sending copyfroms. (And in fact
it passes against a 1.4 server, unlike r37.)

> +
> + expected_output = svntest.wc.State(wc_backup, { })
> + expected_output = wc.State(wc_backup, {
> + 'A/D/G/glub' : Item(status='A '), ### perhaps update should show 'A +' ??
> + })
> +
> + expected_disk = svntest.main.greek_state.copy()
> + expected_disk.add({
> + 'A/D/G/glub' : Item("This is the file 'rho'.\nSome new text.\n",
> + props={'Kubla' : 'Khan', 'svn:mergeinfo' : ''})
> + })
> +
> + expected_status = svntest.actions.get_virginal_state(wc_backup, 3)
> + expected_status.add({
> + 'A/D/G/glub' : Item(status=' ', wc_rev=3),
> + })
> + svntest.actions.run_and_verify_update(wc_backup,
> + expected_output,
> + expected_disk,
> + expected_status,
> + check_props = True)
> +
> +
> +#----------------------------------------------------------------------
>
>
> def update_accept_conflicts(sbox):
> @@ -3589,6 +3666,7 @@
> mergeinfo_update_elision,
> update_handles_copyfrom,
> copyfrom_degrades_gracefully,
> + update_handles_copyfrom_with_txdeltas,
> update_accept_conflicts,
> ]
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: svn-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: svn-help@subversion.tigris.org
>
>

-- 
David Glasser | glasser_at_davidglasser.net | http://www.davidglasser.net/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Oct 12 03:42:56 2007

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