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

Re: svn propedit URL

From: David Glasser <glasser_at_mit.edu>
Date: 2006-09-29 19:43:22 CEST

On 9/29/06, David Glasser <glasser@mit.edu> wrote:
> I'm specifically proposing the following API change. What do folks
> think?

The previous API change wouldn't be good enough, since it'll need to
return an svn_commit_info_t as well. (Should I explicitly state that
passing in NULL for commit_info_p is OK if the target isn't an URL?)

There's also some validation and canonicalization in svn_wc_prop_set2
that need to be factored out into libsvn_subr or something. Some of
this is easy (don't set svn:ignore on files, strip whitespace around
svn:keywords). Some of it... less so: there's a check that a
svn:eol-style is reasonable, and a full-blown attempt to parse
svn:externals with svn_wc_parse_externals_description2 (which doesn't
take a wc_adm_access_t, at least). Dealing with these two might be a
little hairy.

This patch shows my current plan for svn_client_propset3:

--- subversion/include/svn_client.h (revision 21714)
+++ subversion/include/svn_client.h (patch - level 1)
@@ -2086,6 +2086,16 @@
  * 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. @a recurse is not supported on URLs. The
+ * authentication baton in @a ctx and @a ctx->log_msg_func/@a
+ * ctx->log_msg_baton will be used to immediately attempt to commit
+ * the property change in the repository. If the commit succeeds,
+ * allocate (in @a pool) and populate @a *commit_info_p.
+ *
  * 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 +2112,26 @@
  * Use @a pool for all memory allocation.
- * @since New in 1.2.
+ * @since New in 1.5.
 svn_error_t *
+svn_client_propset3(svn_commit_info_t **commit_info_p,
+ 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, and @a commit_info_p always NULL.
+ *
+ * @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 19:43:56 2006

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.