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

[MERGE-TRACKING][PATCH] Make use of the svn_client_commit_item2_t->wcprop_changes member during commit of wc to repos copy

From: Madan U Sreenivasan <madan_at_collab.net>
Date: 2006-12-04 14:24:44 CET

Hi,

    Please find attached a preparatory step to record copyfrom info on a wc
to repos copy. This patch makes use of the currently unused wcprop_changes
member of the svn_client_commit_item2_t structure, to push props
explicitly set in wcprop_changes to the repository editor.

    The next step would be to calculate the mergeinfo and fill the
wcprop_changes member in libsvn_client/copy.c:wc_to_repos_copy().

    I have tested this code for functionality with a simple script I wrote.
I have run 'make check' on local to test for regression, which I beleive
is sufficient given the change is only on the client side. Please let me
know if theres anything else I should be doing.

Regards,
Madan.

PS: This idea was suggested by cmpilato, and hence I have acknowledged the
same in the 'Patch By'. Mike, I hope you dont mind :)

Index: subversion/libsvn_client/commit_util.c
===================================================================
--- subversion/libsvn_client/commit_util.c (revision 22554)
+++ subversion/libsvn_client/commit_util.c (working copy)
@@ -1180,6 +1180,28 @@
           tempfile = apr_pstrdup(apr_hash_pool_get(tempfiles), tempfile);
           apr_hash_set(tempfiles, tempfile, APR_HASH_KEY_STRING, (void *)1);
         }
+
+ /* Set other prop-changes, if available in the baton */
+ if (item->wcprop_changes)
+ {
+ svn_prop_t *prop;
+ apr_array_header_t *prop_changes = item->wcprop_changes;
+ int ctr;
+ for (ctr = 0; ctr < prop_changes->nelts; ctr++)
+ {
+ prop = APR_ARRAY_IDX(prop_changes, ctr, svn_prop_t *);
+ if (kind == svn_node_file)
+ {
+ editor->change_file_prop(file_baton, prop->name,
+ prop->value, pool);
+ }
+ else
+ {
+ editor->change_dir_prop(*dir_baton, prop->name,
+ prop->value, pool);
+ }
+ }
+ }
     }
 
   /* Finally, handle text mods (in that we need to open a file if it

Preparatory step for recording copyfrom info on wc to repos copy.

On the merge-tracking branch:

* subversion/libsvn_client/commit_util.c
  (do_item_commit): Take into account the item's wcprop_changes value when
   the item's state flag has SVN_CLIENT_COMMIT_ITEM_PROP_MODS set.

Patch By: madanus
          cmpilato

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Dec 4 13:55:35 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.