You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Greg Stein <gs...@gmail.com> on 2010/08/03 17:37:11 UTC

Re: svn commit: r981905 - /subversion/trunk/subversion/tests/cmdline/depth_tests.py

Why would this be true only in single-db? Shouldn't the test perform
exactly the same in both cases? I see no rationale for WHY these
should differ.

On Tue, Aug 3, 2010 at 10:56,  <ph...@apache.org> wrote:
> Author: philip
> Date: Tue Aug  3 14:56:08 2010
> New Revision: 981905
>
> URL: http://svn.apache.org/viewvc?rev=981905&view=rev
> Log:
> Make depth_tests.py 37-40 pass in single-db.
>
> * subversion/tests/cmdline/switc_tests.py
>  (make_depth_tree_conflicts): Tweak expectations for single-db.
>
> Modified:
>    subversion/trunk/subversion/tests/cmdline/depth_tests.py
>
> Modified: subversion/trunk/subversion/tests/cmdline/depth_tests.py
> URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/depth_tests.py?rev=981905&r1=981904&r2=981905&view=diff
> ==============================================================================
> --- subversion/trunk/subversion/tests/cmdline/depth_tests.py (original)
> +++ subversion/trunk/subversion/tests/cmdline/depth_tests.py Tue Aug  3 14:56:08 2010
> @@ -2442,6 +2442,8 @@ def make_depth_tree_conflicts(sbox):
>   expected_disk.remove('A/mu',
>                        'A/B', 'A/B/lambda', 'A/B/E/alpha', 'A/B/E/beta',
>                        'A/D/gamma');
> +  if svntest.main.wc_is_singledb(sbox.wc_dir):
> +    expected_disk.remove('A/B/E', 'A/B/F')
>
>   # This test is set XFail because this (correct) status cannot be
>   # verified due to an "svn update" bug. The tree-conflict on A/B
>
>
>

Re: svn commit: r981905 - /subversion/trunk/subversion/tests/cmdline/depth_tests.py

Posted by Julian Foad <ju...@wandisco.com>.
Philip Martin wrote:
> Greg Stein <gs...@gmail.com> writes:
> > On Tue, Aug 3, 2010 at 13:41, Julian Foad <ju...@wandisco.com> wrote:
> >> Greg Stein wrote:
> >>> Why would this be true only in single-db? Shouldn't the test perform
> >>> exactly the same in both cases? I see no rationale for WHY these
> >>> should differ.
> >>>
> >>> > +  if svntest.main.wc_is_singledb(sbox.wc_dir):
> >>> > +    expected_disk.remove('A/B/E', 'A/B/F')
> >>
> >> It's just because in single-db mode, deleted dirs really go away from
> >> disk, isn't it?
> 
> Yes.  I thought this was a well known feature of wc-ng single-db.
> 
> > Beats me. Where is the comment to that effect? Where is the
> > explanation in the log message?
> >
> > Why are these tests allowing *variant* outputs without any explanation?
> 
> I'm not sure how much explanation of wc-ng, single-db you expect in
> the log message.  Generally I try to avoid having the log message
> simply repeat the code change.  The code change already shows that
> it's removing a directory from the expected_disk, I suppose the log
> message could mention that it's a delete operation?

The bit of explanation that was missing is simply the reason why it
expects a different result: "To account for the fact that in single-db
mode directories scheduled for deletion are not present on disk."

> Or do you expect the test to continue to record these directories as
> present but have some other part of the testsuite code ignore them?

Something like that would indeed be good and proper.  We should teach
the test suite to mark something as "scheduled for deletion" and to know
that if it's a directory it will be present on disk in multi-db mode but
won't otherwise.

- Julian


Re: svn commit: r981905 - /subversion/trunk/subversion/tests/cmdline/depth_tests.py

Posted by Philip Martin <ph...@wandisco.com>.
Greg Stein <gs...@gmail.com> writes:

