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

« back to all changes in this revision

Viewing changes to subversion/svn/copy-cmd.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:
68
68
      svn_opt_revision_t *peg_revision = apr_palloc(pool,
69
69
                                                    sizeof(*peg_revision));
70
70
 
71
 
      SVN_ERR(svn_opt_parse_path(peg_revision, &src, target, pool));
 
71
      err = svn_opt_parse_path(peg_revision, &src, target, pool);
 
72
 
 
73
      if (err)
 
74
        {
 
75
          /* Issue #3606: 'svn cp .@HEAD target' gives
 
76
             svn: '@HEAD' is just a peg revision. Maybe try '@HEAD@' instead?
 
77
 
 
78
             This is caused by a first round of canonicalization in
 
79
             svn_cl__args_to_target_array_print_reserved(). Undo that in an
 
80
             attempt to fix this issue without revving many apis.
 
81
           */
 
82
          if (*target == '@' && err->apr_err == SVN_ERR_BAD_FILENAME)
 
83
            {
 
84
              svn_error_t *err2;
 
85
 
 
86
              err2 = svn_opt_parse_path(peg_revision, &src,
 
87
                                        apr_pstrcat(pool, ".", target,
 
88
                                                    (const char *)NULL), pool);
 
89
 
 
90
              if (err2)
 
91
                {
 
92
                  /* Fix attempt failed; return original error */
 
93
                  svn_error_clear(err2);
 
94
                }
 
95
              else
 
96
                {
 
97
                  /* Error resolved. Use path */
 
98
                  svn_error_clear(err);
 
99
                  err = NULL;
 
100
                }
 
101
            }
 
102
 
 
103
          if (err)
 
104
              return svn_error_trace(err);
 
105
        }
 
106
 
72
107
      source->path = src;
73
108
      source->revision = &(opt_state->start_revision);
74
109
      source->peg_revision = peg_revision;
76
111
      APR_ARRAY_PUSH(sources, svn_client_copy_source_t *) = source;
77
112
    }
78
113
 
79
 
  SVN_ERR(svn_cl__eat_peg_revisions(&targets, targets, pool));
 
114
  /* Get DST_PATH (the target path or URL) and check that no peg revision is
 
115
   * specified for it. */
 
116
  {
 
117
    const char *tgt = APR_ARRAY_IDX(targets, targets->nelts - 1, const char *);
 
118
    svn_opt_revision_t peg;
 
119
 
 
120
    SVN_ERR(svn_opt_parse_path(&peg, &dst_path, tgt, pool));
 
121
    if (peg.kind != svn_opt_revision_unspecified)
 
122
      return svn_error_createf(SVN_ERR_ILLEGAL_TARGET, NULL,
 
123
                               _("'%s': a peg revision is not allowed here"),
 
124
                               tgt);
 
125
  }
80
126
 
81
127
  /* Figure out which type of notification to use.
82
128
     (There is no need to check that the src paths are homogeneous;
84
130
     error if they are not.) */
85
131
  src_path = APR_ARRAY_IDX(targets, 0, const char *);
86
132
  srcs_are_urls = svn_path_is_url(src_path);
87
 
  dst_path = APR_ARRAY_IDX(targets, targets->nelts - 1, const char *);
88
 
  apr_array_pop(targets);
89
133
  dst_is_url = svn_path_is_url(dst_path);
90
134
 
91
135
  if ((! srcs_are_urls) && (! dst_is_url))