Index: subversion/libsvn_subr/opt.c =================================================================== --- subversion/libsvn_subr/opt.c (revision 29570) +++ subversion/libsvn_subr/opt.c (working copy) @@ -962,9 +962,18 @@ utf8_target, peg_start - utf8_target); - /* URLs and wc-paths get treated differently. */ - if (svn_path_is_url(utf8_target)) + /* URLs, relative repository root URLs, and wc-paths each get treated + * differently. */ + if (0 == strcmp("^/", utf8_target)) { + /* Any processing of the relative repository root url will remove + * the needed trailing slash. There are no other components to + * escape or process so just return it as is. */ + /* Convert to URI. */ + target = apr_pstrdup(pool, utf8_target); + } + else if (svn_path_is_url(utf8_target)) + { /* No need to canonicalize a URL's case or path separators. */ /* Convert to URI. */ Index: subversion/libsvn_client/externals.c =================================================================== --- subversion/libsvn_client/externals.c (revision 29570) +++ subversion/libsvn_client/externals.c (working copy) @@ -368,7 +368,12 @@ repository root. The backpaths may only remove path elements, not the hostname. This allows an external to refer to another repository in the same server relative to the location of this - repository, say using SVNParentPath. */ + repository, say using SVNParentPath. + + Note: There is a partial re-implementation of this code in + svn/util.c: svn_cl__resolve_relative_url(). + Updates to this code MAY be applicable to the other code + (and vice versa). */ if ((0 == strncmp("../", uncanonicalized_url, 3)) || (0 == strncmp("^/", uncanonicalized_url, 2))) { Index: subversion/tests/cmdline/basic_tests.py =================================================================== --- subversion/tests/cmdline/basic_tests.py (revision 29570) +++ subversion/tests/cmdline/basic_tests.py (working copy) @@ -2159,7 +2159,93 @@ #---------------------------------------------------------------------- +# Relative urls +# +# Use blame to test three specific cases for relative url support. +def basic_relative_url_using_current_dir(sbox): + "basic relative url target using current dir" + # We'll use blame to test relative url parsing + sbox.build() + + # First, make a new revision of iota. + iota = os.path.join(sbox.wc_dir, 'iota') + svntest.main.file_append(iota, "New contents for iota\n") + svntest.main.run_svn(None, 'ci', + '-m', '', iota) + + expected_output = [ + " 1 jrandom This is the file 'iota'.\n", + " 2 jrandom New contents for iota\n", + ] + + orig_dir = os.getcwd() + os.chdir(sbox.wc_dir) + + output, error = svntest.actions.run_and_verify_svn(None, + expected_output, [], + 'blame', '^/iota') + + os.chdir(orig_dir) + +def basic_relative_url_using_other_targets(sbox): + "basic relative url target using other targets" + + sbox.build() + + # First, make a new revision of iota. + iota = os.path.join(sbox.wc_dir, 'iota') + svntest.main.file_append(iota, "New contents for iota\n") + svntest.main.run_svn(None, 'ci', + '-m', '', iota) + + # Now, make a new revision of A/mu . + mu = os.path.join(sbox.wc_dir, 'A', 'mu') + mu_url = sbox.repo_url + '/A/mu' + + svntest.main.file_append(mu, "New contents for mu\n") + svntest.main.run_svn(None, 'ci', + '-m', '', mu) + + + expected_output = [ + " 1 jrandom This is the file 'iota'.\n", + " 2 jrandom New contents for iota\n", + " 1 jrandom This is the file 'mu'.\n", + " 3 jrandom New contents for mu\n", + ] + + output, error = svntest.actions.run_and_verify_svn(None, + expected_output, [], 'blame', + '^/iota', mu_url) + +def basic_relative_url_multi_repo(sbox): + "basic relative url target with multiple repos" + + sbox.build() + repo_url1 = sbox.repo_url + repo_dir1 = sbox.repo_dir + wc_dir1 = sbox.wc_dir + + repo_dir2, repo_url2 = sbox.add_repo_path("other") + svntest.main.copy_repos(repo_dir1, repo_dir2, 1, 1) + wc_dir2 = sbox.add_wc_path("other") + svntest.actions.run_and_verify_svn("Unexpected error during co", + svntest.verify.AnyOutput, [], "co", + repo_url2, + wc_dir2) + + # Don't bother with making new revisions, the command should not work. + iota_url_repo1 = repo_url1 + '/iota' + iota_url_repo2 = repo_url2 + '/iota' + + output, error = svntest.actions.run_and_verify_svn(None, [], + svntest.verify.AnyOutput, 'blame', + '^/A/mu', iota_url_repo1, iota_url_repo2) + + +#---------------------------------------------------------------------- + ######################################################################## # Run the tests @@ -2205,6 +2291,9 @@ XFail(basic_rm_urls_multi_repos), automatic_conflict_resolution, info_nonexisting_file, + basic_relative_url_using_current_dir, + basic_relative_url_using_other_targets, + basic_relative_url_multi_repo, ] if __name__ == '__main__': Index: subversion/svn/merge-cmd.c =================================================================== --- subversion/svn/merge-cmd.c (revision 29570) +++ subversion/svn/merge-cmd.c (working copy) @@ -50,9 +50,9 @@ peg_revision2; apr_array_header_t *options, *ranges_to_merge = opt_state->revision_ranges; - SVN_ERR(svn_cl__args_to_target_array_print_reserved(&targets, os, - opt_state->targets, - pool)); + SVN_ERR(svn_cl__args_to_target_array(&targets, os, + opt_state->targets, + ctx, pool)); /* Parse at least one, and possible two, sources. */ if (targets->nelts >= 1) Index: subversion/svn/cl.h =================================================================== --- subversion/svn/cl.h (revision 29570) +++ subversion/svn/cl.h (working copy) @@ -555,7 +555,48 @@ "file" or, in any other case, the empty string. */ const char *svn_cl__node_kind_str(svn_node_kind_t kind); +/* + * Return true iff URL is a relative URL. Specifically that it starts + * with the characters "^/". + */ +svn_boolean_t svn_cl__is_relative_url(const char *url); +/* + * Convert the possibly relative url in RELATIVE_URL to an absolute + * url using REPOS_ROOT_URL and stick it in ABSOLUTE_URL. If the + * RELATIVE_URL starts with the characters '^/', they are replaced by + * the repository root url, otherwise the RELATIVE_URL is returned. + */ +svn_error_t * +svn_cl__resolve_relative_url(const char **absolute_url, + const char *relative_url, + const char *repos_root_url, + apr_pool_t *pool); + +/* Command-line client argument and target list parser: + * - Runs OS and KNOWN_TARGETS through the svn_opt_args_to_target_array3() + * function to get a concatentated target list from the command-line + * arguments (via OS) and KNOWN_TARGETS. + * - Prints a warning if a reserved filename is specified in the target list. + * - Resolves relative urls present in the target list using the following + * logic: + * - Find the root url for all the non-relative urls and paths (if they have + * one) using the client context, CTX. + * - Print an error and return if the root urls do not match + * - If there are no root urls found (all targets are relative urls or + * non-existant), use the root url of the current directory + * - If the current directory is not a working copy, print an error and + * return. + * - Replace the '^/' characters in the relative urls with the common root + * url of the other targets + */ +svn_error_t * +svn_cl__args_to_target_array(apr_array_header_t **targets_ret, + apr_getopt_t *os, + apr_array_header_t *known_targets, + svn_client_ctx_t *ctx, + apr_pool_t *pool); + /* If PROPNAME is one of the svn: properties with a boolean value, and * PROPVAL looks like an attempt to turn the property off (i.e., it's * "off", "no", "false", or ""), then print a warning to the user that @@ -576,12 +617,6 @@ svn_client_ctx_t *ctx, apr_pool_t *pool); -svn_error_t * -svn_cl__args_to_target_array_print_reserved(apr_array_header_t **targets_p, - apr_getopt_t *os, - apr_array_header_t *known_targets, - apr_pool_t *pool); - #ifdef __cplusplus } #endif /* __cplusplus */ Index: subversion/svn/propdel-cmd.c =================================================================== --- subversion/svn/propdel-cmd.c (revision 29570) +++ subversion/svn/propdel-cmd.c (working copy) @@ -56,11 +56,10 @@ properties, and it may even be useful to allow, in case invalid properties sneaked through somehow. */ - SVN_ERR(svn_cl__args_to_target_array_print_reserved(&targets, os, - opt_state->targets, - pool)); + SVN_ERR(svn_cl__args_to_target_array(&targets, os, + opt_state->targets, + ctx, pool)); - /* Add "." if user passed 0 file arguments */ svn_opt_push_implicit_dot_target(targets, pool); Index: subversion/svn/checkout-cmd.c =================================================================== --- subversion/svn/checkout-cmd.c (revision 29570) +++ subversion/svn/checkout-cmd.c (working copy) @@ -70,9 +70,9 @@ const char *repos_url; int i; - SVN_ERR(svn_cl__args_to_target_array_print_reserved(&targets, os, - opt_state->targets, - pool)); + SVN_ERR(svn_cl__args_to_target_array(&targets, os, + opt_state->targets, + ctx, pool)); if (! targets->nelts) return svn_error_create(SVN_ERR_CL_INSUFFICIENT_ARGS, 0, NULL); Index: subversion/svn/move-cmd.c =================================================================== --- subversion/svn/move-cmd.c (revision 29570) +++ subversion/svn/move-cmd.c (working copy) @@ -46,9 +46,9 @@ svn_commit_info_t *commit_info = NULL; svn_error_t *err; - SVN_ERR(svn_cl__args_to_target_array_print_reserved(&targets, os, - opt_state->targets, - pool)); + SVN_ERR(svn_cl__args_to_target_array(&targets, os, + opt_state->targets, + ctx, pool)); if (targets->nelts < 2) return svn_error_create(SVN_ERR_CL_INSUFFICIENT_ARGS, 0, NULL); Index: subversion/svn/mkdir-cmd.c =================================================================== --- subversion/svn/mkdir-cmd.c (revision 29570) +++ subversion/svn/mkdir-cmd.c (working copy) @@ -45,9 +45,9 @@ svn_commit_info_t *commit_info = NULL; svn_error_t *err; - SVN_ERR(svn_cl__args_to_target_array_print_reserved(&targets, os, - opt_state->targets, - pool)); + SVN_ERR(svn_cl__args_to_target_array(&targets, os, + opt_state->targets, + ctx, pool)); if (! targets->nelts) return svn_error_create(SVN_ERR_CL_INSUFFICIENT_ARGS, 0, NULL); Index: subversion/svn/cat-cmd.c =================================================================== --- subversion/svn/cat-cmd.c (revision 29570) +++ subversion/svn/cat-cmd.c (working copy) @@ -43,9 +43,9 @@ svn_stream_t *out; apr_pool_t *subpool = svn_pool_create(pool); - SVN_ERR(svn_cl__args_to_target_array_print_reserved(&targets, os, - opt_state->targets, - pool)); + SVN_ERR(svn_cl__args_to_target_array(&targets, os, + opt_state->targets, + ctx, pool)); /* Cat cannot operate on an implicit '.' so a filename is required */ if (! targets->nelts) Index: subversion/svn/revert-cmd.c =================================================================== --- subversion/svn/revert-cmd.c (revision 29570) +++ subversion/svn/revert-cmd.c (working copy) @@ -43,9 +43,9 @@ apr_array_header_t *targets = NULL; svn_error_t *err; - SVN_ERR(svn_cl__args_to_target_array_print_reserved(&targets, os, - opt_state->targets, - pool)); + SVN_ERR(svn_cl__args_to_target_array(&targets, os, + opt_state->targets, + ctx, pool)); /* Revert has no implicit dot-target `.', so don't you put that code here! */ if (! targets->nelts) Index: subversion/svn/diff-cmd.c =================================================================== --- subversion/svn/diff-cmd.c (revision 29570) +++ subversion/svn/diff-cmd.c (working copy) @@ -147,6 +147,7 @@ apr_pool_t *pool) { 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; apr_array_header_t *options; apr_array_header_t *targets; apr_file_t *outfile, *errfile; @@ -188,9 +189,9 @@ SVN_ERR(svn_cl__error_checked_fputs(sb->data, stdout)); } - SVN_ERR(svn_cl__args_to_target_array_print_reserved(&targets, os, - opt_state->targets, - pool)); + SVN_ERR(svn_cl__args_to_target_array(&targets, os, + opt_state->targets, + ctx, pool)); if (! opt_state->old_target && ! opt_state->new_target && (targets->nelts == 2) @@ -229,8 +230,8 @@ : APR_ARRAY_IDX(tmp, 0, const char *)); - SVN_ERR(svn_cl__args_to_target_array_print_reserved(&tmp2, os, tmp, - pool)); + SVN_ERR(svn_cl__args_to_target_array(&tmp2, os, tmp, ctx, pool)); + SVN_ERR(svn_opt_parse_path(&old_rev, &old_target, APR_ARRAY_IDX(tmp2, 0, const char *), pool)); Index: subversion/svn/copy-cmd.c =================================================================== --- subversion/svn/copy-cmd.c (revision 29570) +++ subversion/svn/copy-cmd.c (working copy) @@ -47,9 +47,10 @@ svn_error_t *err; int i; - SVN_ERR(svn_cl__args_to_target_array_print_reserved(&targets, os, - opt_state->targets, - pool)); + SVN_ERR(svn_cl__args_to_target_array(&targets, os, + opt_state->targets, + ctx, pool)); + if (targets->nelts < 2) return svn_error_create(SVN_ERR_CL_INSUFFICIENT_ARGS, 0, NULL); Index: subversion/svn/mergeinfo-cmd.c =================================================================== --- subversion/svn/mergeinfo-cmd.c (revision 29570) +++ subversion/svn/mergeinfo-cmd.c (working copy) @@ -131,9 +131,9 @@ apr_pool_t *subpool = svn_pool_create(pool); int i; - SVN_ERR(svn_cl__args_to_target_array_print_reserved(&targets, os, - opt_state->targets, - pool)); + SVN_ERR(svn_cl__args_to_target_array(&targets, os, + opt_state->targets, + ctx, pool)); /* Add "." if user passed 0 arguments. */ svn_opt_push_implicit_dot_target(targets, pool); Index: subversion/svn/list-cmd.c =================================================================== --- subversion/svn/list-cmd.c (revision 29570) +++ subversion/svn/list-cmd.c (working copy) @@ -218,9 +218,9 @@ apr_uint32_t dirent_fields; struct print_baton pb; - SVN_ERR(svn_cl__args_to_target_array_print_reserved(&targets, os, - opt_state->targets, - pool)); + SVN_ERR(svn_cl__args_to_target_array(&targets, os, + opt_state->targets, + ctx, pool)); /* Add "." if user passed 0 arguments */ svn_opt_push_implicit_dot_target(targets, pool); Index: subversion/svn/util.c =================================================================== --- subversion/svn/util.c (revision 29570) +++ subversion/svn/util.c (working copy) @@ -35,6 +35,7 @@ #include #include #include +#include #include "svn_pools.h" #include "svn_error.h" @@ -1009,15 +1010,94 @@ } } +svn_boolean_t +svn_cl__is_relative_url(const char *url) +{ + return(strncmp("^/", url, 2) ? FALSE : TRUE); +} svn_error_t * -svn_cl__args_to_target_array_print_reserved(apr_array_header_t **targets, - apr_getopt_t *os, - apr_array_header_t *known_targets, - apr_pool_t *pool) +svn_cl__resolve_relative_url(const char **absolute_url, + const char *relative_url, + const char *repos_root_url, + apr_pool_t *pool) { - svn_error_t *error = svn_opt_args_to_target_array3(targets, os, - known_targets, pool); + apr_status_t status; + apr_array_header_t *base_components; + apr_array_header_t *relative_components; + apr_uri_t parsed_uri; + + if (svn_path_is_url(relative_url)) + { + *absolute_url = apr_pstrdup(pool, relative_url); + + return SVN_NO_ERROR; + } + + /* + * This is a partial re-implementation of the relative external support + * found in: + * libsvn_client/externals.c: resolve_relative_external_url() + * + * Updates to this code MAY be applicable to the other code + * (and vice versa). + */ + + if (0 == strncmp("^/", relative_url, 2)) + { + /* Is there something beyond '^/'? If not just use what we have + * (the repository root URL) + */ + if (strlen(relative_url) == 2) + { + *absolute_url = apr_pstrdup(pool, repos_root_url); + } + else + { + status = apr_uri_parse(pool, repos_root_url, &parsed_uri); + if (status) + return svn_error_createf(SVN_ERR_BAD_URL, 0, + _("Illegal repository root URL '%s'"), + repos_root_url); + + base_components = svn_path_decompose(parsed_uri.path, + pool); + + relative_components = svn_path_decompose(relative_url + 2, + pool); + + apr_array_cat(base_components, relative_components); + + parsed_uri.path = (char *)svn_path_compose(base_components, + pool); + parsed_uri.query = NULL; + parsed_uri.fragment = NULL; + + *absolute_url = apr_uri_unparse(pool, &parsed_uri, 0); + } + } + else + return svn_error_createf(SVN_ERR_BAD_URL, 0, + _("Improper relative URL '%s'"), + relative_url); + + return SVN_NO_ERROR; +} + +svn_error_t * +svn_cl__args_to_target_array(apr_array_header_t **targets_ret, + apr_getopt_t *os, + apr_array_header_t *known_targets, + svn_client_ctx_t *ctx, + apr_pool_t *pool) +{ + int i; + const char *root_url = NULL; + apr_array_header_t *targets; + svn_error_t *error; + + error = svn_opt_args_to_target_array3(&targets, os, known_targets, pool); + if (error) { if (error->apr_err == SVN_ERR_RESERVED_FILENAME_SPECIFIED) @@ -1028,10 +1108,96 @@ else return error; } + + /* + * First determine whether to even bother with root urls, + * at least one relative url for it to matter. + */ + for (i = 0; i < targets->nelts; i++) + { + const char *target = APR_ARRAY_IDX(targets, i, const char *); + + if (svn_cl__is_relative_url(target)) + break; + } + + /* Was a relative url found? */ + if (i >= targets->nelts) + { + *targets_ret = targets; + return SVN_NO_ERROR; + } + + /* + * Now determine the common root url to use. + */ + for (i = 0; i < targets->nelts; i++) + { + const char *target = APR_ARRAY_IDX(targets, i, const char *); + const char *tmp_root_url; + + if (svn_cl__is_relative_url(target)) + continue; + + if ((error = svn_client_root_url_from_path(&tmp_root_url, target, + ctx, pool))) + { + if ( (error->apr_err == SVN_ERR_ENTRY_NOT_FOUND) + || (error->apr_err == SVN_ERR_WC_NOT_DIRECTORY)) + { + svn_error_clear(error); + continue; + } + else + return error; + } + else if ( (root_url != NULL) + && (strcmp(root_url, tmp_root_url) != 0)) + return svn_error_createf(SVN_ERR_ILLEGAL_TARGET, NULL, + _("All non-relative targets must have the same root url.")); + else + root_url = tmp_root_url; + } + + /* + * Use the current directory's root url if one wasn't found using the + * arguments. + */ + if (root_url == NULL) + { + if ((error = svn_client_root_url_from_path(&root_url, + svn_path_canonicalize(".", pool), + ctx, pool))) + return error; + } + + /* + * Finally, resolve any relative urls found in the targets array. + */ + + *targets_ret = apr_array_make(pool, targets->nelts, sizeof(const char *)); + + for (i = 0; i < targets->nelts; i++) + { + const char *target = APR_ARRAY_IDX(targets, i, const char *); + + if (svn_cl__is_relative_url(target)) + { + const char *abs_target; + + SVN_ERR(svn_cl__resolve_relative_url(&abs_target, target, + root_url, pool)); + APR_ARRAY_PUSH(*targets_ret, const char *) = abs_target; + } + else + { + APR_ARRAY_PUSH(*targets_ret, const char *) = target; + } + } + return SVN_NO_ERROR; } - /* Helper for svn_cl__get_changelist(); implements svn_changelist_receiver_t. */ static svn_error_t * @@ -1046,7 +1212,6 @@ return SVN_NO_ERROR; } - svn_error_t * svn_cl__changelist_paths(apr_array_header_t **paths, const apr_array_header_t *changelists, @@ -1067,6 +1232,7 @@ } found = apr_array_make(pool, 8, sizeof(const char *)); + for (i = 0; i < targets->nelts; i++) { const char *target = APR_ARRAY_IDX(targets, i, const char *); @@ -1080,5 +1246,3 @@ SVN_ERR(svn_hash_from_cstring_keys(&paths_hash, found, pool)); return svn_hash_keys(paths, paths_hash, pool); } - - Index: subversion/svn/propget-cmd.c =================================================================== --- subversion/svn/propget-cmd.c (revision 29570) +++ subversion/svn/propget-cmd.c (working copy) @@ -180,9 +180,9 @@ _("'%s' is not a valid Subversion property name"), pname_utf8); - SVN_ERR(svn_cl__args_to_target_array_print_reserved(&targets, os, - opt_state->targets, - pool)); + SVN_ERR(svn_cl__args_to_target_array(&targets, os, + opt_state->targets, + ctx, pool)); /* Add "." if user passed 0 file arguments */ svn_opt_push_implicit_dot_target(targets, pool); Index: subversion/svn/blame-cmd.c =================================================================== --- subversion/svn/blame-cmd.c (revision 29570) +++ subversion/svn/blame-cmd.c (working copy) @@ -202,9 +202,9 @@ svn_boolean_t end_revision_unspecified = FALSE; svn_diff_file_options_t *diff_options = svn_diff_file_options_create(pool); - SVN_ERR(svn_cl__args_to_target_array_print_reserved(&targets, os, - opt_state->targets, - pool)); + SVN_ERR(svn_cl__args_to_target_array(&targets, os, + opt_state->targets, + ctx, pool)); /* Blame needs a file on which to operate. */ if (! targets->nelts) Index: subversion/svn/log-cmd.c =================================================================== --- subversion/svn/log-cmd.c (revision 29570) +++ subversion/svn/log-cmd.c (working copy) @@ -466,9 +466,9 @@ " XML mode")); } - SVN_ERR(svn_cl__args_to_target_array_print_reserved(&targets, os, - opt_state->targets, - pool)); + SVN_ERR(svn_cl__args_to_target_array(&targets, os, + opt_state->targets, + ctx, pool)); /* Add "." if user passed 0 arguments */ svn_opt_push_implicit_dot_target(targets, pool); Index: subversion/svn/changelist-cmd.c =================================================================== --- subversion/svn/changelist-cmd.c (revision 29570) +++ subversion/svn/changelist-cmd.c (working copy) @@ -58,9 +58,9 @@ } /* Parse the remaining arguments as paths. */ - SVN_ERR(svn_cl__args_to_target_array_print_reserved(&targets, os, - opt_state->targets, - pool)); + SVN_ERR(svn_cl__args_to_target_array(&targets, os, + opt_state->targets, + ctx, pool)); /* Add "." if user passed 0 arguments */ svn_opt_push_implicit_dot_target(targets, pool); Index: subversion/svn/update-cmd.c =================================================================== --- subversion/svn/update-cmd.c (revision 29570) +++ subversion/svn/update-cmd.c (working copy) @@ -46,8 +46,9 @@ svn_depth_t depth; svn_boolean_t depth_is_sticky; - SVN_ERR(svn_opt_args_to_target_array3(&targets, os, - opt_state->targets, pool)); + SVN_ERR(svn_cl__args_to_target_array(&targets, os, + opt_state->targets, + ctx, pool)); /* Add "." if user passed 0 arguments */ svn_opt_push_implicit_dot_target(targets, pool); Index: subversion/svn/resolved-cmd.c =================================================================== --- subversion/svn/resolved-cmd.c (revision 29570) +++ subversion/svn/resolved-cmd.c (working copy) @@ -74,9 +74,10 @@ _("invalid 'accept' ARG")); } - SVN_ERR(svn_cl__args_to_target_array_print_reserved(&targets, os, - opt_state->targets, - pool)); + SVN_ERR(svn_cl__args_to_target_array(&targets, os, + opt_state->targets, + ctx, pool)); + if (! targets->nelts) return svn_error_create(SVN_ERR_CL_INSUFFICIENT_ARGS, 0, NULL); Index: subversion/svn/cleanup-cmd.c =================================================================== --- subversion/svn/cleanup-cmd.c (revision 29570) +++ subversion/svn/cleanup-cmd.c (working copy) @@ -43,9 +43,9 @@ apr_pool_t *subpool; int i; - SVN_ERR(svn_cl__args_to_target_array_print_reserved(&targets, os, - opt_state->targets, - pool)); + SVN_ERR(svn_cl__args_to_target_array(&targets, os, + opt_state->targets, + ctx, pool)); /* Add "." if user passed 0 arguments */ svn_opt_push_implicit_dot_target(targets, pool); Index: subversion/svn/add-cmd.c =================================================================== --- subversion/svn/add-cmd.c (revision 29570) +++ subversion/svn/add-cmd.c (working copy) @@ -45,9 +45,9 @@ int i; apr_pool_t *subpool; - SVN_ERR(svn_cl__args_to_target_array_print_reserved(&targets, os, - opt_state->targets, - pool)); + SVN_ERR(svn_cl__args_to_target_array(&targets, os, + opt_state->targets, + ctx, pool)); if (! targets->nelts) return svn_error_create(SVN_ERR_CL_INSUFFICIENT_ARGS, 0, NULL); Index: subversion/svn/commit-cmd.c =================================================================== --- subversion/svn/commit-cmd.c (revision 29570) +++ subversion/svn/commit-cmd.c (working copy) @@ -51,9 +51,9 @@ svn_boolean_t no_unlock = FALSE; svn_commit_info_t *commit_info = NULL; - SVN_ERR(svn_cl__args_to_target_array_print_reserved(&targets, os, - opt_state->targets, - pool)); + SVN_ERR(svn_cl__args_to_target_array(&targets, os, + opt_state->targets, + ctx, pool)); /* Add "." if user passed 0 arguments. */ svn_opt_push_implicit_dot_target(targets, pool); Index: subversion/svn/propset-cmd.c =================================================================== --- subversion/svn/propset-cmd.c (revision 29570) +++ subversion/svn/propset-cmd.c (working copy) @@ -91,9 +91,9 @@ /* Suck up all the remaining arguments into a targets array */ - SVN_ERR(svn_cl__args_to_target_array_print_reserved(&targets, os, - opt_state->targets, - pool)); + SVN_ERR(svn_cl__args_to_target_array(&targets, os, + opt_state->targets, + ctx, pool)); /* Implicit "." is okay for revision properties; it just helps us find the right repository. */ Index: subversion/svn/switch-cmd.c =================================================================== --- subversion/svn/switch-cmd.c (revision 29570) +++ subversion/svn/switch-cmd.c (working copy) @@ -99,9 +99,9 @@ /* This command should discover (or derive) exactly two cmdline arguments: a local path to update ("target"), and a new url to switch to ("switch_url"). */ - SVN_ERR(svn_cl__args_to_target_array_print_reserved(&targets, os, - opt_state->targets, - pool)); + SVN_ERR(svn_cl__args_to_target_array(&targets, os, + opt_state->targets, + ctx, pool)); /* handle only-rewrite case specially */ if (opt_state->relocate) Index: subversion/svn/delete-cmd.c =================================================================== --- subversion/svn/delete-cmd.c (revision 29570) +++ subversion/svn/delete-cmd.c (working copy) @@ -44,9 +44,9 @@ svn_commit_info_t *commit_info = NULL; svn_error_t *err; - SVN_ERR(svn_cl__args_to_target_array_print_reserved(&targets, os, - opt_state->targets, - pool)); + SVN_ERR(svn_cl__args_to_target_array(&targets, os, + opt_state->targets, + ctx, pool)); if (! targets->nelts) return svn_error_create(SVN_ERR_CL_INSUFFICIENT_ARGS, 0, NULL); Index: subversion/svn/import-cmd.c =================================================================== --- subversion/svn/import-cmd.c (revision 29570) +++ subversion/svn/import-cmd.c (working copy) @@ -73,9 +73,9 @@ * ### kff todo: review above behaviors. */ - SVN_ERR(svn_cl__args_to_target_array_print_reserved(&targets, os, - opt_state->targets, - pool)); + SVN_ERR(svn_cl__args_to_target_array(&targets, os, + opt_state->targets, + ctx, pool)); if (targets->nelts < 1) return svn_error_create Index: subversion/svn/proplist-cmd.c =================================================================== --- subversion/svn/proplist-cmd.c (revision 29570) +++ subversion/svn/proplist-cmd.c (working copy) @@ -112,10 +112,11 @@ apr_array_header_t *targets; int i; - SVN_ERR(svn_cl__args_to_target_array_print_reserved(&targets, os, - opt_state->targets, - pool)); + SVN_ERR(svn_cl__args_to_target_array(&targets, os, + opt_state->targets, + ctx, pool)); + /* Add "." if user passed 0 file arguments */ svn_opt_push_implicit_dot_target(targets, pool); Index: subversion/svn/export-cmd.c =================================================================== --- subversion/svn/export-cmd.c (revision 29570) +++ subversion/svn/export-cmd.c (working copy) @@ -46,9 +46,9 @@ svn_opt_revision_t peg_revision; const char *truefrom; - SVN_ERR(svn_cl__args_to_target_array_print_reserved(&targets, os, - opt_state->targets, - pool)); + SVN_ERR(svn_cl__args_to_target_array(&targets, os, + opt_state->targets, + ctx, pool)); /* We want exactly 1 or 2 targets for this subcommand. */ if (targets->nelts < 1) Index: subversion/svn/status-cmd.c =================================================================== --- subversion/svn/status-cmd.c (revision 29570) +++ subversion/svn/status-cmd.c (working copy) @@ -216,9 +216,9 @@ svn_opt_revision_t rev; struct status_baton sb; - SVN_ERR(svn_cl__args_to_target_array_print_reserved(&targets, os, - opt_state->targets, - pool)); + SVN_ERR(svn_cl__args_to_target_array(&targets, os, + opt_state->targets, + ctx, pool)); /* Add "." if user passed 0 arguments */ svn_opt_push_implicit_dot_target(targets, pool); Index: subversion/svn/propedit-cmd.c =================================================================== --- subversion/svn/propedit-cmd.c (revision 29570) +++ subversion/svn/propedit-cmd.c (working copy) @@ -66,9 +66,9 @@ " Subversion-controlled properties")); /* Suck up all the remaining arguments into a targets array */ - SVN_ERR(svn_cl__args_to_target_array_print_reserved(&targets, os, - opt_state->targets, - pool)); + SVN_ERR(svn_cl__args_to_target_array(&targets, os, + opt_state->targets, + ctx, pool)); if (opt_state->revprop) /* operate on a revprop */ { Index: subversion/svn/lock-cmd.c =================================================================== --- subversion/svn/lock-cmd.c (revision 29570) +++ subversion/svn/lock-cmd.c (working copy) @@ -85,9 +85,9 @@ apr_array_header_t *targets; const char *comment; - SVN_ERR(svn_cl__args_to_target_array_print_reserved(&targets, os, - opt_state->targets, - pool)); + SVN_ERR(svn_cl__args_to_target_array(&targets, os, + opt_state->targets, + ctx, pool)); /* We only support locking files, so '.' is not valid. */ if (! targets->nelts) Index: subversion/svn/info-cmd.c =================================================================== --- subversion/svn/info-cmd.c (revision 29570) +++ subversion/svn/info-cmd.c (working copy) @@ -450,9 +450,9 @@ svn_opt_revision_t peg_revision; svn_info_receiver_t receiver; - SVN_ERR(svn_cl__args_to_target_array_print_reserved(&targets, os, - opt_state->targets, - pool)); + SVN_ERR(svn_cl__args_to_target_array(&targets, os, + opt_state->targets, + ctx, pool)); /* Add "." if user passed 0 arguments. */ svn_opt_push_implicit_dot_target(targets, pool); Index: subversion/svn/unlock-cmd.c =================================================================== --- subversion/svn/unlock-cmd.c (revision 29570) +++ subversion/svn/unlock-cmd.c (working copy) @@ -44,9 +44,9 @@ svn_client_ctx_t *ctx = ((svn_cl__cmd_baton_t *) baton)->ctx; apr_array_header_t *targets; - SVN_ERR(svn_cl__args_to_target_array_print_reserved(&targets, os, - opt_state->targets, - pool)); + SVN_ERR(svn_cl__args_to_target_array(&targets, os, + opt_state->targets, + ctx, pool)); /* We don't support unlock on directories, so "." is not relevant. */ if (! targets->nelts)