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

[PATCH] Add XFail test: diff against BASE with local property mods

From: Malcolm Rowe <malcolm-svn-dev_at_farside.org.uk>
Date: 2005-11-01 23:37:06 CET

If you run 'svn diff -rX:BASE', the output incorrectly includes local
property modifications. I may get some time to attempt a fix for this
later, but in the meantime, here's a regression test.

[[[
New XFail test for testing repos-wc diffs against BASE with local
property modifications.

* subversion/tests/clients/cmdline/diff_tests.py
  (diff_property_changes_to_base): New test.
  (test_list): Add the new test, as XFail.
]]]

Regards,
Malcolm

Index: subversion/tests/clients/cmdline/diff_tests.py
===================================================================
--- subversion/tests/clients/cmdline/diff_tests.py (revision 17140)
+++ subversion/tests/clients/cmdline/diff_tests.py (working copy)
@@ -1868,6 +1868,91 @@
   os.chdir(was_cwd)
 
 
+#----------------------------------------------------------------------
+def diff_property_changes_to_base(sbox):
+ "diff to BASE with local property mods"
+
+ sbox.build()
+ wc_dir = sbox.wc_dir
+
+ expected_output_r1_r2 = [
+ "\n",
+ "Property changes on: A\n",
+ "___________________________________________________________________\n",
+ "Name: dirprop\n",
+ " + r2value\n",
+ "\n",
+ "\n",
+ "Property changes on: iota\n",
+ "___________________________________________________________________\n",
+ "Name: fileprop\n",
+ " + r2value\n",
+ "\n" ]
+
+ expected_output_r2_r1 = list(expected_output_r1_r2)
+ expected_output_r2_r1[4] = " - r2value\n"
+ expected_output_r2_r1[10] = " - r2value\n"
+
+
+ current_dir = os.getcwd()
+ os.chdir(sbox.wc_dir)
+ try:
+ svntest.actions.run_and_verify_svn(None, None, [],
+ 'propset',
+ 'fileprop', 'r2value', 'iota')
+
+ svntest.actions.run_and_verify_svn(None, None, [],
+ 'propset',
+ 'dirprop', 'r2value', 'A')
+
+ svntest.actions.run_and_verify_svn(None, None, [],
+ 'ci', '-m', 'empty-msg')
+
+ # Check that forward and reverse repos-repos diffs are as expected.
+ svntest.actions.run_and_verify_svn(None, expected_output_r1_r2, [],
+ 'diff', '-r', '1:2')
+
+ svntest.actions.run_and_verify_svn(None, expected_output_r2_r1, [],
+ 'diff', '-r', '2:1')
+
+ # Now check repos->WORKING, repos->BASE, and BASE->repos.
+ # (BASE is r1, and WORKING has no local mods, so this should produce
+ # the same output as above).
+ svntest.actions.run_and_verify_svn(None, expected_output_r1_r2, [],
+ 'diff', '-r', '1')
+
+ svntest.actions.run_and_verify_svn(None, expected_output_r1_r2, [],
+ 'diff', '-r', '1:BASE')
+
+ svntest.actions.run_and_verify_svn(None, expected_output_r2_r1, [],
+ 'diff', '-r', 'BASE:1')
+
+ # Modify some properties.
+ svntest.actions.run_and_verify_svn(None, None, [],
+ 'propset',
+ 'fileprop', 'workingvalue', 'iota')
+
+ svntest.actions.run_and_verify_svn(None, None, [],
+ 'propset',
+ 'dirprop', 'workingvalue', 'A')
+
+ svntest.actions.run_and_verify_svn(None, None, [],
+ 'propset',
+ 'fileprop', 'workingvalue', 'A/mu')
+
+ # Check that the earlier diffs against BASE are unaffected by the
+ # presence of local mods.
+ svntest.actions.run_and_verify_svn(None, expected_output_r1_r2, [],
+ 'diff', '-r', '1:BASE')
+
+ svntest.actions.run_and_verify_svn(None, expected_output_r2_r1, [],
+ 'diff', '-r', 'BASE:1')
+
+
+ finally:
+ os.chdir(current_dir)
+
+
 ########################################################################
 #Run the tests
 
@@ -1900,7 +1985,8 @@
               diff_prop_on_named_dir,
               diff_keywords,
               diff_force,
- XFail(diff_renamed_dir)
+ XFail(diff_renamed_dir),
+ XFail(diff_property_changes_to_base),
               ]
 
 if __name__ == '__main__':

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Nov 1 23:46:24 2005

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.