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

[PATCH] remove unused parameter from libsvn_client/copy.c:setup_copy()

From: Stefan Sperling <stsp_at_elego.de>
Date: Sat, 26 Jul 2008 18:03:46 +0200

Good news everyone,

libsvn_subr/copy.c:setup_copy() takes a parameter named 'force'
which was used in 1.4.x but is not used anymore in 1.5.x and
trunk.

svn_client_move5 still exposes this parameter in public API.
The API docs in trunk say the following and I think they're wrong
because, well, force is ignored:

 * - If one of @a src_paths contains locally modified and/or unversioned
 * items and @a force is not set, the move will fail. If @a force is set
 * such items will be removed.

The above should probably be replaced by a description of the
current behaviour (which I have not had time to figure out yet).

Rev'ing svn_client_move5 for this is overkill.
I'd suggest adding a comment to the docs of svn_client_move5 stating
that if the function is rev'd again for any reason, the force parameter
could/should be dropped.

For starters, here's a patch that removes the force parameter
from setup_copy. OK to commit?

[[[

* subversion/libsvn_client/copy.c
  (setup_copy): Drop unused force parameter.
  (svn_client_copy4, svn_client_move5, svn_client_move): Adjust
   calls to setup_copy accordingly.

]]]

Index: subversion/libsvn_client/copy.c
===================================================================
--- subversion/libsvn_client/copy.c (revision 32219)
+++ subversion/libsvn_client/copy.c (working copy)
@@ -1708,7 +1708,6 @@ setup_copy(svn_commit_info_t **commit_info_p,
            const apr_array_header_t *sources,
            const char *dst_path_in,
            svn_boolean_t is_move,
- svn_boolean_t force,
            svn_boolean_t make_parents,
            const apr_hash_t *revprop_table,
            svn_client_ctx_t *ctx,
@@ -1988,7 +1987,6 @@ svn_client_copy4(svn_commit_info_t **commit_info_p
   err = setup_copy(&commit_info,
                    sources, dst_path,
                    FALSE /* is_move */,
- TRUE /* force, set to avoid deletion check */,
                    make_parents,
                    revprop_table,
                    ctx,
@@ -2015,7 +2013,6 @@ svn_client_copy4(svn_commit_info_t **commit_info_p
                        sources,
                        svn_path_join(dst_path, src_basename, subpool),
                        FALSE /* is_move */,
- TRUE /* force, set to avoid deletion check */,
                        make_parents,
                        revprop_table,
                        ctx,
@@ -2147,7 +2144,6 @@ svn_client_move5(svn_commit_info_t **commit_info_p
 
   err = setup_copy(&commit_info, sources, dst_path,
                    TRUE /* is_move */,
- force,
                    make_parents,
                    revprop_table,
                    ctx,
@@ -2170,7 +2166,6 @@ svn_client_move5(svn_commit_info_t **commit_info_p
       err = setup_copy(&commit_info, sources,
                        svn_path_join(dst_path, src_basename, pool),
                        TRUE /* is_move */,
- force,
                        make_parents,
                        revprop_table,
                        ctx,
@@ -2292,7 +2287,6 @@ svn_client_move(svn_client_commit_info_t **commit_
   err = setup_copy(&commit_info,
                    sources, dst_path,
                    TRUE /* is_move */,
- force,
                    FALSE /* make_parents */,
                    NULL,
                    ctx,

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org
Received on 2008-07-26 18:04:08 CEST

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.