> On Tue, Aug 3, 2010 at 13:41, Julian Foad <ju...@wandisco.com> wrote:
>> Greg Stein wrote:
>>> Why would this be true only in single-db? Shouldn't the test perform
>>> exactly the same in both cases? I see no rationale for WHY these
>>> should differ.
>>>
>>> On Tue, Aug 3, 2010 at 10:56,  <ph...@apache.org> wrote:
>>> > Make depth_tests.py 37-40 pass in single-db.
>>> >
>>> > * subversion/tests/cmdline/switc_tests.py
>>> >  (make_depth_tree_conflicts): Tweak expectations for single-db.
>> [...]
>>> >   expected_disk.remove('A/mu',
>>> >                        'A/B', 'A/B/lambda', 'A/B/E/alpha', 'A/B/E/beta',
>>> >                        'A/D/gamma');
>>> > +  if svntest.main.wc_is_singledb(sbox.wc_dir):
>>> > +    expected_disk.remove('A/B/E', 'A/B/F')
>>
>> It's just because in single-db mode, deleted dirs really go away from
>> disk, isn't it?

Yes.  I thought this was a well known feature of wc-ng single-db.

>
> Beats me. Where is the comment to that effect? Where is the
> explanation in the log message?
>
> Why are these tests allowing *variant* outputs without any explanation?

I'm not sure how much explanation of wc-ng, single-db you expect in
the log message.  Generally I try to avoid having the log message
simply repeat the code change.  The code change already shows that
it's removing a directory from the expected_disk, I suppose the log
message could mention that it's a delete operation?

Or do you expect the test to continue to record these directories as
present but have some other part of the testsuite code ignore them?

-- 
Philip

Re: svn commit: r981905 - /subversion/trunk/subversion/tests/cmdline/depth_tests.py

Posted by Greg Stein <gs...@gmail.com>.
On Tue, Aug 3, 2010 at 13:41, Julian Foad <ju...@wandisco.com> wrote:
> Greg Stein wrote:
>> Why would this be true only in single-db? Shouldn't the test perform
>> exactly the same in both cases? I see no rationale for WHY these
>> should differ.
>>
>> On Tue, Aug 3, 2010 at 10:56,  <ph...@apache.org> wrote:
>> > Make depth_tests.py 37-40 pass in single-db.
>> >
>> > * subversion/tests/cmdline/switc_tests.py
>> >  (make_depth_tree_conflicts): Tweak expectations for single-db.
> [...]
>> >   expected_disk.remove('A/mu',
>> >                        'A/B', 'A/B/lambda', 'A/B/E/alpha', 'A/B/E/beta',
>> >                        'A/D/gamma');
>> > +  if svntest.main.wc_is_singledb(sbox.wc_dir):
>> > +    expected_disk.remove('A/B/E', 'A/B/F')
>
> It's just because in single-db mode, deleted dirs really go away from
> disk, isn't it?

Beats me. Where is the comment to that effect? Where is the
explanation in the log message?

Why are these tests allowing *variant* outputs without any explanation?

-g

Re: svn commit: r981905 - /subversion/trunk/subversion/tests/cmdline/depth_tests.py

Posted by Julian Foad <ju...@wandisco.com>.
Greg Stein wrote:
> Why would this be true only in single-db? Shouldn't the test perform
> exactly the same in both cases? I see no rationale for WHY these
> should differ.
> 
> On Tue, Aug 3, 2010 at 10:56,  <ph...@apache.org> wrote:
> > Make depth_tests.py 37-40 pass in single-db.
> >
> > * subversion/tests/cmdline/switc_tests.py
> >  (make_depth_tree_conflicts): Tweak expectations for single-db.
[...]
> >   expected_disk.remove('A/mu',
> >                        'A/B', 'A/B/lambda', 'A/B/E/alpha', 'A/B/E/beta',
> >                        'A/D/gamma');
> > +  if svntest.main.wc_is_singledb(sbox.wc_dir):
> > +    expected_disk.remove('A/B/E', 'A/B/F')

It's just because in single-db mode, deleted dirs really go away from
disk, isn't it?

- Julian