[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: tree-conflicts: please review to determine desired behaviour in detail

From: Julian Foad <julianfoad_at_btopenworld.com>
Date: Thu, 04 Sep 2008 21:42:13 +0100

On Thu, 2008-09-04 at 03:19 +0200, Neels Hofmeyr wrote:
> Hi,
>
> I think there's still a problem with the new expected results of
> tree-conflicts-on-update tests, in 2_1 and 2_2, where there are local changes.
>
>
> 2_1)
> (tree_conflicts_on_update_2_1)
> Local leaf edit, incoming tree delete.
>
> expected_output = wc.State('', {
> 'F' : Item(status='C '),
> 'D' : Item(status='C '),
> 'DF' : Item(status='C '),
> 'DD' : Item(status='C '),
> 'DDF' : Item(status='C '),
> 'DDD' : Item(status='C '),
> })
>
> expected_disk = state_after_leaf_edit
>
> expected_status = state_after_leaf_edit.copy()
> expected_status.add({ '' : Item(status=' ') }) # also set root's attributes
> expected_status.tweak(wc_rev=3)
> expected_status.tweak('F', 'D', 'DF', 'DD', 'DDF', 'DDD', status='C ')
>
>
> The output is fine, so is the disk.
>
> But the status should also reflect the local changes, right?

Yes, indeed.

  state_after_leaf_edit = svntest.actions.deep_trees_after_leaf_edit

I naively thought the "state_after_leaf_edit.copy()" would provide a
result suitable for use both as a disk state and as an "svn status"
state after local changes. I see now that it only provides the disk
state.

Although your patch doesn't make the tests much longer, it would be nice
to retrieve the expected status from the test suite core (like
"deep_trees_after_leaf_edit" does for the disk state) so that it is only
written in one place.

Maybe we could rename "deep_trees_after_leaf_edit" to
"deep_trees_disk_after_leaf_edit" and introduce also
"deep_trees_status_after_leaf_edit"?

Anyway, your patch is enough for now.

> [[[
> Further fix two tree-conflicts tests.
>
> * subversion/tests/cmdline/update_tests.py (tree_conflicts_on_update_2_1,
> tree_conflicts_on_update_2_2): Adjust expected status to reflect the
> local changes.
> ]]]

Thanks. Committed in r32909.

- Julian

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org
Received on 2008-09-04 22:42:30 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.