You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by cm...@apache.org on 2010/10/28 22:54:15 UTC

svn commit: r1028472 - in /subversion/trunk/subversion: include/svn_client.h libsvn_client/deprecated.c libsvn_client/externals.c libsvn_client/relocate.c svn/main.c svn/relocate-cmd.c svn/switch-cmd.c tests/cmdline/switch_tests.py

Author: cmpilato
Date: Thu Oct 28 20:54:14 2010
New Revision: 1028472

URL: http://svn.apache.org/viewvc?rev=1028472&view=rev
Log:
Fix issue #3597 -- "relocate should update externals from the same
repository, too".

* subversion/include/svn_client.h
  (svn_client_relocate2): Add 'ignore_externals' parameter.
  (svn_client_relocate): Update docstring to note how the behavior
    relates to svn_client_relocate2()'s new 'ignore_externals' parameter.

* subversion/libsvn_client/externals.c
  (switch_dir_external): Update call to svn_client_relocate2(),
    passing FALSE for 'ignore_externals'.

* subversion/libsvn_client/deprecated.c
  (svn_client_relocate): Update call to svn_client_relocate2().

* subversion/svn/main.c
  (svn_cl__cmd_table): Make the 'relocate' subcommand accept
    --ignore-externals.

* subversion/svn/relocate-cmd.c
  (svn_cl__relocate): Update calls to svn_client_relocate2().

* subversion/svn/switch-cmd.c
  (rewrite_urls): Add 'ignore_externals' parameter, passed to updated
    calls to svn_client_relocate2().
  (svn_cl__switch): Update call to rewrite_urls().

* subversion/libsvn_client/relocate.c
  (externals_update_func, status_noop_func): New callback functions.
  (relocate_externals): New helper function.
  (svn_client_relocate2): Add 'ignore_externals' parameter.  If
    not ignoring externals, attempt to relocate any external working
    copies whose repository root URLs match the primary working copies.

* subversion/tests/cmdline/switch_tests.py
  (relocate_with_relative_externals): Update tests to also use a "../"
    type of relative external URL.
  (test_list): No longer expect relocate_with_relative_externals() to
    fail.

Modified:
    subversion/trunk/subversion/include/svn_client.h
    subversion/trunk/subversion/libsvn_client/deprecated.c
    subversion/trunk/subversion/libsvn_client/externals.c
    subversion/trunk/subversion/libsvn_client/relocate.c
    subversion/trunk/subversion/svn/main.c
    subversion/trunk/subversion/svn/relocate-cmd.c
    subversion/trunk/subversion/svn/switch-cmd.c
    subversion/trunk/subversion/tests/cmdline/switch_tests.py

