On Tue, May 20, 2008 at 1:11 PM, Lieven Govaerts <svnlgo_at_mobsol.be> wrote:
> Daniel Shahaf wrote:
>>
>> David Glasser wrote on Tue, 20 May 2008 at 12:50 -0700:
>>>
>>> On Tue, Feb 19, 2008 at 11:19 AM, <kfogel_at_tigris.org> wrote:
>>>>
>>>> Author: kfogel
>>>> Date: Tue Feb 19 10:19:49 2008
>>>> New Revision: 29434
>>>>
>>>> Log:
>>>> Add a regression test for what remains of issue #2986: we sometimes
>>>> choose the wrong base file for copies, resulting in error.
>>>>
>>>> This just tests file content; we may extend to cover properties too.
>>>> See http://subversion.tigris.org/issues/show_bug.cgi?id=2986#desc9.
>>>>
>>>> * subversion/tests/cmdline/copy_tests.py: Import shutil.
>>>> (replaced_local_source_for_incoming_copy): New test.
>>>> (test_list): Run it, XFail for now.
>>>>
>>>>
>>>> Modified:
>>>> trunk/subversion/tests/cmdline/copy_tests.py
>>>>
>>>> Modified: trunk/subversion/tests/cmdline/copy_tests.py
>>>> URL:
>>>> http://svn.collab.net/viewvc/svn/trunk/subversion/tests/cmdline/copy_tests.py?pathrev=29434&r1=29433&r2=29434
>>>>
>>>> ==============================================================================
>>>> --- trunk/subversion/tests/cmdline/copy_tests.py (original)
>>>> +++ trunk/subversion/tests/cmdline/copy_tests.py Tue Feb 19
>>>> 10:19:49 2008
>>>> @@ -17,7 +17,7 @@
>>>> ######################################################################
>>>>
>>>> # General modules
>>>> -import stat, os, re
>>>> +import stat, os, re, shutil
>>>>
>>>> # Our testing module
>>>> import svntest
>>>> @@ -3721,6 +3721,39 @@
>>>> copy_to_path)
>>>>
>>>>
>>>> +#----------------------------------------------------------------------
>>>> +# Issue #2986
>>>> +def replaced_local_source_for_incoming_copy(sbox):
>>>> + "update receives copy, but local source is replaced"
>>>> + sbox.build(read_only = True)
>>>
>>> This read_only=True means "I'm not going to commit to the repository".
>>>
>>>> + wc_dir = sbox.wc_dir
>>>> + other_wc_dir = wc_dir + '-other'
>>>> + tau_path = os.path.join(wc_dir, 'A', 'D', 'G', 'tau')
>>>> + rho_url = sbox.repo_url + '/A/D/G/rho'
>>>> + pi_url = sbox.repo_url + '/A/D/G/pi'
>>>> + other_rho_path = os.path.join(other_wc_dir, 'A', 'D', 'G', 'rho')
>>>> +
>>>> + # Make the duplicate working copy.
>>>> + shutil.copytree(wc_dir, other_wc_dir)
>>>> +
>>>> + # Commit a replacement from the first working copy.
>>>> + svntest.actions.run_and_verify_svn(None, None, [], 'rm',
>>>> + tau_path);
>>>> + svntest.actions.run_and_verify_svn(None, None, [], 'cp',
>>>> + rho_url, tau_path);
>>>> + svntest.actions.run_and_verify_svn(None, None, [], 'ci',
>>>> + '-m', 'copy rho to tau', wc_dir);
>>>
>>> Oops!
>>>
>>> Now the next test to run will fail. Yay non-local errors :) See r31317.
>>>
>>> --dave
>>>
>>
>> """If read_only is False, a dedicated repository will be created, named
>> TEST_NAME. The repository will live in the global dir 'general_repo_dir'.
>>
>> If read_only is True the pristine repository will be used.
>> """
>>
>> Should we install pre-* hooks on the pristine repository to prevent
>> changing it?
>>
>
> I thought of adding a line in the authz file to block all write access on
> the pristine repo. That will only work over http, but it's more like a test
> development issue anyway so that doesn't really matter.
>
> Pre-commit hook is fine for me too.
Well, start-commit, but yeah, good call.
--dave
--
David Glasser | glasser@davidglasser.net | http://www.davidglasser.net/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org
Received on 2008-05-20 22:30:11 CEST