Author: stsp
Date: Mon Jul 24 09:42:08 2017
New Revision: 1802775
URL: http://svn.apache.org/viewvc?rev=1802775&view=rev
Log:
On the addremove branch, stop requiring versioned directory targets.
Allows commands such as 'svn addremove *.c *.h' to work.
Suggested by: rhuijben
* subversion/libsvn_client/addremove.c
(addremove): Remove versioned directory check.
* subversion/svn/svn.c
(svn_cl__cmd_table): Update addremove help output accordingly.
Modified:
subversion/branches/addremove/subversion/libsvn_client/addremove.c
subversion/branches/addremove/subversion/svn/svn.c
Modified: subversion/branches/addremove/subversion/libsvn_client/addremove.c
URL:
http://svn.apache.org/viewvc/subversion/branches/addremove/subversion/libsvn_client/addremove.c?rev=1802775&r1=1802774&r2=1802775&view=diff
==============================================================================
--- subversion/branches/addremove/subversion/libsvn_client/addremove.c
(original)
+++ subversion/branches/addremove/subversion/libsvn_client/addremove.c Mon Jul
24 09:42:08 2017
@@ -96,22 +96,9 @@ addremove(const char *local_abspath, svn
svn_client_ctx_t *ctx, apr_pool_t *scratch_pool)
{
struct addremove_status_baton b;
- struct svn_wc_status3_t *status;
- svn_node_kind_t kind_on_disk;
apr_hash_index_t *hi;
apr_pool_t *iterpool;
- /* Our target must be a versioned directory. */
- SVN_ERR(svn_wc_status3(&status, ctx->wc_ctx, local_abspath,
- scratch_pool, scratch_pool));
- SVN_ERR(svn_io_check_path(local_abspath, &kind_on_disk, scratch_pool));
- if (status->kind != svn_node_dir || kind_on_disk != svn_node_dir ||
- !status->versioned)
- return svn_error_createf(SVN_ERR_ILLEGAL_TARGET, NULL,
- _("'%s' is not a versioned directory"),
- svn_dirent_local_style(local_abspath,
- scratch_pool));
-
b.missing = apr_hash_make(scratch_pool);
b.unversioned = apr_hash_make(scratch_pool);
@@ -126,6 +113,7 @@ addremove(const char *local_abspath, svn
hi = apr_hash_next(hi))
{
const char *unversioned_abspath = apr_hash_this_key(hi);
+ svn_node_kind_t kind_on_disk;
svn_pool_clear(iterpool);
Modified: subversion/branches/addremove/subversion/svn/svn.c
URL:
http://svn.apache.org/viewvc/subversion/branches/addremove/subversion/svn/svn.c?rev=1802775&r1=1802774&r2=1802775&view=diff
==============================================================================
--- subversion/branches/addremove/subversion/svn/svn.c (original)
+++ subversion/branches/addremove/subversion/svn/svn.c Mon Jul 24 09:42:08 2017
@@ -521,8 +521,6 @@ const svn_opt_subcommand_desc2_t svn_cl_
" unversioned files and directories under version control, and
removing\n"
" missing files and directories from version control.\n"
"\n"
- " The specified PATHs must be versioned directories.\n"
- "\n"
" Additions and deletions will be scheduled for the next commit and\n"
" will not take effect in the repository unless they are committed.\n"
"\n"