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

« back to all changes in this revision

Viewing changes to subversion/libsvn_ra/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:
38
38
#include "svn_private_config.h"
39
39
#include "private/svn_ra_private.h"
40
40
 
 
41
static const char *
 
42
get_path(const char *path_or_url,
 
43
         svn_ra_session_t *ra_session,
 
44
         apr_pool_t *pool)
 
45
{
 
46
  if (path_or_url == NULL)
 
47
    {
 
48
      svn_error_t *err = svn_ra_get_session_url(ra_session, &path_or_url,
 
49
                                                pool);
 
50
      if (err)
 
51
        {
 
52
          /* The SVN_ERR_UNSUPPORTED_FEATURE error in the caller is more
 
53
             important, so dummy up the session's URL and chuck this error. */
 
54
          svn_error_clear(err);
 
55
          return _("<repository>");
 
56
        }
 
57
    }
 
58
  return path_or_url;
 
59
}
 
60
 
41
61
svn_error_t *
42
62
svn_ra__assert_mergeinfo_capable_server(svn_ra_session_t *ra_session,
43
63
                                        const char *path_or_url,
48
68
                                SVN_RA_CAPABILITY_MERGEINFO, pool));
49
69
  if (! mergeinfo_capable)
50
70
    {
51
 
      if (path_or_url == NULL)
52
 
        {
53
 
          svn_error_t *err = svn_ra_get_session_url(ra_session, &path_or_url,
54
 
                                                    pool);
55
 
          if (err)
56
 
            {
57
 
              /* The SVN_ERR_UNSUPPORTED_FEATURE error is more important,
58
 
                 so dummy up the session's URL and chuck this error. */
59
 
              svn_error_clear(err);
60
 
              path_or_url = "<repository>";
61
 
            }
62
 
        }
 
71
      path_or_url = get_path(path_or_url, ra_session, pool);
63
72
      return svn_error_createf(SVN_ERR_UNSUPPORTED_FEATURE, NULL,
64
73
                               _("Retrieval of mergeinfo unsupported by '%s'"),
65
74
                               svn_path_is_url(path_or_url)
69
78
  return SVN_NO_ERROR;
70
79
}
71
80
 
 
81
svn_error_t *
 
82
svn_ra__assert_capable_server(svn_ra_session_t *ra_session,
 
83
                              const char *capability,
 
84
                              const char *path_or_url,
 
85
                              apr_pool_t *pool)
 
86
{
 
87
  if (!strcmp(capability, SVN_RA_CAPABILITY_MERGEINFO))
 
88
    return svn_ra__assert_mergeinfo_capable_server(ra_session, path_or_url,
 
89
                                                   pool);
 
90
 
 
91
  else
 
92
    {
 
93
      svn_boolean_t has;
 
94
      SVN_ERR(svn_ra_has_capability(ra_session, &has, capability, pool));
 
95
      if (! has)
 
96
        {
 
97
          path_or_url = get_path(path_or_url, ra_session, pool);
 
98
          return svn_error_createf(SVN_ERR_UNSUPPORTED_FEATURE, NULL,
 
99
                                 _("The '%s' feature is not supported by '%s'"),
 
100
                                 capability,
 
101
                                 svn_path_is_url(path_or_url)
 
102
                                    ? path_or_url
 
103
                                    : svn_dirent_local_style(path_or_url,
 
104
                                                             pool));
 
105
        }
 
106
    }
 
107
  return SVN_NO_ERROR;
 
108
}
 
109
 
72
110
/* Does ERR mean "the current value of the revprop isn't equal to
73
111
   the *OLD_VALUE_P you gave me"?
74
112
 */