(I assume there must have been discussion of this before, but I'm
having trouble finding it.)
It would be useful to support "svn propedit" on URLs. The obvious
problem with modifying properties on URLs is accidentally overwriting
somebody else's changes. While this is clearly a problem for propset
and propdel, it's not as big of a deal (in theory) for propedit: svn
could remember the revision of the property being edited, and pass it
through the various layers of propset, and the operation would fail if
it was out of date. This can be implemented with the current RA API;
it just needs a new client API (and 'svn' changes).
I'm specifically proposing the following API change. What do folks
think?
--- subversion/include/svn_client.h (revision 102401)
+++ subversion/include/svn_client.h (local)
@@ -2086,6 +2086,12 @@
*
* A @a propval of @c NULL will delete the property.
*
+ * The @a target may only be an URL if @a base_revision_for_url is not
+ * @c SVN_INVALID_REVNUM; in this case, the property will only be set
+ * if it has not changed since revision @a base_revision_for_url. @a
+ * base_revision_for_url must be @c SVN_INVALID_REVNUM if @a target is
+ * not an URL.
+ *
* If @a propname is an svn-controlled property (i.e. prefixed with
* @c SVN_PROP_PREFIX), then the caller is responsible for ensuring that
* the value is UTF8-encoded and uses LF line-endings.
@@ -2102,9 +2108,25 @@
*
* Use @a pool for all memory allocation.
*
- * @since New in 1.2.
+ * @since New in 1.5.
*/
svn_error_t *
+svn_client_propset3(const char *propname,
+ const svn_string_t *propval,
+ const char *target,
+ svn_boolean_t recurse,
+ svn_boolean_t skip_checks,
+ svn_revnum_t base_revision_for_url,
+ svn_client_ctx_t *ctx,
+ apr_pool_t *pool);
+
+/**
+ * Like svn_client_propset2(), but with @a base_revision_for_url
+ * always @c SVN_INVALID_REVNUM.
+ *
+ * @deprecated Provided for backward compatibility with the 1.4 API.
+ */
+svn_error_t *
svn_client_propset2(const char *propname,
const svn_string_t *propval,
const char *target,
--
David Glasser | glasser_at_mit.edu | http://www.davidglasser.net/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Sep 29 17:10:02 2006