29
29
import java.io.File;
31
31
import org.apache.subversion.javahl.callback.ReposNotifyCallback;
32
import org.apache.subversion.javahl.callback.ReposVerifyCallback;
32
33
import org.apache.subversion.javahl.callback.ReposFreezeAction;
33
34
import org.apache.subversion.javahl.types.*;
35
36
public interface ISVNRepos {
38
* interface to receive the messages
40
public static interface MessageReceiver
43
* receive one message line
44
* @param message one line of message
46
public void receiveMessageLine(String message);
50
* release the native peer (should not depend on finalize)
52
public abstract void dispose();
55
* Filesystem in a Berkeley DB
57
public static final String BDB = "bdb";
59
* Filesystem in the filesystem
61
public static final String FSFS = "fsfs";
64
* @return Version information about the underlying native libraries.
66
public abstract Version getVersion();
69
* create a subversion repository.
70
* @param path the path where the repository will been
72
* @param disableFsyncCommit disable to fsync at the commit (BDB).
73
* @param keepLog keep the log files (BDB).
74
* @param configPath optional path for user configuration files.
75
* @param fstype the type of the filesystem (BDB or FSFS)
76
* @throws ClientException throw in case of problem
78
public abstract void create(File path, boolean disableFsyncCommit,
79
boolean keepLog, File configPath, String fstype)
80
throws ClientException;
83
* deltify the revisions in the repository
84
* @param path the path to the repository
85
* @param start start revision
86
* @param end end revision
87
* @throws ClientException throw in case of problem
89
public abstract void deltify(File path, Revision start, Revision end)
90
throws ClientException;
93
* dump the data in a repository
94
* @param path the path to the repository
95
* @param dataOut the data will be outputed here
96
* @param start the first revision to be dumped
97
* @param end the last revision to be dumped
98
* @param incremental the dump will be incremantal
99
* @param useDeltas the dump will contain deltas between nodes
100
* @param callback the callback to recieve notifications
101
* @throws ClientException throw in case of problem
103
public abstract void dump(File path, OutputStream dataOut,
39
* interface to receive the messages
41
public static interface MessageReceiver
44
* receive one message line
45
* @param message one line of message
47
public void receiveMessageLine(String message);
51
* release the native peer (should not depend on finalize)
53
public abstract void dispose();
56
* Filesystem in a Berkeley DB
58
public static final String BDB = "bdb";
60
* Filesystem in the filesystem
62
public static final String FSFS = "fsfs";
65
* @return Version information about the underlying native libraries.
67
public abstract Version getVersion();
70
* create a subversion repository.
71
* @param path the path where the repository will been
73
* @param disableFsyncCommit disable to fsync at the commit (BDB).
74
* @param keepLog keep the log files (BDB).
75
* @param configPath optional path for user configuration files.
76
* @param fstype the type of the filesystem (BDB or FSFS)
77
* @throws ClientException throw in case of problem
79
public abstract void create(File path, boolean disableFsyncCommit,
80
boolean keepLog, File configPath, String fstype)
81
throws ClientException;
84
* deltify the revisions in the repository
85
* @param path the path to the repository
86
* @param start start revision
87
* @param end end revision
88
* @throws ClientException throw in case of problem
90
public abstract void deltify(File path, Revision start, Revision end)
91
throws ClientException;
94
* dump the data in a repository
95
* @param path the path to the repository
96
* @param dataOut the data will be outputed here
97
* @param start the first revision to be dumped
98
* @param end the last revision to be dumped
99
* @param incremental the dump will be incremantal
100
* @param useDeltas the dump will contain deltas between nodes
101
* @param callback the callback to receive notifications
102
* @throws ClientException throw in case of problem
104
public abstract void dump(File path, OutputStream dataOut,
104
105
Revision start, Revision end, boolean incremental,
105
106
boolean useDeltas, ReposNotifyCallback callback)
106
throws ClientException;
109
* make a hot copy of the repository
110
* @param path the path to the source repository
111
* @param targetPath the path to the target repository
112
* @param cleanLogs clean the unused log files in the source
114
* @throws ClientException throw in case of problem
116
public abstract void hotcopy(File path, File targetPath,
117
boolean cleanLogs, boolean incremental) throws ClientException;
119
public abstract void hotcopy(File path, File targetPath,
120
boolean cleanLogs) throws ClientException;
123
* list all logfiles (BDB) in use or not)
124
* @param path the path to the repository
125
* @param receiver interface to receive the logfile names
126
* @throws ClientException throw in case of problem
128
public abstract void listDBLogs(File path, MessageReceiver receiver)
129
throws ClientException;
132
* list unused logfiles
133
* @param path the path to the repository
134
* @param receiver interface to receive the logfile names
135
* @throws ClientException throw in case of problem
137
public abstract void listUnusedDBLogs(File path, MessageReceiver receiver)
138
throws ClientException;
142
* load the data of a dump into a repository
143
* @param path the path to the repository
144
* @param dataInput the data input source
145
* @param start the first revision to load
146
* @param end the last revision to load
147
* @param ignoreUUID ignore any UUID found in the input stream
148
* @param forceUUID set the repository UUID to any found in the
150
* @param usePreCommitHook use the pre-commit hook when processing commits
151
* @param usePostCommitHook use the post-commit hook when processing commits
152
* @param relativePath the directory in the repository, where the data
154
* @param callback the target for processing messages
155
* @throws ClientException throw in case of problem
107
throws ClientException;
110
* make a hot copy of the repository
111
* @param path the path to the source repository
112
* @param targetPath the path to the target repository
113
* @param cleanLogs clean the unused log files in the source
115
* @param callback the callback to receive notifications
116
* @throws ClientException throw in case of problem
119
public abstract void hotcopy(File path, File targetPath,
120
boolean cleanLogs, boolean incremental,
121
ReposNotifyCallback callback)
122
throws ClientException;
124
public abstract void hotcopy(File path, File targetPath,
125
boolean cleanLogs, boolean incremental)
126
throws ClientException;
128
public abstract void hotcopy(File path, File targetPath,
129
boolean cleanLogs) throws ClientException;
132
* list all logfiles (BDB) in use or not)
133
* @param path the path to the repository
134
* @param receiver interface to receive the logfile names
135
* @throws ClientException throw in case of problem
137
public abstract void listDBLogs(File path, MessageReceiver receiver)
138
throws ClientException;
141
* list unused logfiles
142
* @param path the path to the repository
143
* @param receiver interface to receive the logfile names
144
* @throws ClientException throw in case of problem
146
public abstract void listUnusedDBLogs(File path, MessageReceiver receiver)
147
throws ClientException;
151
* load the data of a dump into a repository
152
* @param path the path to the repository
153
* @param dataInput the data input source
154
* @param start the first revision to load
155
* @param end the last revision to load
156
* @param ignoreUUID ignore any UUID found in the input stream
157
* @param forceUUID set the repository UUID to any found in the
159
* @param usePreCommitHook use the pre-commit hook when processing commits
160
* @param usePostCommitHook use the post-commit hook when processing commits
161
* @param validateProps validate "svn:" revision and node properties
162
* @param ignoreDates ignore revision datestamps in the dump stream
163
* @param relativePath the directory in the repository, where the data
165
* @param callback the target for processing messages
166
* @throws ClientException throw in case of problem
169
public abstract void load(File path, InputStream dataInput,
170
Revision start, Revision end,
171
boolean ignoreUUID, boolean forceUUID,
172
boolean usePreCommitHook,
173
boolean usePostCommitHook,
174
boolean validateProps,
177
ReposNotifyCallback callback)
178
throws ClientException;
181
* Load the data of a dump into a repository. Sets
182
* <code>validateProps</code> and <code>ignoreDates</code> to
183
* <code>false</code>.
185
* @param path the path to the repository
186
* @param dataInput the data input source
187
* @param start the first revision to load
188
* @param end the last revision to load
189
* @param ignoreUUID ignore any UUID found in the input stream
190
* @param forceUUID set the repository UUID to any found in the
192
* @param usePreCommitHook use the pre-commit hook when processing commits
193
* @param usePostCommitHook use the post-commit hook when processing commits
194
* @param relativePath the directory in the repository, where the data
196
* @param callback the target for processing messages
197
* @throws ClientException throw in case of problem
158
public abstract void load(File path, InputStream dataInput,
200
public abstract void load(File path, InputStream dataInput,
159
201
Revision start, Revision end,
160
202
boolean ignoreUUID, boolean forceUUID,
161
203
boolean usePreCommitHook,
164
206
ReposNotifyCallback callback)
165
207
throws ClientException;
168
* load the data of a dump into a repository
169
* @param path the path to the repository
170
* @param dataInput the data input source
171
* @param ignoreUUID ignore any UUID found in the input stream
172
* @param forceUUID set the repository UUID to any found in the
174
* @param usePreCommitHook use the pre-commit hook when processing commits
175
* @param usePostCommitHook use the post-commit hook when processing commits
176
* @param relativePath the directory in the repository, where the data
178
* @param callback the target for processing messages
179
* @throws ClientException throw in case of problem
210
* load the data of a dump into a repository
211
* @param path the path to the repository
212
* @param dataInput the data input source
213
* @param ignoreUUID ignore any UUID found in the input stream
214
* @param forceUUID set the repository UUID to any found in the
216
* @param usePreCommitHook use the pre-commit hook when processing commits
217
* @param usePostCommitHook use the post-commit hook when processing commits
218
* @param relativePath the directory in the repository, where the data
220
* @param callback the target for processing messages
221
* @throws ClientException throw in case of problem
180
222
* @note behaves like the 1.8 vesion with the revision
181
223
* parameters set to Revision.START and Revision.HEAD.
183
public abstract void load(File path, InputStream dataInput,
184
boolean ignoreUUID, boolean forceUUID, boolean usePreCommitHook,
225
public abstract void load(File path, InputStream dataInput,
226
boolean ignoreUUID, boolean forceUUID, boolean usePreCommitHook,
185
227
boolean usePostCommitHook, String relativePath,
186
228
ReposNotifyCallback callback)
187
229
throws ClientException;
190
* list all open transactions in a repository
191
* @param path the path to the repository
192
* @param receiver receives one transaction name per call
193
* @throws ClientException throw in case of problem
195
public abstract void lstxns(File path, MessageReceiver receiver)
196
throws ClientException;
232
* list all open transactions in a repository
233
* @param path the path to the repository
234
* @param receiver receives one transaction name per call
235
* @throws ClientException throw in case of problem
237
public abstract void lstxns(File path, MessageReceiver receiver)
238
throws ClientException;
199
* recover the filesystem backend of a repository
200
* @param path the path to the repository
241
* recover the filesystem backend of a repository
242
* @param path the path to the repository
201
243
* @return youngest revision
202
* @throws ClientException throw in case of problem
204
public abstract long recover(File path, ReposNotifyCallback callback)
244
* @throws ClientException throw in case of problem
246
public abstract long recover(File path, ReposNotifyCallback callback)
205
247
throws ClientException;
208
* Take an exclusive lock on each of the listed repositories
209
* to prevent commits; then, while holding all the locks, call
210
* the action.invoke().
212
* The repositories may or may not be readable by Subversion
213
* while frozen, depending on implementation details of the
214
* repository's filesystem backend.
216
* Repositories are locked in the listed order.
217
* @param action describes the action to perform
218
* @param paths the set of repository paths
219
* @throws ClientException
250
* Take an exclusive lock on each of the listed repositories
251
* to prevent commits; then, while holding all the locks, call
252
* the action.invoke().
254
* The repositories may or may not be readable by Subversion
255
* while frozen, depending on implementation details of the
256
* repository's filesystem backend.
258
* Repositories are locked in the listed order.
259
* @param action describes the action to perform
260
* @param paths the set of repository paths
261
* @throws ClientException
222
public abstract void freeze(ReposFreezeAction action,
224
throws ClientException;
227
* remove open transaction in a repository
228
* @param path the path to the repository
229
* @param transactions the transactions to be removed
230
* @throws ClientException throw in case of problem
232
public abstract void rmtxns(File path, String[] transactions)
233
throws ClientException;
236
* Change the value of the revision property <code>propName</code>
237
* to <code>propValue</code>. By default, does not run
238
* pre-/post-revprop-change hook scripts.
240
* @param path The path to the repository.
241
* @param rev The revision for which to change a property value.
242
* @param propName The name of the property to change.
243
* @param propValue The new value to set for the property.
244
* @param usePreRevPropChangeHook Whether to run the
245
* <i>pre-revprop-change</i> hook script.
246
* @param usePostRevPropChangeHook Whether to run the
247
* <i>post-revprop-change</i> hook script.
248
* @throws SubversionException If a problem occurs.
250
public abstract void setRevProp(File path, Revision rev, String propName,
251
String propValue, boolean usePreRevPropChangeHook,
252
boolean usePostRevPropChangeHook) throws SubversionException;
255
* Verify the repository at <code>path</code> between revisions
256
* <code>start</code> and <code>end</code>.
258
* @param path the path to the repository
259
* @param start the first revision
260
* @param end the last revision
261
* @param callback the callback to recieve notifications
262
* @throws ClientException If an error occurred.
264
public abstract void verify(File path, Revision start, Revision end,
264
public abstract void freeze(ReposFreezeAction action,
266
throws ClientException;
269
* remove open transaction in a repository
270
* @param path the path to the repository
271
* @param transactions the transactions to be removed
272
* @throws ClientException throw in case of problem
274
public abstract void rmtxns(File path, String[] transactions)
275
throws ClientException;
278
* Change the value of the revision property <code>propName</code>
279
* to <code>propValue</code>. By default, does not run
280
* pre-/post-revprop-change hook scripts.
282
* @param path The path to the repository.
283
* @param rev The revision for which to change a property value.
284
* @param propName The name of the property to change.
285
* @param propValue The new value to set for the property.
286
* @param usePreRevPropChangeHook Whether to run the
287
* <i>pre-revprop-change</i> hook script.
288
* @param usePostRevPropChangeHook Whether to run the
289
* <i>post-revprop-change</i> hook script.
290
* @throws SubversionException If a problem occurs.
292
public abstract void setRevProp(File path, Revision rev, String propName,
293
String propValue, boolean usePreRevPropChangeHook,
294
boolean usePostRevPropChangeHook) throws SubversionException;
297
* Verify the repository at <code>path</code> between revisions
298
* <code>start</code> and <code>end</code>.
300
* If <code>verifyCallback</code> is <code>null</code>, verification
301
* will stop at the first encountered error. Otherwise, the verification
302
* process may continue, depending on the value returned from the
303
* invocation of <code>verifyCallback</code>.
305
* @param path the path to the repository
306
* @param start the first revision
307
* @param end the last revision
308
* @param checkNormalization report directory entry and mergeinfo name collisions
309
* caused by denormalized Unicode representations
310
* @param metadataOnly check only metadata, not file contents
311
* @param notifyCallback the callback to receive notifications
312
* @param verifyCallback the callback to receive verification status
313
* @throws ClientException If an error occurred.
316
public abstract void verify(File path, Revision start, Revision end,
317
boolean checkNormalization,
318
boolean metadataOnly,
319
ReposNotifyCallback notifyCallback,
320
ReposVerifyCallback verifyCallback)
321
throws ClientException;
324
* Verify the repository at <code>path</code> between revisions
325
* <code>start</code> and <code>end</code>.
327
*<b>Note:</b> Behaves like the 1.9 version with
328
* <code>checkNormailzation</code> and
329
* <code>metadataOnly</code> set to <code>false</code>
330
* and <code>verifyCallback</code> set to
333
* @param path the path to the repository
334
* @param start the first revision
335
* @param end the last revision
336
* @param callback the callback to receive notifications
337
* @throws ClientException If an error occurred.
339
public abstract void verify(File path, Revision start, Revision end,
265
340
ReposNotifyCallback callback)
266
341
throws ClientException;
269
* list all locks in the repository
270
* @param path the path to the repository
344
* list all locks in the repository
345
* @param path the path to the repository
271
346
* @param depth the depth to recurse
272
* @throws ClientException throw in case of problem
274
public abstract Set<Lock> lslocks(File path, Depth depth)
347
* @throws ClientException throw in case of problem
349
public abstract Set<Lock> lslocks(File path, Depth depth)
275
350
throws ClientException;
278
* remove multiple locks from the repository
279
* @param path the path to the repository
280
* @param locks the name of the locked items
281
* @throws ClientException throw in case of problem
283
public abstract void rmlocks(File path, String[] locks)
284
throws ClientException;
353
* remove multiple locks from the repository
354
* @param path the path to the repository
355
* @param locks the name of the locked items
356
* @throws ClientException throw in case of problem
358
public abstract void rmlocks(File path, String[] locks)
359
throws ClientException;
287
362
* upgrade the repository format
288
363
* @param path the path to the repository
289
364
* @param callback for notification
290
* @throws ClientException throw in case of problem
365
* @throws ClientException throw in case of problem
292
367
public abstract void upgrade(File path, ReposNotifyCallback callback)
293
throws ClientException;
368
throws ClientException;
296
371
* pack the repository
297
372
* @param path the path to the repository
298
373
* @param callback for notification
299
* @throws ClientException throw in case of problem
374
* @throws ClientException throw in case of problem
301
376
public abstract void pack(File path, ReposNotifyCallback callback)
302
throws ClientException;
377
throws ClientException;
305
380
* cancel the active operation