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

Re: Problem with WC to URL copy in JavaHL 1.5.x

From: Hyrum K. Wright <hyrum_wright_at_mail.utexas.edu>
Date: Sat, 06 Dec 2008 13:49:33 -0600

Mark Phippard wrote:
> Just to follow-up, this problem still happens in trunk. I have
> attached a patch to the JavaHL tests that causes the breakage. I also
> looked into the NotifyInformation class and there is no way to fix
> this problem in that class as the error occurs in a base class from
> the JDK that it inherits from.
>
> I can commit the patch but it causes breakage. I thought it might be
> easier to just give to someone that is willing to look into the
> problem.

The attached patch fixes the problem locally by setting the commit item path to
the same value as the url. The result will be the url being passed as the path
parameter to the notification callback. Do we do that for the other items in a
wc-to-url copy, or are the notification paths some sort of relative path?

-Hyrum

[[[
Fix JavaHL wc-to-url copies by providing a value for the notification path
callback.

* subversion/libsvn_client/copy.c
  (repos_to_repos_copy, wc_to_repos_copy): When creating parents, provide a
    value for the commit item path, which will then be used by the notification
    callback.
]]]

Index: subversion/libsvn_client/copy.c
===================================================================
--- subversion/libsvn_client/copy.c (revision 34599)
+++ subversion/libsvn_client/copy.c (working copy)
@@ -830,6 +830,7 @@ repos_to_repos_copy(svn_commit_info_t **commit_inf
               item = svn_client_commit_item_create2(pool);
               item->url = svn_path_join(top_url, url, pool);
               item->state_flags = SVN_CLIENT_COMMIT_ITEM_ADD;
+ item->path = url;
               APR_ARRAY_PUSH(commit_items, svn_client_commit_item3_t *) = item;
             }
         }
@@ -842,6 +843,7 @@ repos_to_repos_copy(svn_commit_info_t **commit_inf
           item = svn_client_commit_item_create2(pool);
           item->url = svn_path_join(top_url, info->dst_path, pool);
           item->state_flags = SVN_CLIENT_COMMIT_ITEM_ADD;
+ item->path = item->url;
           APR_ARRAY_PUSH(commit_items, svn_client_commit_item3_t *) = item;
           apr_hash_set(action_hash, info->dst_path, APR_HASH_KEY_STRING,
                        info);
@@ -1065,6 +1067,7 @@ wc_to_repos_copy(svn_commit_info_t **commit_info_p
               item = svn_client_commit_item_create2(pool);
               item->url = url;
               item->state_flags = SVN_CLIENT_COMMIT_ITEM_ADD;
+ item->path = url;
               APR_ARRAY_PUSH(commit_items, svn_client_commit_item3_t *) = item;
             }
         }
@@ -1077,6 +1080,7 @@ wc_to_repos_copy(svn_commit_info_t **commit_info_p
           item = svn_client_commit_item_create2(pool);
           item->url = pair->dst;
           item->state_flags = SVN_CLIENT_COMMIT_ITEM_ADD;
+ item->path = item->url;
           APR_ARRAY_PUSH(commit_items, svn_client_commit_item3_t *) = item;
         }

@@ -1128,6 +1132,7 @@ wc_to_repos_copy(svn_commit_info_t **commit_info_p
           item->state_flags = SVN_CLIENT_COMMIT_ITEM_ADD;
           item->incoming_prop_changes = apr_array_make(pool, 1,
                                                        sizeof(svn_prop_t *));
+ item->path = url;
           APR_ARRAY_PUSH(commit_items, svn_client_commit_item3_t *) = item;
         }
     }

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=980580

Received on 2008-12-06 20:51:58 CET

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.