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

Re: [PATCH] [merge-tracking] merge_tests.py(add_with_history) testcase failure fix.

From: Daniel Rall <dlr_at_collab.net>
Date: 2006-07-14 03:16:10 CEST

Kamesh, thanks for the patch. The style of changes to merge_tests.py
look spot on.

Regarding the other portion of the change, Garrett and I were both
thinking that it is a bug in old_tree()'s implementation that it drops
the props and attributes for the root node. Because this is a general
problem, I'd rather not introduce a one-off to work around in
actions.py.

I've been playing around with a patch to try and fix this problem
(attached), but I haven't managed to get it quite right yet. Perhaps
what's wrong here will be more obvious to you or others...

- Dan

On Wed, 12 Jul 2006, Kamesh Jayachandran wrote:
...
> Fix 'add_with_history' testcase taking care of 'merge-tracking'
> implementation.
>
> * subversion/tests/cmdline/svntest/actions.py
> (run_and_verify_merge2):
> Merge tracking adds/modifies the property by name SVN_PROP_MERGE_INFO.
> Unfortunately there is no way to set the 'props' to Tree itself.
> This fix respects the 'props' attribute of parameter
> disk_tree(Instance of wc.State) and reassigns to the
> disk_tree(Instance of 'SVNTreeNode'). So that merge testcases can
> just set
> the property SVN_PROP_MERGE_INFO for the disk_tree.
>
> * subversion/tests/cmdline/merge_tests.py
> (add_with_history):
> Update the expected_disk to indicate that 'merge' adds a property
> SVN_PROP_MERGE_INFO.
> Update the expected_status to indicate that 'merge' updates the
> property of short_C_path.
> As 'merge' modifies/adds the SVN_PROP_MERGE_INFO of target('A/C'), so we
> need to update our expected_output of 'commit'.
> As 'merge' modifies/adds the SVN_PROP_MERGE_INFO of target('A/C'), so we
> need to up the wc_rev of 'A/C' to '3'.
> ]]]
>

> Index: subversion/tests/cmdline/merge_tests.py
> ===================================================================
> --- subversion/tests/cmdline/merge_tests.py (revision 20536)
> +++ subversion/tests/cmdline/merge_tests.py (working copy)
> @@ -470,8 +470,9 @@
> 'foo' : Item("foo"),
> 'foo2' : Item("foo2", props={'y' : 'y'}),
> })
> + expected_disk.props = {SVN_PROP_MERGE_INFO : '/A/B/F:2'}
> expected_status = wc.State(short_C_path, {
> - '' : Item(status=' ', wc_rev=1),
> + '' : Item(status=' M', wc_rev=1),
> 'Q' : Item(status='A ', wc_rev='-', copied='+'),
> 'Q2' : Item(status='A ', wc_rev='-', copied='+'),
> 'Q/bar' : Item(status='A ', wc_rev='-', copied='+'),
> @@ -495,6 +496,7 @@
> os.chdir(saved_cwd)
>
> expected_output = svntest.wc.State(wc_dir, {
> + 'A/C' : Item(verb='Sending'),
> 'A/C/Q' : Item(verb='Adding'),
> 'A/C/Q2' : Item(verb='Adding'),
> 'A/C/Q/bar' : Item(verb='Adding'),
> @@ -511,6 +513,7 @@
> 'A/B/F/Q/bar2': Item(status=' ', wc_rev=2),
> 'A/B/F/foo' : Item(status=' ', wc_rev=2),
> 'A/B/F/foo2' : Item(status=' ', wc_rev=2),
> + 'A/C' : Item(status=' ', wc_rev=3),
> 'A/C/Q' : Item(status=' ', wc_rev=3),
> 'A/C/Q2' : Item(status=' ', wc_rev=3),
> 'A/C/Q/bar' : Item(status=' ', wc_rev=3),
> Index: subversion/tests/cmdline/svntest/actions.py
> ===================================================================
> --- subversion/tests/cmdline/svntest/actions.py (revision 20536)
> +++ subversion/tests/cmdline/svntest/actions.py (working copy)
> @@ -483,7 +483,12 @@
> if isinstance(output_tree, wc.State):
> output_tree = output_tree.old_tree()
> if isinstance(disk_tree, wc.State):
> + if hasattr(disk_tree, 'props'):
> + disk_tree_props = disk_tree.props
> + else:
> + disk_tree_props = {}
> disk_tree = disk_tree.old_tree()
> + disk_tree.props = disk_tree_props
> if isinstance(status_tree, wc.State):
> status_tree = status_tree.old_tree()
> if isinstance(skip_tree, wc.State):

  • text/plain attachment: patch
  • application/pgp-signature attachment: stored
Received on Fri Jul 14 03:16:57 2006

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.