Noorul Islam K M <noorul_at_collab.net> writes:
> Daniel Shahaf <d.s_at_daniel.shahaf.name> writes:
>
>> Noorul Islam K M wrote on Fri, Jan 28, 2011 at 12:27:46 +0530:
>>
>>> Daniel Shahaf <d.s_at_daniel.shahaf.name> writes:
>>>
>>> > Looks good, but I have a question:
>>> >
>>> > Noorul Islam K M wrote on Wed, Jan 26, 2011 at 13:12:54 +0530:
>>> >>
>>> >> Attached is the python test for issue 3013. This incorporates the steps
>>> >> from the shell script attached in the tracker.
>>> >>
>>> >> Log
>>> >> [[[
>>> >>
>>> >> New XFail test for issue 3013.
>>> >>
>>> >> * subversion/tests/cmdline/update_tests.py
>>> >> (update_after_switching_to_deleted_path, test_list): New XFail test
>>> >>
>>> >> Patch by: Noorul Islam K M <noorul{_AT_}collab.net>
>>> >> ]]]
>>> >>
>>> >> Thanks and Regards
>>> >> Noorul
>>> >>
>>> >
>>> >> Index: subversion/tests/cmdline/update_tests.py
>>> >> ===================================================================
>>> >> --- subversion/tests/cmdline/update_tests.py (revision 1063610)
>>> >> +++ subversion/tests/cmdline/update_tests.py (working copy)
>>> >> @@ -5347,6 +5347,34 @@
>>> >> svntest.main.run_svn(None, 'delete', os.path.join('A2', 'mu'))
>>> >> svntest.main.run_svn(None, 'update', os.path.join('A2', 'mu'))
>>> >>
>>> >> +### regression test for issue #3013
>>> >> +def update_after_switching_to_deleted_path(sbox):
>>> >> + "update after switching to deleted path"
>>> >> +
>>> >> + sbox.build()
>>> >> + wc_dir = sbox.wc_dir
>>> >> + repo_url = sbox.repo_url
>>> >> +
>>> >> + # switch to A/B
>>> >> + svntest.actions.run_and_verify_svn2(None, None, [], 0, 'switch',
>>> >> + repo_url + "/A/B", wc_dir)
>>> >> +
>>> >> + # delete A/D
>>> >> + svntest.actions.run_and_verify_svn2(None, None, [], 0, 'rm',
>>> >> + repo_url + "/A/D", '-m',
>>> >> + 'Remove A/D')
>>> >> +
>>> >> + # switch to A/D and this is known to fail
>>> >> + svntest.actions.run_and_verify_svn2(None, None, svntest.verify.AnyOutput,
>>> >> + 1, 'switch', repo_url + "/A/D", wc_dir)
>>> >> +
>>> >> + # switch to A/D_at_1 and this is known to succeed
>>> >> + svntest.actions.run_and_verify_svn2(None, None, [], 0, 'switch',
>>> >> + repo_url + "/A/D_at_1", wc_dir)
>>> >> +
>>> >> + # update should succeed
>>> >> + svntest.actions.run_and_verify_svn2(None, None, [], 0, "up", wc_dir)
>>> >> +
>>> >
>>> > Should this 'update' succeed? In my testing, updating the wc root to
>>> > a revision it does not exist in fails.
>>>
>>> "/A/D" @ revision 1 does exist. So update should succeed but it is
>>> failing. This is the issue.
>>>
>>
>> I think the issue is that the 'switch' is failing, nothing about the
>> update.
>>
>> But, in fact: both switch and update work as long as the directory
>> they're targetting is a wc subdir (as opposed to a wc root). Therefore,
>> I'm inclined to mark the issue as FIXED and adjust the test to test that
>> the switch works when the being-switched directory is not the wc root.
>>
>> Thoughts?
>>
>
> Pasting our conversation on IRC here.
>
> <noorul> danielsh_: The switch is known fail @HEAD and not @1 [12:48]
> <noorul> A/D is non-existent @HEAD and existent @1 hence first switch is known
> to fail and the second one to succeed
> <noorul> When the second one succeeds the subsequent update should update WC
> with repo_url_at_1 [12:49]
> <danielsh_> noorul: see mail, I think it's a different issue,
> <danielsh_> the switch actually works when you do 'svn sw $URL
> /path/to/wc/rootdir/some/subdir'
> <noorul> I think I correctly converted
> http://subversion.tigris.org/nonav/issues/showattachment.cgi/1157/3013.sh
> into a test [12:52]
> <danielsh_> yes
> <danielsh_> I think the 'update' shouldn't have been in the .sh script either
> btw [12:53]
> <danielsh_> but that's history
> <noorul> Before svn update if we use 'svn info' we could see that it is
> pointing to repo_url_at_1 [12:54]
> <noorul> Shouldn't svn up bring wc in sync with that revision?
> <noorul> A/D existing @1 the error message is misleading [12:55]
> <danielsh_> currently the 'up' fails iff the
> dir-being-updated-past-its-deletion is the wc root
> <danielsh_> I think that's sensible,
> <danielsh_> to error if the wcroot would have to be deleted,
> <danielsh_> but feel free to discuss that on dev@
> <danielsh_> re error messages: haven't checked whether they're misleading or
> not
> <danielsh_> haven't read them actually, just checked if the up succeeded or
> not and what rev it put me at
> <noorul> danielsh_: Do you mean to say that "svn up A/D" would succeed instead
> of "svn up ." [13:03]
> <danielsh_> noorul: svn rm ^/A/D; svn up A/D/; <-- succeeds [13:04]
> <danielsh_> noorul: svn co ^/A foo; cd foo; svn rm ^/A; svn up; <-- fails
> <danielsh_> that's current behaviour [13:05]
> <noorul> danielsh_: With respect to the test case [13:06]
> <noorul> I mean the test case that I submitted, do you think that svn up
> should succeed?
> <danielsh_> noorul: I think the 'svn up' doesn't belong in that test case, I
> think that issue is only about the 'switch'.
> <danielsh_> (that's my opinion; other devs may disagree with me)
>
Any updates on this?
Thanks and Regards
Noorul
Received on 2011-02-02 04:36:40 CET