~svn/ubuntu/raring/subversion/ppa

« back to all changes in this revision

Viewing changes to subversion/libsvn_wc/props.h

  • Committer: Bazaar Package Importer
  • Author(s): Adam Conrad
  • Date: 2005-12-05 01:26:14 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20051205012614-qom4xfypgtsqc2xq
Tags: 1.2.3dfsg1-3ubuntu1
Merge with the final Debian release of 1.2.3dfsg1-3, bringing in
fixes to the clean target, better documentation of the libdb4.3
upgrade and build fixes to work with swig1.3_1.3.27.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * props.h :  properties
 
3
 *
 
4
 * ====================================================================
 
5
 * Copyright (c) 2000-2004 CollabNet.  All rights reserved.
 
6
 *
 
7
 * This software is licensed as described in the file COPYING, which
 
8
 * you should have received as part of this distribution.  The terms
 
9
 * are also available at http://subversion.tigris.org/license-1.html.
 
10
 * If newer versions of this license are posted there, you may use a
 
11
 * newer version instead, at your option.
 
12
 *
 
13
 * This software consists of voluntary contributions made by many
 
14
 * individuals.  For exact contribution history, see the revision
 
15
 * history and logs, available at http://subversion.tigris.org/.
 
16
 * ====================================================================
 
17
 */
 
18
 
 
19
 
 
20
#ifndef SVN_LIBSVN_WC_PROPS_H
 
21
#define SVN_LIBSVN_WC_PROPS_H
 
22
 
 
23
#include <apr_pools.h>
 
24
#include "svn_types.h"
 
25
#include "svn_string.h"
 
26
#include "svn_props.h"
 
27
 
 
28
 
 
29
#ifdef __cplusplus
 
30
extern "C" {
 
31
#endif /* __cplusplus */
 
32
 
 
33
 
 
34
/* If the working item at PATH has properties attached, set HAS_PROPS.
 
35
   ADM_ACCESS is an access baton set that contains PATH. */
 
36
svn_error_t *svn_wc__has_props (svn_boolean_t *has_props,
 
37
                                const char *path,
 
38
                                svn_wc_adm_access_t *adm_access,
 
39
                                apr_pool_t *pool);
 
40
 
 
41
 
 
42
 
 
43
/* Given two propchange objects, return TRUE iff they conflict.  If
 
44
   there's a conflict, DESCRIPTION will contain an english description
 
45
   of the problem. */
 
46
 
 
47
/* For note, here's the table being implemented:
 
48
 
 
49
              |  update set     |    update delete   |
 
50
  ------------|-----------------|--------------------|
 
51
  user set    | conflict iff    |      conflict      |
 
52
              |  vals differ    |                    |
 
53
  ------------|-----------------|--------------------|
 
54
  user delete |   conflict      |      merge         |
 
55
              |                 |    (no problem)    |
 
56
  ----------------------------------------------------
 
57
 
 
58
*/
 
59
svn_boolean_t
 
60
svn_wc__conflicting_propchanges_p (const svn_string_t **description,
 
61
                                   const svn_prop_t *local,
 
62
                                   const svn_prop_t *update,
 
63
                                   apr_pool_t *pool);
 
64
 
 
65
/* Look up the entry NAME within ADM_ACCESS and see if it has a `current'
 
66
   reject file describing a state of conflict.  If such a file exists,
 
67
   return the name of the file in REJECT_FILE.  If no such file exists,
 
68
   return (REJECT_FILE = NULL). */
 
69
svn_error_t *
 
70
svn_wc__get_existing_prop_reject_file (const char **reject_file,
 
71
                                       svn_wc_adm_access_t *adm_access,
 
72
                                       const char *name,
 
73
                                       apr_pool_t *pool);
 
74
 
 
75
/* If PROPFILE_PATH exists (and is a file), assume it's full of
 
76
   properties and load this file into HASH.  Otherwise, leave HASH
 
77
   untouched.  */
 
78
svn_error_t *svn_wc__load_prop_file (const char *propfile_path,
 
79
                                     apr_hash_t *hash,
 
80
                                     apr_pool_t *pool);
 
81
 
 
82
 
 
83
 
 
84
/* Given a HASH full of property name/values, write them to a file
 
85
   located at PROPFILE_PATH */
 
86
svn_error_t *svn_wc__save_prop_file (const char *propfile_path,
 
87
                                     apr_hash_t *hash,
 
88
                                     apr_pool_t *pool);
 
89
 
 
90
 
 
91
/* Given ADM_ACCESS/NAME and an array of PROPCHANGES, merge the changes into
 
92
   the working copy.  Necessary log entries will be appended to
 
93
   ENTRY_ACCUM.
 
94
 
 
95
   If we are attempting to merge changes to a directory, simply pass
 
96
   ADM_ACCESS and NULL for NAME.
 
97
 
 
98
   If BASE_MERGE is FALSE only the working properties will be changed,
 
99
   if it is TRUE both the base and working properties will be changed.
 
100
 
 
101
   If conflicts are found when merging, they are placed into a
 
102
   temporary .prej file within SVN. Log entries are then written to
 
103
   move this file into PATH, or to append the conflicts to the file's
 
104
   already-existing .prej file in ADM_ACCESS. Base properties are modifed
 
105
   unconditionally, if BASE_MERGE is TRUE, they do not generate conficts.
 
106
 
 
107
   If STATE is non-null, set *STATE to the state of the local properties
 
108
   after the merge.  */
 
109
svn_error_t *svn_wc__merge_prop_diffs (svn_wc_notify_state_t *state,
 
110
                                       svn_wc_adm_access_t *adm_access,
 
111
                                       const char *name,
 
112
                                       const apr_array_header_t *propchanges,
 
113
                                       svn_boolean_t base_merge,
 
114
                                       svn_boolean_t dry_run,
 
115
                                       apr_pool_t *pool,
 
116
                                       svn_stringbuf_t **entry_accum);
 
117
 
 
118
 
 
119
/* Get a single 'wcprop' NAME for versioned object PATH, return in
 
120
   *VALUE.  ADM_ACCESS is an access baton set that contains PATH. */
 
121
svn_error_t *svn_wc__wcprop_get (const svn_string_t **value,
 
122
                                 const char *name,
 
123
                                 const char *path,
 
124
                                 svn_wc_adm_access_t *adm_access,
 
125
                                 apr_pool_t *pool);
 
126
 
 
127
/* Set a single 'wcprop' NAME to VALUE for versioned object PATH. 
 
128
   If VALUE is null, remove property NAME.  ADM_ACCESS is an access
 
129
   baton set that contains PATH. */
 
130
svn_error_t *svn_wc__wcprop_set (const char *name,
 
131
                                 const svn_string_t *value,
 
132
                                 const char *path,
 
133
                                 svn_wc_adm_access_t *adm_access,
 
134
                                 apr_pool_t *pool);
 
135
 
 
136
/* Remove all wc properties under ADM_ACCESS, recursively.  Do any
 
137
   temporary allocation in POOL.  */
 
138
svn_error_t *svn_wc__remove_wcprops (svn_wc_adm_access_t *adm_access,
 
139
                                     svn_boolean_t recurse,
 
140
                                     apr_pool_t *pool);
 
141
 
 
142
 
 
143
#ifdef __cplusplus
 
144
}
 
145
#endif /* __cplusplus */
 
146
 
 
147
#endif /* SVN_LIBSVN_WC_PROPS_H */