Index: subversion/include/svn_error_codes.h =================================================================== --- subversion/include/svn_error_codes.h (revision 998620) +++ subversion/include/svn_error_codes.h (working copy) @@ -219,6 +219,11 @@ SVN_ERR_BAD_CATEGORY_START + 13, "Unknown string value of token") + /** @since New in 1.7. */ + SVN_ERRDEF(SVN_ERR_BAD_OLD_VALUE, + SVN_ERR_BAD_CATEGORY_START + 14, + "Old value doesn't match repository") + /* xml errors */ SVN_ERRDEF(SVN_ERR_XML_ATTRIB_NOT_FOUND, Index: subversion/libsvn_fs_fs/fs_fs.c =================================================================== --- subversion/libsvn_fs_fs/fs_fs.c (revision 998620) +++ subversion/libsvn_fs_fs/fs_fs.c (working copy) @@ -7312,7 +7312,7 @@ && !svn_string_compare(wanted_value, present_value))) { /* What we expected isn't what we found. */ - return svn_error_createf(SVN_ERR_BAD_PROPERTY_VALUE, NULL, + return svn_error_createf(SVN_ERR_BAD_OLD_VALUE, NULL, _("revprop '%s' has unexpected value in " "filesystem"), cb->name); Index: subversion/libsvn_fs_base/revs-txns.c =================================================================== --- subversion/libsvn_fs_base/revs-txns.c (revision 998620) +++ subversion/libsvn_fs_base/revs-txns.c (working copy) @@ -270,7 +270,7 @@ && !svn_string_compare(wanted_value, present_value))) { /* What we expected isn't what we found. */ - return svn_error_createf(SVN_ERR_BAD_PROPERTY_VALUE, NULL, + return svn_error_createf(SVN_ERR_BAD_OLD_VALUE, NULL, _("revprop '%s' has unexpected value in " "filesystem"), name); Index: subversion/include/svn_fs.h =================================================================== --- subversion/include/svn_fs.h (revision 998620) +++ subversion/include/svn_fs.h (working copy) @@ -1896,8 +1896,8 @@ * - @a name is the name of the property to change. * - if @a old_value_p is not @c NULL, then @a *old_value_p is the expected old * value of the property, and changing the value will fail with error - * #SVN_ERR_BAD_PROPERTY_VALUE if the present value of the property is not @a - * *old_value_p. + * #SVN_ERR_BAD_OLD_VALUE if the present value of the property is not @a + * *old_value_p. (This is an atomic test-and-set). * - @a value is the new value of the property, or zero if the property should * be removed altogether. * Index: subversion/tests/libsvn_fs/fs-test.c =================================================================== --- subversion/tests/libsvn_fs/fs-test.c (revision 998620) +++ subversion/tests/libsvn_fs/fs-test.c (working copy) @@ -586,12 +586,12 @@ } -/* If EXPR raises SVN_ERR_BAD_PROPERTY_VALUE, continue; else, fail +/* If EXPR raises SVN_ERR_BAD_OLD_VALUE, continue; else, fail * the test. */ -#define FAILS_WITH_BPV(expr) \ +#define FAILS_WITH_BOV(expr) \ do { \ svn_error_t *__err = (expr); \ - if (!__err || __err->apr_err != SVN_ERR_BAD_PROPERTY_VALUE) \ + if (!__err || __err->apr_err != SVN_ERR_BAD_OLD_VALUE) \ return svn_error_create(SVN_ERR_TEST_FAILED, __err, \ "svn_fs_change_rev_prop2() failed to " \ "detect unexpected old value"); \ @@ -662,18 +662,18 @@ /* Value of "flower" is 's1'. */ - FAILS_WITH_BPV(svn_fs_change_rev_prop2(fs, 0, "flower", &s2_p, s1_p, pool)); + FAILS_WITH_BOV(svn_fs_change_rev_prop2(fs, 0, "flower", &s2_p, s1_p, pool)); s1_dup = svn_string_dup(&s1, pool); SVN_ERR(svn_fs_change_rev_prop2(fs, 0, "flower", &s1_dup, s2_p, pool)); /* Value of "flower" is 's2'. */ - FAILS_WITH_BPV(svn_fs_change_rev_prop2(fs, 0, "flower", &s1_p, NULL, pool)); + FAILS_WITH_BOV(svn_fs_change_rev_prop2(fs, 0, "flower", &s1_p, NULL, pool)); SVN_ERR(svn_fs_change_rev_prop2(fs, 0, "flower", &s2_p, NULL, pool)); /* Value of "flower" is . */ - FAILS_WITH_BPV(svn_fs_change_rev_prop2(fs, 0, "flower", &s2_p, s1_p, pool)); + FAILS_WITH_BOV(svn_fs_change_rev_prop2(fs, 0, "flower", &s2_p, s1_p, pool)); SVN_ERR(svn_fs_change_rev_prop2(fs, 0, "flower", &unset, s1_p, pool)); /* Value of "flower" is 's1'. */