Hi,
This patch changes the tests for the atomic-revprop feature, so that
they test the error number rather than parsing the error text.
This doesn't work with Serf or Neon yet - they're still TODO. This
gives you a way to test Serf & Neon patches. (You might like to
hold off on committing this until Serf and Neon are done).
The patch is against the atomic-revprop branch, and requires
Patch 1 to be applied first. It doesn't apply to trunk (I don't
think the tests have been merged to trunk?)
[[[
Change atomic-revprop tests to look at the error number rather
than parsing the error text.
* subversion/tests/cmdline/atomic-ra-revprop-change.c:
(main): When printing an error, check if it's SVN_ERR_BAD_OLD_VALUE
and print a special message if it is.
* subversion/tests/cmdline/prop_tests.py:
(FAILS_WITH_BPV): Look for the special message.
Patch by: Jon Foster <jon.fos...@cabot.co.uk>
]]]
Kind regards,
Jon
**********************************************************************
This email and its attachments may be confidential and are intended solely for
the use of the individual to whom it is addressed. Any views or opinions
expressed are solely those of the author and do not necessarily represent those
of Cabot Communications Ltd.
If you are not the intended recipient of this email and its attachments, you
must take no action based upon them, nor must you copy or show them to anyone.
Cabot Communications Limited
Verona House, Filwood Road, Bristol BS16 3RY, UK
+44 (0) 1179584232
Co. Registered in England number 02817269
Please contact the sender if you believe you have received this email in error.
**********************************************************************
______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________
Index: subversion/tests/cmdline/atomic-ra-revprop-change.c
===================================================================
--- subversion/tests/cmdline/atomic-ra-revprop-change.c (revision 998620)
+++ subversion/tests/cmdline/atomic-ra-revprop-change.c (working copy)
@@ -226,6 +226,8 @@
http_library, pool);
if (err)
{
+ if (svn_error_has_cause(err, SVN_ERR_BAD_OLD_VALUE))
+ fprintf(stderr, "atomic-ra-revprop-change failed due to incorrect old
value.\n");
svn_handle_error2(err, stderr, FALSE, "atomic-ra-revprop-change: ");
svn_error_clear(err);
exit_code = EXIT_FAILURE;
Index: subversion/tests/cmdline/prop_tests.py
===================================================================
--- subversion/tests/cmdline/prop_tests.py (revision 998620)
+++ subversion/tests/cmdline/prop_tests.py (working copy)
@@ -2008,7 +2008,7 @@
def FAILS_WITH_BPV(not_the_old_value, proposed_value):
if svntest.main.server_has_atomic_revprop():
- expected_stderr = ".*revprop 'flower' has unexpected value.*"
+ expected_stderr = ".*atomic-ra-revprop-change failed due to incorrect
old value.*"
svntest.actions.run_and_verify_atomic_ra_revprop_change(
None, None, expected_stderr, 1, repo_url, 0, 'flower',
not_the_old_value, proposed_value)