Re: svn ps versioned_prop val url_to_resource does not work

2010-01-07 Thread C. Michael Pilato
Julian Foad wrote:
> Kamesh Jayachandran wrote:
>> svn ps versioned_prop val url_to_resource fails!
>>
>> Yes 'svn help ps' does not say that it supports it.
>>
>> But it has some code as if it supports it but fails.
>>
>> I have the following in-progress patch(It is not fully complete but 
>> works with ra_local and unauthenticated http).
>>
>> Currently this patch relies on '-r' to tell about base revision for this 
>> commit.
>>
>> Just thought of recording it here.
> 
> "propedit" has already been extended in this way. I think this is a good
> thing to do. (Remember to do "propdel" as well.)

Please do check the archives for the previous N times we've discussed this,
though.  I don't remember the arguments myself, but I do recall that they
were made for and against this functionality.

-- 
C. Michael Pilato 
CollabNet   <>   www.collab.net   <>   Distributed Development On Demand



signature.asc
Description: OpenPGP digital signature


Re: svn ps versioned_prop val url_to_resource does not work

2010-01-07 Thread Julian Foad
Kamesh Jayachandran wrote:
> svn ps versioned_prop val url_to_resource fails!
> 
> Yes 'svn help ps' does not say that it supports it.
> 
> But it has some code as if it supports it but fails.
> 
> I have the following in-progress patch(It is not fully complete but 
> works with ra_local and unauthenticated http).
> 
> Currently this patch relies on '-r' to tell about base revision for this 
> commit.
> 
> Just thought of recording it here.

"propedit" has already been extended in this way. I think this is a good
thing to do. (Remember to do "propdel" as well.)

- Julian




svn ps versioned_prop val url_to_resource does not work

2010-01-07 Thread Kamesh Jayachandran

Hi All,

svn ps versioned_prop val url_to_resource fails!

Yes 'svn help ps' does not say that it supports it.

But it has some code as if it supports it but fails.

I have the following in-progress patch(It is not fully complete but 
works with ra_local and unauthenticated http).


Currently this patch relies on '-r' to tell about base revision for this 
commit.


Just thought of recording it here.

With regards
Kamesh Jayachandran
Index: subversion/svn/propset-cmd.c
===
--- subversion/svn/propset-cmd.c(revision 896770)
+++ subversion/svn/propset-cmd.c(working copy)
@@ -126,13 +126,6 @@
   &rev, opt_state->force, ctx,
   scratch_pool));
 }
-  else if (opt_state->start_revision.kind != svn_opt_revision_unspecified)
-{
-  return svn_error_createf
-(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
- _("Cannot specify revision for setting versioned property '%s'"),
- pname);
-}
   else  /* operate on a normal, versioned property (not a revprop) */
 {
   apr_pool_t *iterpool;
@@ -181,13 +174,22 @@
 {
   const char *target = APR_ARRAY_IDX(targets, i, const char *);
   svn_commit_info_t *commit_info;
+  svn_revnum_t base_revision_for_url = SVN_INVALID_REVNUM;
 
   svn_pool_clear(iterpool);
   SVN_ERR(svn_cl__check_cancel(ctx->cancel_baton));
+  if (opt_state->start_revision.kind != svn_opt_revision_unspecified)
+{
+  base_revision_for_url = opt_state->start_revision.value.number;
+  SVN_ERR(svn_cl__make_log_msg_baton(&(ctx->log_msg_baton3),
+ opt_state, "",
+ ctx->config, iterpool));
+}
+
   SVN_ERR(svn_cl__try(svn_client_propset3
   (&commit_info, pname_utf8, propval, target,
opt_state->depth, opt_state->force,
-   SVN_INVALID_REVNUM, opt_state->changelists,
+   base_revision_for_url, opt_state->changelists,
NULL, ctx, iterpool),
   NULL, opt_state->quiet,
   SVN_ERR_UNVERSIONED_RESOURCE,
@@ -195,7 +197,13 @@
   SVN_NO_ERROR));
 
   if (! opt_state->quiet)
-svn_cl__check_boolean_prop_val(pname_utf8, propval->data, 
iterpool);
+{
+  if (opt_state->start_revision.kind != 
svn_opt_revision_unspecified)
+{
+  SVN_ERR(svn_cl__print_commit_info(commit_info, iterpool));
+}
+  svn_cl__check_boolean_prop_val(pname_utf8, propval->data, 
iterpool);
+}
 }
   svn_pool_destroy(iterpool);
 }
Index: subversion/svn/main.c
===
--- subversion/svn/main.c   (revision 896770)
+++ subversion/svn/main.c   (working copy)
@@ -875,7 +875,7 @@
  "  svn:needs-lock properties cannot be set on a directory.  A 
non-recursive\n"
  "  attempt will fail, and a recursive attempt will set the property\n"
  "  only on the file children of the directory.\n"),
-{'F', opt_encoding, 'q', 'r', opt_targets, 'R', opt_depth, opt_revprop,
+{'F', opt_encoding, 'q', 'r', SVN_CL__LOG_MSG_OPTIONS, opt_targets, 'R', 
opt_depth, opt_revprop,
  opt_force, opt_changelist },
 {{'F', N_("read property value from file ARG")}} },