Branch to implement atomic revprop modifications in libsvn_ra. By "atomic", we mean: the old value (if any) of the revprop as seen by the client modifying it is the same as the old value the FS layer sees at the time it enacts the change. This feature may be used to fully resolve issue #3546 (race condition in svnsync locking) and to implement 'svn propedit --revprop pname pval2 --old-value=pval'. Planned work ============ * FS layer support - [DONE] r955136, r955303, r955306 on trunk. * repos layer support - [DONE] extend svn_repos_fs_change_rev_prop3() to wrap svn_fs_change_rev_prop2() - [DONE] make sure *OLD_VALUE_P isn't used unless user has read access * RA layer support - [DONE] introduce svn_ra_change_rev_prop2() Need a new libsvn_ra-level capability. (because atomicity can't be achieved with older servers, and because of planned protocol extensions) - [DONE] ra_local: Trivial. - [DONE] ra_svn: Add a 'change-rev-prop2' verb. - [DONE] ra_dav: Extend PROPPATCH: see notes/http-and-webdav/webdav-protocol - [DONE] unit test: prop_tests.py 34: atomic_over_ra() - [DONE] verify consistent error code: SVN_ERR_FS_PROP_BASEVALUE_MISMATCH - [DONE] use 409 DAV response (within the 207 response). (using 412) - [DONE] ra_dav: preserve err->apr_err from server to client (like in ra_svn) * [DONE] client support: svn_client_revprop_set2() * svnsync and svnrdump: - [DONE] use the new RA API to resolve the race condition in locking. - [DONE] deal with pre-1.7 servers - [DONE] upgrade svn_ra_change_rev_prop() callers Failing tests ============= See details in ./FAILING-TESTS. Cause unknown, but fixed as of r995827. Dependency: have ra_dav provide err->apr_err over the wire ========================================================== The svnsync work requires having the API return a known error code if the propchange failed /due to the provided expectation *old_value_p not having been matched/. Currently, ra_local and ra_svn have the original error code in the chain, but mod_dav_svn only has a generic SVN_ERR_RA_DAV_* error code (despite having the correct error message). * [DONE] verify ra_local and ra_svn claims above * [DONE] extend ra_dav to transmit more error information over the wire plan1: - nest a "42" tag inside the tag. - mod_dav_svn implementation? (mod_dav doesn't XML-encode dav_error->desc) - extend ra_neon/ra_serf's start_207()/start_207_element() parsers plan2: - preserve just the outermost err->apr_err of the error chain plan3: - return s/500/412/ in the 207 body; ref: Jon Foster's [PATCH 3/3] - no need to transmit error chains or apr_err codes; special-cased. (plan3 has been implemented) Potential work ============== * svn_log__ interface - extend svn_log__change_rev_prop() with a "was old value provided?" boolean * repos layer hooks interface - pass the old value to pre-revprop-change * client interface - extend svn_client_revprop_set2() with "bail unless has_capability()" boolean * svn propedit/propset --revprop --old-value (Not planned currently.)