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

« back to all changes in this revision

Viewing changes to subversion/include/private/svn_client_private.h

  • Committer: Package Import Robot
  • Author(s): James McCoy
  • Date: 2015-08-07 21:32:47 UTC
  • mfrom: (0.2.15) (4.1.7 experimental)
  • Revision ID: package-import@ubuntu.com-20150807213247-ozyewtmgsr6tkewl
Tags: 1.9.0-1
* Upload to unstable
* New upstream release.
  + Security fixes
    - CVE-2015-3184: Mixed anonymous/authenticated path-based authz with
      httpd 2.4
    - CVE-2015-3187: svn_repos_trace_node_locations() reveals paths hidden
      by authz
* Add >= 2.7 requirement for python-all-dev Build-Depends, needed to run
  tests.
* Remove Build-Conflicts against ruby-test-unit.  (Closes: #791844)
* Remove patches/apache_module_dependency in favor of expressing the
  dependencies in authz_svn.load/dav_svn.load.
* Build-Depend on apache2-dev (>= 2.4.16) to ensure ap_some_authn_required()
  is available when building mod_authz_svn and Depend on apache2-bin (>=
  2.4.16) for runtime support.

Show diffs side-by-side

added added

removed removed

Lines of Context:
33
33
#include "svn_client.h"
34
34
#include "svn_types.h"
35
35
 
 
36
#include "private/svn_diff_tree.h"
 
37
 
36
38
#ifdef __cplusplus
37
39
extern "C" {
38
40
#endif /* __cplusplus */
39
41
 
40
42
 
 
43
/* Set *REVNUM to the revision number identified by REVISION.
 
44
 
 
45
   If REVISION->kind is svn_opt_revision_number, just use
 
46
   REVISION->value.number, ignoring LOCAL_ABSPATH and RA_SESSION.
 
47
 
 
48
   Else if REVISION->kind is svn_opt_revision_committed,
 
49
   svn_opt_revision_previous, or svn_opt_revision_base, or
 
50
   svn_opt_revision_working, then the revision can be identified
 
51
   purely based on the working copy's administrative information for
 
52
   LOCAL_ABSPATH, so RA_SESSION is ignored.  If LOCAL_ABSPATH is not
 
53
   under revision control, return SVN_ERR_UNVERSIONED_RESOURCE, or if
 
54
   LOCAL_ABSPATH is null, return SVN_ERR_CLIENT_VERSIONED_PATH_REQUIRED.
 
55
 
 
56
   Else if REVISION->kind is svn_opt_revision_date or
 
57
   svn_opt_revision_head, then RA_SESSION is used to retrieve the
 
58
   revision from the repository (using REVISION->value.date in the
 
59
   former case), and LOCAL_ABSPATH is ignored.  If RA_SESSION is null,
 
60
   return SVN_ERR_CLIENT_RA_ACCESS_REQUIRED.
 
61
 
 
62
   Else if REVISION->kind is svn_opt_revision_unspecified, set
 
63
   *REVNUM to SVN_INVALID_REVNUM.
 
64
 
 
65
   If YOUNGEST_REV is non-NULL, it is an in/out parameter.  If
 
66
   *YOUNGEST_REV is valid, use it as the youngest revision in the
 
67
   repository (regardless of reality) -- don't bother to lookup the
 
68
   true value for HEAD, and don't return any value in *REVNUM greater
 
69
   than *YOUNGEST_REV.  If *YOUNGEST_REV is not valid, and a HEAD
 
70
   lookup is required to populate *REVNUM, then also populate
 
71
   *YOUNGEST_REV with the result.  This is useful for making multiple
 
72
   serialized calls to this function with a basically static view of
 
73
   the repository, avoiding race conditions which could occur between
 
74
   multiple invocations with HEAD lookup requests.
 
75
 
 
76
   Else return SVN_ERR_CLIENT_BAD_REVISION.
 
77
 
 
78
   Use SCRATCH_POOL for any temporary allocation.  */
 
79
svn_error_t *
 
80
svn_client__get_revision_number(svn_revnum_t *revnum,
 
81
                                svn_revnum_t *youngest_rev,
 
82
                                svn_wc_context_t *wc_ctx,
 
83
                                const char *local_abspath,
 
84
                                svn_ra_session_t *ra_session,
 
85
                                const svn_opt_revision_t *revision,
 
86
                                apr_pool_t *scratch_pool);
 
87
 
41
88
/* Return true if KIND is a revision kind that is dependent on the working
42
89
 * copy. Otherwise, return false. */
43
90
#define SVN_CLIENT__REVKIND_NEEDS_WC(kind)                                 \
200
247
                          apr_pool_t *result_pool,
201
248
                          apr_pool_t *scratch_pool);
202
249
 
203
 
/* Set *ANCESTOR_URL and *ANCESTOR_REVISION to the URL and revision,
204
 
 * respectively, of the youngest common ancestor of the two locations
205
 
 * PATH_OR_URL1@REV1 and PATH_OR_URL2@REV2.  Set *ANCESTOR_RELPATH to
206
 
 * NULL and *ANCESTOR_REVISION to SVN_INVALID_REVNUM if they have no
207
 
 * common ancestor.  This function assumes that PATH_OR_URL1@REV1 and
208
 
 * PATH_OR_URL2@REV2 both refer to the same repository.
209
 
 *
210
 
 * Use the authentication baton cached in CTX to authenticate against
211
 
 * the repository.
212
 
 *
213
 
 * See also svn_client__get_youngest_common_ancestor().
214
 
 */
215
 
svn_error_t *
216
 
svn_client__youngest_common_ancestor(const char **ancestor_url,
217
 
                                     svn_revnum_t *ancestor_rev,
218
 
                                     const char *path_or_url1,
219
 
                                     const svn_opt_revision_t *revision1,
220
 
                                     const char *path_or_url2,
221
 
                                     const svn_opt_revision_t *revision2,
222
 
                                     svn_client_ctx_t *ctx,
223
 
                                     apr_pool_t *result_pool,
224
 
                                     apr_pool_t *scratch_pool);
225
 
 
226
250
/* Get the repository location of the base node at LOCAL_ABSPATH.
227
251
 *
228
252
 * A pathrev_t wrapper around svn_wc__node_get_base().
257
281
                               apr_pool_t *result_pool,
258
282
                               apr_pool_t *scratch_pool);
259
283
 
260
 
/* Produce a diff with depth DEPTH between two files or two directories at
261
 
 * LOCAL_ABSPATH1 and LOCAL_ABSPATH2, using the provided diff callbacks to
262
 
 * show changes in files. The files and directories involved may be part of
263
 
 * a working copy or they may be unversioned. For versioned files, show
264
 
 * property changes, too. */
265
 
svn_error_t *
266
 
svn_client__arbitrary_nodes_diff(const char *local_abspath1,
267
 
                                 const char *local_abspath2,
268
 
                                 svn_depth_t depth,
269
 
                                 const svn_wc_diff_callbacks4_t *callbacks,
270
 
                                 void *callback_baton,
271
 
                                 svn_client_ctx_t *ctx,
272
 
                                 apr_pool_t *scratch_pool);
273
 
 
274
284
/* Copy the file or directory on URL in some repository to DST_ABSPATH,
275
285
 * copying node information and properties. Resolve URL using PEG_REV and
276
286
 * REVISION.