33
33
#include "svn_client.h"
34
34
#include "svn_types.h"
36
#include "private/svn_diff_tree.h"
38
40
#endif /* __cplusplus */
43
/* Set *REVNUM to the revision number identified by REVISION.
45
If REVISION->kind is svn_opt_revision_number, just use
46
REVISION->value.number, ignoring LOCAL_ABSPATH and RA_SESSION.
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.
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.
62
Else if REVISION->kind is svn_opt_revision_unspecified, set
63
*REVNUM to SVN_INVALID_REVNUM.
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.
76
Else return SVN_ERR_CLIENT_BAD_REVISION.
78
Use SCRATCH_POOL for any temporary allocation. */
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);
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);
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.
210
* Use the authentication baton cached in CTX to authenticate against
213
* See also svn_client__get_youngest_common_ancestor().
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);
226
250
/* Get the repository location of the base node at LOCAL_ABSPATH.
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);
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. */
266
svn_client__arbitrary_nodes_diff(const char *local_abspath1,
267
const char *local_abspath2,
269
const svn_wc_diff_callbacks4_t *callbacks,
270
void *callback_baton,
271
svn_client_ctx_t *ctx,
272
apr_pool_t *scratch_pool);
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