~ubuntu-branches/debian/sid/subversion/sid

« back to all changes in this revision

Viewing changes to tools/client-side/svn-bench/util.c

  • Committer: Package Import Robot
  • Author(s): James McCoy, Peter Samuelson, James McCoy
  • Date: 2014-01-12 19:48:33 UTC
  • mfrom: (0.2.10)
  • Revision ID: package-import@ubuntu.com-20140112194833-w3axfwksn296jn5x
Tags: 1.8.5-1
[ Peter Samuelson ]
* New upstream release.  (Closes: #725787) Rediff patches:
  - Remove apr-abi1 (applied upstream), rename apr-abi2 to apr-abi
  - Remove loosen-sqlite-version-check (shouldn't be needed)
  - Remove java-osgi-metadata (applied upstream)
  - svnmucc prompts for a changelog if none is provided. (Closes: #507430)
  - Remove fix-bdb-version-detection, upstream uses "apu-config --dbm-libs"
  - Remove ruby-test-wc (applied upstream)
  - Fix “svn diff -r N file” when file has svn:mime-type set.
    (Closes: #734163)
  - Support specifying an encoding for mod_dav_svn's environment in which
    hooks are run.  (Closes: #601544)
  - Fix ordering of “svnadmin dump” paths with certain APR versions.
    (Closes: #687291)
  - Provide a better error message when authentication fails with an
    svn+ssh:// URL.  (Closes: #273874)
  - Updated Polish translations.  (Closes: #690815)

[ James McCoy ]
* Remove all traces of libneon, replaced by libserf.
* patches/sqlite_3.8.x_workaround: Upstream fix for wc-queries-test test
  failurse.
* Run configure with --with-apache-libexecdir, which allows removing part of
  patches/rpath.
* Re-enable auth-test as upstream has fixed the problem of picking up
  libraries from the environment rather than the build tree.
  (Closes: #654172)
* Point LD_LIBRARY_PATH at the built auth libraries when running the svn
  command during the build.  (Closes: #678224)
* Add a NEWS entry describing how to configure mod_dav_svn to understand
  UTF-8.  (Closes: #566148)
* Remove ancient transitional package, libsvn-ruby.
* Enable compatibility with Sqlite3 versions back to Wheezy.
* Enable hardening flags.  (Closes: #734918)
* patches/build-fixes: Enable verbose build logs.
* Build against the default ruby version.  (Closes: #722393)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * util.c: Subversion command line client utility functions. Any
 
3
 * functions that need to be shared across subcommands should be put
 
4
 * in here.
 
5
 *
 
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
 
14
 *
 
15
 *      http://www.apache.org/licenses/LICENSE-2.0
 
16
 *
 
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
 
22
 *    under the License.
 
23
 * ====================================================================
 
24
 */
 
25
 
 
26
/* ==================================================================== */
 
27
 
 
28
 
 
29
 
 
30
/*** Includes. ***/
 
31
 
 
32
#include <string.h>
 
33
#include <ctype.h>
 
34
#include <assert.h>
 
35
 
 
36
#include "svn_private_config.h"
 
37
#include "svn_error.h"
 
38
#include "svn_path.h"
 
39
 
 
40
#include "cl.h"
 
41
 
 
42
 
 
43
 
 
44
svn_error_t *
 
45
svn_cl__args_to_target_array_print_reserved(apr_array_header_t **targets,
 
46
                                            apr_getopt_t *os,
 
47
                                            const apr_array_header_t *known_targets,
 
48
                                            svn_client_ctx_t *ctx,
 
49
                                            svn_boolean_t keep_last_origpath_on_truepath_collision,
 
50
                                            apr_pool_t *pool)
 
51
{
 
52
  svn_error_t *err = svn_client_args_to_target_array2(targets,
 
53
                                                      os,
 
54
                                                      known_targets,
 
55
                                                      ctx,
 
56
                                                      keep_last_origpath_on_truepath_collision,
 
57
                                                      pool);
 
58
  if (err)
 
59
    {
 
60
      if (err->apr_err ==  SVN_ERR_RESERVED_FILENAME_SPECIFIED)
 
61
        {
 
62
          svn_handle_error2(err, stderr, FALSE, "svn: Skipping argument: ");
 
63
          svn_error_clear(err);
 
64
        }
 
65
      else
 
66
        return svn_error_trace(err);
 
67
    }
 
68
  return SVN_NO_ERROR;
 
69
}
 
70
 
 
71
svn_error_t *
 
72
svn_cl__check_target_is_local_path(const char *target)
 
73
{
 
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);
 
77
  return SVN_NO_ERROR;
 
78
}
 
79
 
 
80
const char *
 
81
svn_cl__local_style_skip_ancestor(const char *parent_path,
 
82
                                  const char *path,
 
83
                                  apr_pool_t *pool)
 
84
{
 
85
  const char *relpath = NULL;
 
86
 
 
87
  if (parent_path)
 
88
    relpath = svn_dirent_skip_ancestor(parent_path, path);
 
89
 
 
90
  return svn_dirent_local_style(relpath ? relpath : path, pool);
 
91
}
 
92