kfogel@tigris.org writes:
> Author: kfogel
> Date: Fri Nov 21 13:02:34 2003
> New Revision: 7825
>
> Modified:
> trunk/subversion/libsvn_wc/entries.c
> trunk/subversion/libsvn_wc/lock.c
> trunk/subversion/tests/clients/cmdline/schedule_tests.py
> Log:
> Fix issue #1609: 'svn status' thought replaced items were unversioned.
>
> * subversion/libsvn_wc/lock.c
> (prune_deleted, do_open): Check for svn_wc_schedule_replace, as well
> as svn_wc_schedule_add, when deciding whath to ignore.
The schedule replace versus schedule add stuff still appears to be a
bit confused, see below
> Modified: trunk/subversion/tests/clients/cmdline/schedule_tests.py
> ==============================================================================
> --- trunk/subversion/tests/clients/cmdline/schedule_tests.py (original)
> +++ trunk/subversion/tests/clients/cmdline/schedule_tests.py Fri Nov 21 13:02:34 2003
> @@ -585,6 +585,41 @@
> finally:
> os.chdir(was_cwd)
>
> +#----------------------------------------------------------------------
> +# Regression test for issue #1609:
> +# 'svn status' should show a schedule-replace directory as 'R' not '?'
> +
> +def status_replaced_directory(sbox):
> + "status on a replaced directory"
> +
> + sbox.build()
> + wc_dir = sbox.wc_dir
> +
> + # The original recipe:
Let's do a file as well as a directory
> + #
> + # svnadmin create repo
> + # svn mkdir file://`pwd`/repo/foo -m r1
svn import svn-config file://`pwd`/repo/bar -m r1x
> + # svn co file://`pwd`/repo wc
> + # svn rm wc/foo
> + # rm -rf wc/foo
svn rm wc/bar
> + # svn ci wc -m r2
> + # svn mkdir wc/foo
touch wc/bar
svn add wc/bar
> + A_path = os.path.join(wc_dir, 'A')
> + svntest.actions.run_and_verify_svn(None, None, [], 'rm', A_path)
> + shutil.rmtree(A_path)
> + svntest.actions.run_and_verify_svn(None, None, [],
> + 'ci', '-m', 'log msg', wc_dir)
> + svntest.actions.run_and_verify_svn(None, None, [], 'mkdir', A_path)
> +
> + # Now check that status says replaced.
> + expected_status = svntest.actions.get_virginal_state(wc_dir, 2)
> + expected_status.tweak(wc_rev=1)
> + expected_status.tweak('A', status='R ', wc_rev=0)
The directory shows up as status 'R' but the file shows up as status
'A'. I think they should be the same, but I don't know whether it
should be add or replace.
Next problem, if the "rm -rf wc/foo" step is omitted from the recipe
then the directory no longer shows up as status 'R' but instead shows
up as status 'A' just like the file. Again I think they should be the
same, but I don't know if add or replace is correct.
The final problem is really a separate issue. Whether the directory
is status 'R' or status 'A' running update causes both the file and
the directory to become unversioned. This is obviously a problem with
the update logic that removes entries in state deleted. I think what
should happen is that entries that are schedule add/replace should
remain but should have the deleted state cleared. Perhaps schedule
replace should be converted into schedule add as well.
--
Philip Martin
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Nov 22 00:40:34 2003