Modified: subversion/trunk/subversion/include/svn_client.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/include/svn_client.h?rev=1028472&r1=1028471&r2=1028472&view=diff
==============================================================================
--- subversion/trunk/subversion/include/svn_client.h (original)
+++ subversion/trunk/subversion/include/svn_client.h Thu Oct 28 20:54:14 2010
@@ -3476,6 +3476,8 @@ svn_client_upgrade(const char *dir,
  * @param wcroot_dir Working copy root directory
  * @param from Original URL
  * @param to New URL
+ * @param ignore_externals If not set, recurse into external working
+ *        copies after relocating the primary working copy
  * @param ctx svn_client_ctx_t
  * @param pool The pool from which to perform memory allocations
  *
@@ -3485,11 +3487,13 @@ svn_error_t *
 svn_client_relocate2(const char *wcroot_dir,
                      const char *from,
                      const char *to,
+                     svn_boolean_t ignore_externals,
                      svn_client_ctx_t *ctx,
                      apr_pool_t *pool);
 
 /**
- * Similar to svn_client_relocate2().
+ * Similar to svn_client_relocate2(), but with @a ignore_externals
+ * always TRUE.
  *
  * @note As of the 1.7 API, @a dir is required to be a working copy
  * root directory, and @a recurse is required to be TRUE.

Modified: subversion/trunk/subversion/libsvn_client/deprecated.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/deprecated.c?rev=1028472&r1=1028471&r2=1028472&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/deprecated.c (original)
+++ subversion/trunk/subversion/libsvn_client/deprecated.c Thu Oct 28 20:54:14 2010
@@ -2092,5 +2092,5 @@ svn_client_relocate(const char *path,
   if (! recurse)
     svn_error_create(SVN_ERR_UNSUPPORTED_FEATURE, 0,
                      _("Non-recursive relocation not supported"));
-  return svn_client_relocate2(path, from, to, ctx, pool);
+  return svn_client_relocate2(path, from, to, TRUE, ctx, pool);
 }

Modified: subversion/trunk/subversion/libsvn_client/externals.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/externals.c?rev=1028472&r1=1028471&r2=1028472&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/externals.c (original)
+++ subversion/trunk/subversion/libsvn_client/externals.c Thu Oct 28 20:54:14 2010
@@ -230,7 +230,7 @@ switch_dir_external(const char *path,
                                                  subpool));
 
                   err = svn_client_relocate2(path, repos_root_url, repos_root,
-                                             ctx, subpool);
+                                             FALSE, ctx, subpool);
                   /* If the relocation failed because the new URL points
                      to another repository, then we need to relegate and
                      check out a new WC. */

Modified: subversion/trunk/subversion/libsvn_client/relocate.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/relocate.c?rev=1028472&r1=1028471&r2=1028472&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/relocate.c (original)
+++ subversion/trunk/subversion/libsvn_client/relocate.c Thu Oct 28 20:54:14 2010
@@ -125,15 +125,122 @@ validator_func(void *baton,
   return SVN_NO_ERROR;
 }
 
+
+/* Callback of type svn_wc_external_update_t.  Just squirrels away an
+   svn:externals property value into BATON (which is an apr_hash_t *
+   keyed on local absolute path).  */
+static svn_error_t *
+externals_update_func(void *baton,
+                      const char *local_abspath,
+                      const svn_string_t *old_val,
+                      const svn_string_t *new_val,
+                      svn_depth_t depth,
+                      apr_pool_t *scratch_pool)
+{
+  apr_hash_t *externals_hash = baton;
+  apr_pool_t *hash_pool = apr_hash_pool_get(externals_hash);
+
+  apr_hash_set(externals_hash, apr_pstrdup(hash_pool, local_abspath),
+               APR_HASH_KEY_STRING, svn_string_dup(new_val, hash_pool));
+  return SVN_NO_ERROR;
+}
+
+
+/* Callback of type svn_wc_status_func4_t.  Does nothing. */
+static svn_error_t *
+status_noop_func(void *baton,
+                 const char *local_abspath,
+                 const svn_wc_status3_t *status,
+                 apr_pool_t *scratch_pool)
+{
+  return SVN_NO_ERROR;
+}
+
+
+/* Examing the array of svn_wc_external_item2_t's EXT_DESC (parsed
+   from the svn:externals property set on LOCAL_ABSPATH) and determine
+   if the external working copies described by such should be
+   relocated as a side-effect of the relocation of their parent
+   working copy (from OLD_PARENT_REPOS_ROOT_URL to
+   NEW_PARENT_REPOS_ROOT_URL).  If so, attempt said relocation.  */
+static svn_error_t *
+relocate_externals(const char *local_abspath,
+                   apr_array_header_t *ext_desc,
+                   const char *old_parent_repos_root_url,
+                   const char *new_parent_repos_root_url,
+                   svn_client_ctx_t *ctx,
+                   apr_pool_t *scratch_pool)
+{
+  const char *url;
+  apr_pool_t *iterpool;
+  int i;
+
+  SVN_ERR(svn_client_url_from_path2(&url, local_abspath, ctx,
+                                    scratch_pool, scratch_pool));
+
+  /* Parse an externals definition into an array of external items. */
+
+  iterpool = svn_pool_create(scratch_pool);
+
+  for (i = 0; i < ext_desc->nelts; i++)
+    {
+      svn_wc_external_item2_t *ext_item =
+        APR_ARRAY_IDX(ext_desc, i, svn_wc_external_item2_t *);
+      const char *target_repos_root_url;
+      const char *target_abspath;
+      
+      svn_pool_clear(iterpool);
+
+      /* If this external isn't pulled in via a relative URL, ignore
+         it.  There's no sense in relocating a working copy only to
+         have the next 'svn update' try to point it back to another
+         location. */
+      if (! ((strncmp("../", ext_item->url, 3) == 0) ||
+             (strncmp("^/", ext_item->url, 2) == 0)))
+        continue;
+
+      /* If the external working copy's not-yet-relocated repos root
+         URL matches the primary working copy's pre-relocated
+         repository root URL, try to relocate that external, too.
+         You might wonder why this check is needed, given that we're
+         already limiting ourselves to externals pulled via URLs
+         relative to their primary working copy.  Well, it's because
+         you can use "../" to "crawl up" above one repository's URL
+         space and down into another one.  */
+      SVN_ERR(svn_dirent_get_absolute(&target_abspath,
+                                      svn_dirent_join(local_abspath,
+                                                      ext_item->target_dir,
+                                                      iterpool),
+                                      iterpool));
+      SVN_ERR(svn_client_root_url_from_path(&target_repos_root_url,
+                                            target_abspath, ctx, iterpool));
+
+      if (strcmp(target_repos_root_url, old_parent_repos_root_url) == 0)
+        SVN_ERR(svn_client_relocate2(target_abspath,
+                                     old_parent_repos_root_url,
+                                     new_parent_repos_root_url,
+                                     TRUE, ctx, iterpool));
+    }
+
+  svn_pool_destroy(iterpool);
+
+  return SVN_NO_ERROR;
+}
+
 svn_error_t *
 svn_client_relocate2(const char *wcroot_dir,
                      const char *from,
                      const char *to,
+                     svn_boolean_t ignore_externals,
                      svn_client_ctx_t *ctx,
                      apr_pool_t *pool)
 {
   struct validator_baton_t vb;
   const char *local_abspath;
+  apr_hash_t *externals_hash = NULL;
+  apr_hash_index_t *hi;
+  apr_pool_t *iterpool = NULL;
+  const char *old_repos_root_url, *new_repos_root_url;
 
   /* Populate our validator callback baton, and call the relocate code. */
   vb.ctx = ctx;
@@ -142,8 +249,61 @@ svn_client_relocate2(const char *wcroot_
   vb.pool = pool;
 
   SVN_ERR(svn_dirent_get_absolute(&local_abspath, wcroot_dir, pool));
+
+  /* If we're ignoring externals, just relocate and get outta here. */
+  if (ignore_externals)
+    {
+      return svn_error_return(svn_wc_relocate4(ctx->wc_ctx, local_abspath,
+                                               from, to, validator_func, &vb,
+                                               pool));
+    }
+
+  /* Fetch our current root URL. */
+  SVN_ERR(svn_client_root_url_from_path(&old_repos_root_url, local_abspath,
+                                        ctx, pool));
+
+  /* Perform the relocation. */
   SVN_ERR(svn_wc_relocate4(ctx->wc_ctx, local_abspath, from, to,
                            validator_func, &vb, pool));
 
+  /* Now fetch new current root URL. */
+  SVN_ERR(svn_client_root_url_from_path(&new_repos_root_url, local_abspath,
+                                        ctx, pool));
+
+  externals_hash = apr_hash_make(pool);
+
+  /* Do a status run just to harvest externals definitions. */
+  SVN_ERR(svn_wc_walk_status(ctx->wc_ctx, local_abspath,
+                             svn_depth_infinity, FALSE, FALSE, NULL,
+                             status_noop_func, NULL,
+                             externals_update_func, externals_hash,
+                             ctx->cancel_func, ctx->cancel_baton, pool));
+
+  /* No externals?  No problem.  We're done here. */
+  if (! apr_hash_count(externals_hash))
+    return SVN_NO_ERROR;
+
+  iterpool = svn_pool_create(pool);
+
+  for (hi = apr_hash_first(pool, externals_hash);
+       hi != NULL;
+       hi = apr_hash_next(hi))
+    {
+      const char *this_abspath = svn__apr_hash_index_key(hi);
+      const svn_string_t *pval = svn__apr_hash_index_val(hi);
+      apr_array_header_t *ext_desc;
+
+      svn_pool_clear(iterpool);
+
+      SVN_ERR(svn_wc_parse_externals_description3(&ext_desc, this_abspath,
+                                                  pval->data, FALSE,
+                                                  iterpool));
+      if (ext_desc->nelts)
+        SVN_ERR(relocate_externals(this_abspath, ext_desc, old_repos_root_url,
+                                   new_repos_root_url, ctx, iterpool));
+    }
+    
+  svn_pool_destroy(iterpool);
+
   return SVN_NO_ERROR;
 }

Modified: subversion/trunk/subversion/svn/main.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svn/main.c?rev=1028472&r1=1028471&r2=1028472&view=diff
==============================================================================
--- subversion/trunk/subversion/svn/main.c (original)
+++ subversion/trunk/subversion/svn/main.c Thu Oct 28 20:54:14 2010
@@ -960,7 +960,7 @@ const svn_opt_subcommand_desc2_t svn_cl_
      "    svn relocate http:// svn:// project1 project2\n"
      "    svn relocate http://www.example.com/repo/project \\\n"
      "                 svn://svn.example.com/repo/project\n"),
-    {0} },
+    {opt_ignore_externals} },
 
   { "resolve", svn_cl__resolve, {0}, N_
     ("Resolve conflicts on working copy files or directories.\n"

Modified: subversion/trunk/subversion/svn/relocate-cmd.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svn/relocate-cmd.c?rev=1028472&r1=1028471&r2=1028472&view=diff
==============================================================================
--- subversion/trunk/subversion/svn/relocate-cmd.c (original)
+++ subversion/trunk/subversion/svn/relocate-cmd.c Thu Oct 28 20:54:14 2010
@@ -48,6 +48,7 @@ svn_cl__relocate(apr_getopt_t *os,
 {
   svn_cl__opt_state_t *opt_state = ((svn_cl__cmd_baton_t *) baton)->opt_state;
   svn_client_ctx_t *ctx = ((svn_cl__cmd_baton_t *) baton)->ctx;
+  svn_boolean_t ignore_externals = opt_state->ignore_externals;
   apr_array_header_t *targets;
   const char *from = NULL, *to = NULL, *path;
 
@@ -77,7 +78,8 @@ svn_cl__relocate(apr_getopt_t *os,
 
       SVN_ERR(svn_client_url_from_path2(&from, path, ctx,
                                         scratch_pool, scratch_pool));
-      SVN_ERR(svn_client_relocate2(path, from, to, ctx, scratch_pool));
+      SVN_ERR(svn_client_relocate2(path, from, to, ignore_externals,
+                                   ctx, scratch_pool));
     }
   /* ... Everything else is form #1. */
   else
@@ -87,7 +89,8 @@ svn_cl__relocate(apr_getopt_t *os,
 
       if (targets->nelts == 2)
         {
-          SVN_ERR(svn_client_relocate2("", from, to, ctx, scratch_pool));
+          SVN_ERR(svn_client_relocate2("", from, to, ignore_externals,
+                                       ctx, scratch_pool));
         }
       else
         {
@@ -98,7 +101,8 @@ svn_cl__relocate(apr_getopt_t *os,
             {
               svn_pool_clear(subpool);
               path = APR_ARRAY_IDX(targets, i, const char *);
-              SVN_ERR(svn_client_relocate2(path, from, to, ctx, subpool));
+              SVN_ERR(svn_client_relocate2(path, from, to, ignore_externals,
+                                           ctx, subpool));
             }
           svn_pool_destroy(subpool);
         }

Modified: subversion/trunk/subversion/svn/switch-cmd.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svn/switch-cmd.c?rev=1028472&r1=1028471&r2=1028472&view=diff
==============================================================================
--- subversion/trunk/subversion/svn/switch-cmd.c (original)
+++ subversion/trunk/subversion/svn/switch-cmd.c Thu Oct 28 20:54:14 2010
@@ -41,6 +41,7 @@
 
 static svn_error_t *
 rewrite_urls(const apr_array_header_t *targets,
+             svn_boolean_t ignore_externals,
              svn_client_ctx_t *ctx,
              apr_pool_t *pool)
 {
@@ -65,7 +66,8 @@ rewrite_urls(const apr_array_header_t *t
 
   if (targets->nelts == 2)
     {
-      SVN_ERR(svn_client_relocate2("", from, to, ctx, pool));
+      SVN_ERR(svn_client_relocate2("", from, to, ignore_externals,
+                                   ctx, pool));
     }
   else
     {
@@ -75,7 +77,8 @@ rewrite_urls(const apr_array_header_t *t
         {
           const char *target = APR_ARRAY_IDX(targets, i, const char *);
           svn_pool_clear(subpool);
-          SVN_ERR(svn_client_relocate2(target, from, to, ctx, subpool));
+          SVN_ERR(svn_client_relocate2(target, from, to,
+                                       ignore_externals, ctx, subpool));
         }
     }
 
@@ -108,7 +111,8 @@ svn_cl__switch(apr_getopt_t *os,
 
   /* handle only-rewrite case specially */
   if (opt_state->relocate)
-    return rewrite_urls(targets, ctx, scratch_pool);
+    return rewrite_urls(targets, opt_state->ignore_externals,
+                        ctx, scratch_pool);
 
   if (targets->nelts < 1)
     return svn_error_create(SVN_ERR_CL_INSUFFICIENT_ARGS, 0, NULL);

Modified: subversion/trunk/subversion/tests/cmdline/switch_tests.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/switch_tests.py?rev=1028472&r1=1028471&r2=1028472&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/switch_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/switch_tests.py Thu Oct 28 20:54:14 2010
@@ -3104,7 +3104,8 @@ def relocate_with_relative_externals(sbo
   wc_dir = sbox.wc_dir
 
   # Add a relative external.
-  change_external(os.path.join(wc_dir, 'A', 'B'), "^/A/D/G G-ext", commit=True)
+  change_external(os.path.join(wc_dir, 'A', 'B'),
+                  "^/A/D/G G-ext\n../D/H H-ext", commit=True)
   svntest.actions.run_and_verify_svn(None, None, [], 'update', wc_dir)
   
   # Move our repository to another location.
@@ -3118,10 +3119,12 @@ def relocate_with_relative_externals(sbo
   svntest.actions.run_and_verify_svn(None, None, [], 'switch', '--relocate',
                                      repo_url, other_repo_url, wc_dir)
 
-  # Check the URL of the external -- was it updated to point to the
+  # Check the URLs of the externals -- were they updated to point to the
   # .other repository URL?
   svntest.actions.run_and_verify_info([{ 'URL' : '.*.other/A/D/G$' }],
                                       os.path.join(wc_dir, 'A', 'B', 'G-ext'))
+  svntest.actions.run_and_verify_info([{ 'URL' : '.*.other/A/D/H$' }],
+                                      os.path.join(wc_dir, 'A', 'B', 'H-ext'))
 
 
 ########################################################################
@@ -3168,7 +3171,7 @@ test_list = [ None,
               single_file_relocate,
               relocate_with_switched_children,
               XFail(copy_with_switched_subdir),
-              XFail(relocate_with_relative_externals),
+              relocate_with_relative_externals,
               ]
 
 if __name__ == '__main__':



Re: svn commit: r1028472 - in /subversion/trunk/subversion: include/svn_client.h libsvn_client/deprecated.c libsvn_client/externals.c libsvn_client/relocate.c svn/main.c svn/relocate-cmd.c svn/switch-cmd.c tests/cmdline/switch_tests.py

Posted by "Hyrum K. Wright" <hy...@mail.utexas.edu>.
On Thu, Oct 28, 2010 at 5:02 PM, C. Michael Pilato <cm...@collab.net> wrote:
> On 10/28/2010 04:54 PM, cmpilato@apache.org wrote:
>> Author: cmpilato
>> Date: Thu Oct 28 20:54:14 2010
>> New Revision: 1028472
>>
>> URL: http://svn.apache.org/viewvc?rev=1028472&view=rev
>> Log:
>> Fix issue #3597 -- "relocate should update externals from the same
>> repository, too".
>
> Heads up!  This broke the javahl build.  API changes requiring bindings
> love, etc.  I'm lost in that world, but will try to correct the problem
> tomorrow if nobody beats me to it.

I'll get around to the JavaHL stuffs sometime this evening.

-Hyrum

Re: svn commit: r1028472 - in /subversion/trunk/subversion: include/svn_client.h libsvn_client/deprecated.c libsvn_client/externals.c libsvn_client/relocate.c svn/main.c svn/relocate-cmd.c svn/switch-cmd.c tests/cmdline/switch_tests.py

Posted by "Hyrum K. Wright" <hy...@mail.utexas.edu>.
On Thu, Oct 28, 2010 at 8:27 PM, C. Michael Pilato <cm...@collab.net> wrote:
> On 10/28/2010 09:02 PM, Hyrum K. Wright wrote:
>> On Thu, Oct 28, 2010 at 5:25 PM, Philip Martin
>> <ph...@wandisco.com> wrote:
>>> I don't know whether we should pass TRUE or FALSE:
>
> [...]
>
>> When in doubt: ask the user!  I've pushed this parameter up to the
>> JavaHL API level in r1028568.
>>
>> But I also find it useful to just look at the C backward compat
>> wrapper, and follow the example therein.
>
> Uh-oh.  Did I pass FALSE in svn_client_relocate()?  Nope ... I passed TRUE
> (which is the correct thing).  Which backward compat wrapper were you
> referring to?

I was referring to svn_client_relocate(), but not the above patch.  My
general rule when duplicating backward compat wrappers in higher-level
APIs is just to follow the example of the lower-level compat wrappers.
 It was this rule that I was suggesting.

-Hyrum

Re: svn commit: r1028472 - in /subversion/trunk/subversion: include/svn_client.h libsvn_client/deprecated.c libsvn_client/externals.c libsvn_client/relocate.c svn/main.c svn/relocate-cmd.c svn/switch-cmd.c tests/cmdline/switch_tests.py

Posted by "C. Michael Pilato" <cm...@collab.net>.
On 10/28/2010 09:02 PM, Hyrum K. Wright wrote:
> On Thu, Oct 28, 2010 at 5:25 PM, Philip Martin
> <ph...@wandisco.com> wrote:
>> I don't know whether we should pass TRUE or FALSE:

[...]

> When in doubt: ask the user!  I've pushed this parameter up to the
> JavaHL API level in r1028568.
> 
> But I also find it useful to just look at the C backward compat
> wrapper, and follow the example therein.

Uh-oh.  Did I pass FALSE in svn_client_relocate()?  Nope ... I passed TRUE
(which is the correct thing).  Which backward compat wrapper were you
referring to?

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


Re: svn commit: r1028472 - in /subversion/trunk/subversion: include/svn_client.h libsvn_client/deprecated.c libsvn_client/externals.c libsvn_client/relocate.c svn/main.c svn/relocate-cmd.c svn/switch-cmd.c tests/cmdline/switch_tests.py

Posted by "Hyrum K. Wright" <hy...@mail.utexas.edu>.
On Thu, Oct 28, 2010 at 5:25 PM, Philip Martin
<ph...@wandisco.com> wrote:
> "C. Michael Pilato" <cm...@collab.net> writes:
>
>> On 10/28/2010 04:54 PM, cmpilato@apache.org wrote:
>>> Author: cmpilato
>>> Date: Thu Oct 28 20:54:14 2010
>>> New Revision: 1028472
>>>
>>> URL: http://svn.apache.org/viewvc?rev=1028472&view=rev
>>> Log:
>>> Fix issue #3597 -- "relocate should update externals from the same
>>> repository, too".
>>
>> Heads up!  This broke the javahl build.  API changes requiring bindings
>> love, etc.  I'm lost in that world, but will try to correct the problem
>> tomorrow if nobody beats me to it.
>
> I don't know whether we should pass TRUE or FALSE:
>
> Index: subversion/bindings/javahl/native/SVNClient.cpp
> ===================================================================
> --- subversion/bindings/javahl/native/SVNClient.cpp     (revision 1028508)
> +++ subversion/bindings/javahl/native/SVNClient.cpp     (working copy)
> @@ -1171,7 +1171,7 @@
>         return;
>
>     SVN_JNI_ERR(svn_client_relocate2(intPath.c_str(), intFrom.c_str(),
> -                                     intTo.c_str(), ctx,
> +                                     intTo.c_str(), FALSE, ctx,
>                                      requestPool.pool()), );
>  }

When in doubt: ask the user!  I've pushed this parameter up to the
JavaHL API level in r1028568.

But I also find it useful to just look at the C backward compat
wrapper, and follow the example therein.

-Hyrum

Re: svn commit: r1028472 - in /subversion/trunk/subversion: include/svn_client.h libsvn_client/deprecated.c libsvn_client/externals.c libsvn_client/relocate.c svn/main.c svn/relocate-cmd.c svn/switch-cmd.c tests/cmdline/switch_tests.py

Posted by Philip Martin <ph...@wandisco.com>.
"C. Michael Pilato" <cm...@collab.net> writes:

> On 10/28/2010 04:54 PM, cmpilato@apache.org wrote:
>> Author: cmpilato
>> Date: Thu Oct 28 20:54:14 2010
>> New Revision: 1028472
>> 
>> URL: http://svn.apache.org/viewvc?rev=1028472&view=rev
>> Log:
>> Fix issue #3597 -- "relocate should update externals from the same
>> repository, too".
>
> Heads up!  This broke the javahl build.  API changes requiring bindings
> love, etc.  I'm lost in that world, but will try to correct the problem
> tomorrow if nobody beats me to it.

I don't know whether we should pass TRUE or FALSE:

Index: subversion/bindings/javahl/native/SVNClient.cpp
===================================================================
--- subversion/bindings/javahl/native/SVNClient.cpp	(revision 1028508)
+++ subversion/bindings/javahl/native/SVNClient.cpp	(working copy)
@@ -1171,7 +1171,7 @@
         return;
 
     SVN_JNI_ERR(svn_client_relocate2(intPath.c_str(), intFrom.c_str(),
-                                     intTo.c_str(), ctx,
+                                     intTo.c_str(), FALSE, ctx,
                                      requestPool.pool()), );
 }
 
-- 
Philip

Re: svn commit: r1028472 - in /subversion/trunk/subversion: include/svn_client.h libsvn_client/deprecated.c libsvn_client/externals.c libsvn_client/relocate.c svn/main.c svn/relocate-cmd.c svn/switch-cmd.c tests/cmdline/switch_tests.py

Posted by "Hyrum K. Wright" <hy...@mail.utexas.edu>.
On Thu, Oct 28, 2010 at 5:02 PM, C. Michael Pilato <cm...@collab.net> wrote:
> On 10/28/2010 04:54 PM, cmpilato@apache.org wrote:
>> Author: cmpilato
>> Date: Thu Oct 28 20:54:14 2010
>> New Revision: 1028472
>>
>> URL: http://svn.apache.org/viewvc?rev=1028472&view=rev
>> Log:
>> Fix issue #3597 -- "relocate should update externals from the same
>> repository, too".
>
> Heads up!  This broke the javahl build.  API changes requiring bindings
> love, etc.  I'm lost in that world, but will try to correct the problem
> tomorrow if nobody beats me to it.

I'll get around to the JavaHL stuffs sometime this evening.

-Hyrum

Re: svn commit: r1028472 - in /subversion/trunk/subversion: include/svn_client.h libsvn_client/deprecated.c libsvn_client/externals.c libsvn_client/relocate.c svn/main.c svn/relocate-cmd.c svn/switch-cmd.c tests/cmdline/switch_tests.py

Posted by "C. Michael Pilato" <cm...@collab.net>.
On 10/28/2010 04:54 PM, cmpilato@apache.org wrote:
> Author: cmpilato
> Date: Thu Oct 28 20:54:14 2010
> New Revision: 1028472
> 
> URL: http://svn.apache.org/viewvc?rev=1028472&view=rev
> Log:
> Fix issue #3597 -- "relocate should update externals from the same
> repository, too".

Heads up!  This broke the javahl build.  API changes requiring bindings
love, etc.  I'm lost in that world, but will try to correct the problem
tomorrow if nobody beats me to it.

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


Re: svn commit: r1028472 - in /subversion/trunk/subversion: include/svn_client.h libsvn_client/deprecated.c libsvn_client/externals.c libsvn_client/relocate.c svn/main.c svn/relocate-cmd.c svn/switch-cmd.c tests/cmdline/switch_tests.py

Posted by "C. Michael Pilato" <cm...@collab.net>.
On 10/28/2010 04:54 PM, cmpilato@apache.org wrote:
> Author: cmpilato
> Date: Thu Oct 28 20:54:14 2010
> New Revision: 1028472
> 
> URL: http://svn.apache.org/viewvc?rev=1028472&view=rev
> Log:
> Fix issue #3597 -- "relocate should update externals from the same
> repository, too".

Heads up!  This broke the javahl build.  API changes requiring bindings
love, etc.  I'm lost in that world, but will try to correct the problem
tomorrow if nobody beats me to it.

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