2 * util.c: Subversion command line client utility functions. Any
3 * functions that need to be shared across subcommands should be put
6 * ====================================================================
7 * Licensed to the Apache Software Foundation (ASF) under one
8 * or more contributor license agreements. See the NOTICE file
9 * distributed with this work for additional information
10 * regarding copyright ownership. The ASF licenses this file
11 * to you under the Apache License, Version 2.0 (the
12 * "License"); you may not use this file except in compliance
13 * with the License. You may obtain a copy of the License at
15 * http://www.apache.org/licenses/LICENSE-2.0
17 * Unless required by applicable law or agreed to in writing,
18 * software distributed under the License is distributed on an
19 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
20 * KIND, either express or implied. See the License for the
21 * specific language governing permissions and limitations
23 * ====================================================================
26 /* ==================================================================== */
36 #include "svn_private_config.h"
37 #include "svn_error.h"
45 svn_cl__args_to_target_array_print_reserved(apr_array_header_t **targets,
47 const apr_array_header_t *known_targets,
48 svn_client_ctx_t *ctx,
49 svn_boolean_t keep_last_origpath_on_truepath_collision,
52 svn_error_t *err = svn_client_args_to_target_array2(targets,
56 keep_last_origpath_on_truepath_collision,
60 if (err->apr_err == SVN_ERR_RESERVED_FILENAME_SPECIFIED)
62 svn_handle_error2(err, stderr, FALSE, "svn: Skipping argument: ");
66 return svn_error_trace(err);
72 svn_cl__check_target_is_local_path(const char *target)
74 if (svn_path_is_url(target))
75 return svn_error_createf(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
76 _("'%s' is not a local path"), target);
81 svn_cl__local_style_skip_ancestor(const char *parent_path,
85 const char *relpath = NULL;
88 relpath = svn_dirent_skip_ancestor(parent_path, path);
90 return svn_dirent_local_style(relpath ? relpath : path, pool);