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

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

From: Kamesh Jayachandran <kamesh_at_collab.net>
Date: 2006-07-11 20:32:48 CEST

Hi All,
Find the attached patch.

With regards
Kamesh Jayachandran

[[[
Patch by: Kamesh Jayachandran <kamesh@collab.net>

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):

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Jul 11 20:32:07 2006

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