You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Lieven Govaerts <sv...@mobsol.be> on 2007/04/30 20:16:32 UTC

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

vgeorgescu@tigris.org wrote:
> +#----------------------------------------------------------------------
> +def depth_immediates_subdir_propset_2(sbox):
> +  "depth-1 update receives a subdirectory propset"
> +  sbox.build()
> +  wc_dir = sbox.wc_dir
> +
> +  # Make the other working copy.
> +  other_wc = sbox.add_wc_path('other')
> +  svntest.actions.duplicate_dir(wc_dir, other_wc)
> +
> +  A_path = os.path.join(wc_dir, 'A')
> +
> +  # Set a property on an immediate subdirectory of the working copy.
> +  svntest.actions.run_and_verify_svn(None, None, [],
> +                                     'pset', 'foo', 'bar',
> +                                     A_path)
> +  # Commit.
> +  svntest.actions.run_and_verify_svn(None, None, [],
> +                                     'commit', '-m', 'logmsg', A_path)
> +
> +  # Update at depth=immediates in the other wc, expecting to see no errors.
> +  svntest.actions.run_and_verify_svn("Output on stderr where none expected",
> +                                     SVNAnyOutput, [],
> +                                     'update', '--depth', 'immediates',
> +                                     other_wc)
> +
Vlad,

I think this test would be (even) better if you actually checked the
output of update, it's supposed to receive the property changes on A right?

Lieven

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

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

Posted by Vlad Georgescu <vg...@gmail.com>.
Lieven Govaerts wrote:
> Vlad Georgescu wrote:
>> Lieven Govaerts wrote:
>>   
>>> vgeorgescu@tigris.org wrote:
>>>     
>>>> +  # Update at depth=immediates in the other wc, expecting to see no errors.
>>>> +  svntest.actions.run_and_verify_svn("Output on stderr where none expected",
>>>> +                                     SVNAnyOutput, [],
>>>> +                                     'update', '--depth', 'immediates',
>>>> +                                     other_wc)
>>>> +
>>>>       
>>> Vlad,
>>>
>>> I think this test would be (even) better if you actually checked the
>>> output of update, it's supposed to receive the property changes on A right?
>>>     
>> Yes, but the last update fails because of an error:
>>
>> Output on stderr where none expected
>> EXPECTED STDERR:
>> ACTUAL STDERR:
>> ../svn-trunk/subversion/libsvn_wc/lock.c:989: (apr_err=155005)
>> svn: Unable to lock 'svn-test-work/working_copies/depth_tests-18.other/A'
>> EXCEPTION: SVNLineUnequal
>>
>> If I change the test to use expected_output, will it still display
>> the error, or will it just complain about the trees being unequal?
>>   
> Hm, had to check that. In svntest/actions.py the run_and_verify_update
> function first matches the error and only then starts comparing the trees.

If I'm reading the code right, if the error matches error_re_string,
run_and_verify_update returns and doesn't compare the trees (which means
the expected_* parameters aren't used when error_re_string != None,
though you have to pass them in because they come before error_re_string
in the parameter list, weird).

-- 
Vlad

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

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

Posted by Lieven Govaerts <sv...@mobsol.be>.
Vlad Georgescu wrote:
> Lieven Govaerts wrote:
>   
>> vgeorgescu@tigris.org wrote:
>>     
>>> +  # Update at depth=immediates in the other wc, expecting to see no errors.
>>> +  svntest.actions.run_and_verify_svn("Output on stderr where none expected",
>>> +                                     SVNAnyOutput, [],
>>> +                                     'update', '--depth', 'immediates',
>>> +                                     other_wc)
>>> +
>>>       
>> Vlad,
>>
>> I think this test would be (even) better if you actually checked the
>> output of update, it's supposed to receive the property changes on A right?
>>     
>
> Yes, but the last update fails because of an error:
>
> Output on stderr where none expected
> EXPECTED STDERR:
> ACTUAL STDERR:
> ../svn-trunk/subversion/libsvn_wc/lock.c:989: (apr_err=155005)
> svn: Unable to lock 'svn-test-work/working_copies/depth_tests-18.other/A'
> EXCEPTION: SVNLineUnequal
>
> If I change the test to use expected_output, will it still display
> the error, or will it just complain about the trees being unequal?
>   
Hm, had to check that. In svntest/actions.py the run_and_verify_update
function first matches the error and only then starts comparing the trees.

Lieven

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

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

Posted by Vlad Georgescu <vg...@gmail.com>.
Lieven Govaerts wrote:
> vgeorgescu@tigris.org wrote:
>> +#----------------------------------------------------------------------
>> +def depth_immediates_subdir_propset_2(sbox):
>> +  "depth-1 update receives a subdirectory propset"
>> +  sbox.build()
>> +  wc_dir = sbox.wc_dir
>> +
>> +  # Make the other working copy.
>> +  other_wc = sbox.add_wc_path('other')
>> +  svntest.actions.duplicate_dir(wc_dir, other_wc)
>> +
>> +  A_path = os.path.join(wc_dir, 'A')
>> +
>> +  # Set a property on an immediate subdirectory of the working copy.
>> +  svntest.actions.run_and_verify_svn(None, None, [],
>> +                                     'pset', 'foo', 'bar',
>> +                                     A_path)
>> +  # Commit.
>> +  svntest.actions.run_and_verify_svn(None, None, [],
>> +                                     'commit', '-m', 'logmsg', A_path)
>> +
>> +  # Update at depth=immediates in the other wc, expecting to see no errors.
>> +  svntest.actions.run_and_verify_svn("Output on stderr where none expected",
>> +                                     SVNAnyOutput, [],
>> +                                     'update', '--depth', 'immediates',
>> +                                     other_wc)
>> +
> Vlad,
> 
> I think this test would be (even) better if you actually checked the
> output of update, it's supposed to receive the property changes on A right?

Yes, but the last update fails because of an error:

Output on stderr where none expected
EXPECTED STDERR:
ACTUAL STDERR:
../svn-trunk/subversion/libsvn_wc/lock.c:989: (apr_err=155005)
svn: Unable to lock 'svn-test-work/working_copies/depth_tests-18.other/A'
EXCEPTION: SVNLineUnequal

If I change the test to use expected_output, will it still display
the error, or will it just complain about the trees being unequal?

-- 
Vlad

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org