Couple of observations.
1)When I propedit on the URL, for some reason abort at the 'log message
screen'. I get the following message.
<snip>
Set new value for property 'svn:mergeinfo' on
'file:///home/kamesh/work/svn/merge-tracking/my_test_area_fsfs/repo/trunk'
</snip>
2)When I get the Out of date error in propedit, I loose my actual
propchange.
Like we preserve the log message we should preserve the 'edited propval'
too.
Thanks for the nice patch.
glasser@tigris.org wrote:
> Author: glasser
> Date: Wed Oct 11 11:03:13 2006
> New Revision: 21887
>
> Log:
> Support "svn propedit PROPNAME URL...".
>
> * subversion/include/svn_client.h
> (svn_client_propset3): Bumped from svn_client_propset2, now supports
> being called on URLs, as long as the new base_revision_for_url is
> valid. Also takes an svn_commit_info_t.
> (svn_client_propget3): Bumped from svn_client_propget3; now
>
Hope you meant
(svn_client_propget3): Bumped from svn_client_propget2; now
> Modified: trunk/subversion/libsvn_client/prop_commands.c
> URL: http://svn.collab.net/viewvc/svn/trunk/subversion/libsvn_client/prop_commands.c?pathrev=21887&r1=21886&r2=21887
> ==============================================================================
> --- trunk/subversion/libsvn_client/prop_commands.c (original)
> +++ trunk/subversion/libsvn_client/prop_commands.c Wed Oct 11 11:03:13 2006
> @@ -128,12 +128,175 @@
> return SVN_NO_ERROR;
> }
>
> +
> +
> +
> +static
> +svn_error_t *
> +propset_on_url(svn_commit_info_t **commit_info_p,
> + const char *propname,
> + const svn_string_t *propval,
> + const char *target,
> + svn_boolean_t skip_checks,
> + svn_revnum_t base_revision_for_url,
> + svn_client_ctx_t *ctx,
> + apr_pool_t *pool)
> +{
> + enum svn_prop_kind prop_kind = svn_property_kind(NULL, propname);
> + svn_ra_session_t *ra_session;
> + svn_node_kind_t node_kind;
> + const char *message;
> + const svn_delta_editor_t *editor;
> + void *commit_baton, *edit_baton;
> + apr_array_header_t *paths = apr_array_make(pool, 1, sizeof(const char *));
>
usused variable paths.
> + svn_error_t *err;
> +
> + if (prop_kind != svn_prop_regular_kind)
> + return svn_error_createf
> + (SVN_ERR_BAD_PROP_KIND, NULL,
> + _("Property '%s' is not a regular property"), propname);
> +
> + /* Open an RA session for the URL. Note that we don't have a local
> + directory, nor a place to put temp files. */
> + SVN_ERR(svn_client__open_ra_session_internal(&ra_session, target,
> + NULL, NULL, NULL, FALSE, TRUE,
> + ctx, pool));
> +
> + SVN_ERR(svn_ra_check_path(ra_session, "", base_revision_for_url,
> + &node_kind, pool));
> + if (node_kind == svn_node_none)
> + return svn_error_createf
> + (SVN_ERR_FS_NOT_FOUND, NULL,
> + _("Path '%s' does not exist in revision %ld"),
> + target, base_revision_for_url);
> +
> + /* Setting an inappropriate property is not allowed (unless
> + overridden by 'skip_checks', in some circumstances). Deleting an
> + inappropriate property is allowed, however, since older clients
> + allowed (and other clients possibly still allow) setting it in
> + the first place. */
> + if (propval && svn_prop_is_svn_prop(propname))
> + {
> + const svn_string_t *new_value;
> + struct getter_baton *gb = apr_pcalloc(pool, sizeof(*gb));
> +
>
Why not this 'getter_baton' on stack? as its scoped to a smaller block?
> + gb->ra_session = ra_session;
> + gb->base_revision_for_url = base_revision_for_url;
> + SVN_ERR(svn_wc_canonicalize_svn_prop(&new_value, propname, propval,
> + target, node_kind, skip_checks,
> + get_file_for_validation, gb, pool));
> + propval = new_value;
> + }
> +
> + /* Create a new commit item and add it to the array. */
> + if (ctx->log_msg_func || ctx->log_msg_func2)
> + {
> + svn_client_commit_item2_t *item;
> + const char *tmp_file;
> + apr_array_header_t *commit_items
> + = apr_array_make(pool, 1, sizeof(item));
> +
> + item = apr_pcalloc(pool, sizeof(*item));
>
Could also be on the stack as its scope is in small block.
With regards
Kamesh Jayachandran
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Oct 12 14:47:22 2006