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

Oddities in repos_to_repos_copy

From: Julian Foad <julianfoad_at_btopenworld.com>
Date: 2005-11-17 02:24:38 CET

Has anybody got the will to look at this patch-in-progress and review the code
simplification and tell me the consequences of the error in the comment? (I'm
sure I could work it out if I try, but am too tired to try at the moment.)
Please feel free to make the fix yourself if you want.

- Julian

[[[
Fix and tidy stuff. (I'll write a better summary when I know what the change
will be.)

* subversion/libsvn_client/copy.c
   (repos_to_repos_copy): ### Note a problem; how should we fix it? (I'll not
     do this, I'll make an actual fix or a doc-fix or whatever is required.)
     Remove tests for a flag that cannot be set. Fix comments.
]]]

Index: subversion/libsvn_client/copy.c
===================================================================
--- subversion/libsvn_client/copy.c (revision 17263)
+++ subversion/libsvn_client/copy.c (working copy)
@@ -346,6 +346,7 @@ repos_to_repos_copy (svn_commit_info_t *
       refer to it both times. Conversely, if the repositories are
       different, then they can't share a non-empty prefix, so top_url
       would still be "" and svn_ra_get_library() would still error.
+### That sentence is false: they can share a non-empty prefix. JAF.
       Thus we can get this check without extra network turnarounds to
       fetch the UUIDs.
     */
@@ -419,7 +420,7 @@ repos_to_repos_copy (svn_commit_info_t *
                                  _("Unrecognized node kind of '%s'"), dst_url);
      }

- /* Create a new commit item and add it to the array. */
+ /* Get a log message */
    if (ctx->log_msg_func || ctx->log_msg_func2)
      {
        svn_client_commit_item2_t *item;
@@ -427,17 +428,19 @@ repos_to_repos_copy (svn_commit_info_t *
        apr_array_header_t *commit_items
          = apr_array_make (pool, 2, sizeof (item));

+ /* Create a new commit item and add it to the array. */
        item = apr_pcalloc (pool, sizeof (*item));
        item->url = svn_path_join (top_url, dst_rel, pool);
        item->state_flags = SVN_CLIENT_COMMIT_ITEM_ADD;
        APR_ARRAY_PUSH(commit_items, svn_client_commit_item2_t *) = item;
- if (is_move && (! resurrection))
+ if (is_move)
          {
            item = apr_pcalloc (pool, sizeof (*item));
            item->url = svn_path_join (top_url, src_rel, pool);
            item->state_flags = SVN_CLIENT_COMMIT_ITEM_DELETE;
            APR_ARRAY_PUSH(commit_items, svn_client_commit_item2_t *) = item;
          }
+
        SVN_ERR (svn_client__get_log_msg(&message, &tmp_file, commit_items,
                                         ctx, pool));
        if (! message)
@@ -458,7 +461,7 @@ repos_to_repos_copy (svn_commit_info_t *

    /* Setup our PATHS for the path-based editor drive. */
    APR_ARRAY_PUSH (paths, const char *) = dst_rel;
- if (is_move && (! resurrection))
+ if (is_move)
      APR_ARRAY_PUSH (paths, const char *) = src_rel;

    /* Setup the callback baton. */

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Nov 17 02:25:16 2005

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.