001: package org.tigris.subversion.javahl;
002:
003: /**
004: * @copyright
005: * ====================================================================
006: * Copyright (c) 2003-2004 CollabNet. All rights reserved.
007: *
008: * This software is licensed as described in the file COPYING, which
009: * you should have received as part of this distribution. The terms
010: * are also available at http://subversion.tigris.org/license-1.html.
011: * If newer versions of this license are posted there, you may use a
012: * newer version instead, at your option.
013: *
014: * This software consists of voluntary contributions made by many
015: * individuals. For exact contribution history, see the revision
016: * history and logs, available at http://subversion.tigris.org/.
017: * ====================================================================
018: * @endcopyright
019: */
020:
021: import java.io.OutputStream;
022:
023: /**
024: * This interface is the commom interface for all subversion
025: * operations. It is implemented by SVNClient and SVNClientSynchronized
026: */
027: public interface SVNClientInterface {
028: /**
029: * release the native peer (should not depend on finalize)
030: */
031: void dispose();
032:
033: /**
034: * @return Version information about the underlying native libraries.
035: */
036: public Version getVersion();
037:
038: /**
039: * @return The name of the working copy's administrative
040: * directory, which is usually <code>.svn</code>.
041: * @see <a
042: * href="http://svn.collab.net/repos/svn/trunk/notes/asp-dot-net-hack.txt">Instructions</a>
043: * on changing this as a work-around for the behavior of ASP.Net
044: * on Windows.
045: * @since 1.3
046: */
047: public String getAdminDirectoryName();
048:
049: /**
050: * @param name The name of the directory to compare.
051: * @return Whether <code>name</code> is that of a working copy
052: * administrative directory.
053: * @since 1.3
054: */
055: public boolean isAdminDirectory(String name);
056:
057: /**
058: * Returns the last destination path submitted.
059: * @deprecated
060: * @return path in Subversion format.
061: */
062: String getLastPath();
063:
064: /**
065: * List a directory or file of the working copy.
066: *
067: * @param path Path to explore.
068: * @param descend Recurse into subdirectories if they exist.
069: * @param onServer Request status information from server.
070: * @param getAll get status for uninteristing files (unchanged).
071: * @return Array of Status entries.
072: */
073: Status[] status(String path, boolean descend, boolean onServer,
074: boolean getAll) throws ClientException;
075:
076: /**
077: * List a directory or file of the working copy.
078: *
079: * @param path Path to explore.
080: * @param descend Recurse into subdirectories if they exist.
081: * @param onServer Request status information from server.
082: * @param getAll get status for uninteristing files (unchanged).
083: * @param noIgnore get status for normaly ignored files and directories.
084: * @return Array of Status entries.
085: */
086: Status[] status(String path, boolean descend, boolean onServer,
087: boolean getAll, boolean noIgnore) throws ClientException;
088:
089: /**
090: * List a directory or file of the working copy.
091: *
092: * @param path Path to explore.
093: * @param descend Recurse into subdirectories if they exist.
094: * @param onServer Request status information from server.
095: * @param getAll get status for uninteristing files (unchanged).
096: * @param noIgnore get status for normaly ignored files and directories.
097: * @param ignoreExternals if externals are ignored during status
098: * @return Array of Status entries.
099: * @since 1.2
100: */
101: Status[] status(String path, boolean descend, boolean onServer,
102: boolean getAll, boolean noIgnore, boolean ignoreExternals)
103: throws ClientException;
104:
105: /**
106: * Lists the directory entries of an url on the server.
107: * @param url the url to list
108: * @param revision the revision to list
109: * @param recurse recurse into subdirectories
110: * @return Array of DirEntry objects.
111: */
112: DirEntry[] list(String url, Revision revision, boolean recurse)
113: throws ClientException;
114:
115: /**
116: * Lists the directory entries of an url on the server.
117: * @param url the url to list
118: * @param revision the revision to list
119: * @param pegRevision the revision to interpret url
120: * @param recurse recurse into subdirectories
121: * @return Array of DirEntry objects.
122: * @since 1.2
123: */
124: DirEntry[] list(String url, Revision revision,
125: Revision pegRevision, boolean recurse)
126: throws ClientException;
127:
128: /**
129: * Returns the status of a single file in the path.
130: *
131: * @param path File to gather status.
132: * @param onServer Request status information from the server.
133: * @return the subversion status of the file.
134: */
135: Status singleStatus(String path, boolean onServer)
136: throws ClientException;
137:
138: /**
139: * Sets the username used for authentication.
140: * @param username The username, ignored if the empty string. Set
141: * to the empty string to clear it.
142: * @throws IllegalArgumentException If <code>username</code> is
143: * <code>null</code>.
144: * @see #password(String)
145: */
146: void username(String username);
147:
148: /**
149: * Sets the password used for authentication.
150: * @param password The password, ignored if the empty string. Set
151: * to the empty string to clear it.
152: * @throws IllegalArgumentException If <code>password</code> is
153: * <code>null</code>.
154: * @see #username(String)
155: */
156: void password(String password);
157:
158: /**
159: * Register callback interface to supply username and password on demand
160: * @param prompt the callback interface
161: */
162: void setPrompt(PromptUserPassword prompt);
163:
164: /**
165: * Retrieve the log messages for an item
166: * @param path path or url to get the log message for.
167: * @param revisionStart first revision to show
168: * @param revisionEnd last revision to show
169: * @return array of LogMessages
170: */
171: LogMessage[] logMessages(String path, Revision revisionStart,
172: Revision revisionEnd) throws ClientException;
173:
174: /**
175: * Retrieve the log messages for an item
176: * @param path path or url to get the log message for.
177: * @param revisionStart first revision to show
178: * @param revisionEnd last revision to show
179: * @param stopOnCopy do not continue on copy operations
180: * @return array of LogMessages
181: */
182: LogMessage[] logMessages(String path, Revision revisionStart,
183: Revision revisionEnd, boolean stopOnCopy)
184: throws ClientException;
185:
186: /**
187: * Retrieve the log messages for an item
188: * @param path path or url to get the log message for.
189: * @param revisionStart first revision to show
190: * @param revisionEnd last revision to show
191: * @param stopOnCopy do not continue on copy operations
192: * @param discoverPath returns the paths of the changed items in the
193: * returned objects
194: * @return array of LogMessages
195: */
196: LogMessage[] logMessages(String path, Revision revisionStart,
197: Revision revisionEnd, boolean stopOnCopy,
198: boolean discoverPath) throws ClientException;
199:
200: /**
201: * Retrieve the log messages for an item
202: * @param path path or url to get the log message for.
203: * @param revisionStart first revision to show
204: * @param revisionEnd last revision to show
205: * @param stopOnCopy do not continue on copy operations
206: * @param discoverPath returns the paths of the changed items in the
207: * returned objects
208: * @param limit limit the number of log messages (if 0 or less no
209: * limit)
210: * @return array of LogMessages
211: * @since 1.2
212: */
213: LogMessage[] logMessages(String path, Revision revisionStart,
214: Revision revisionEnd, boolean stopOnCopy,
215: boolean discoverPath, long limit) throws ClientException;
216:
217: /**
218: * Executes a revision checkout.
219: * @param moduleName name of the module to checkout.
220: * @param destPath destination directory for checkout.
221: * @param revision the revision to checkout.
222: * @param pegRevision the peg revision to interpret the path
223: * @param recurse whether you want it to checkout files recursively.
224: * @param ignoreExternals if externals are ignored during checkout
225: * @exception ClientException
226: * @since 1.2
227: */
228: long checkout(String moduleName, String destPath,
229: Revision revision, Revision pegRevision, boolean recurse,
230: boolean ignoreExternals) throws ClientException;
231:
232: /**
233: * Executes a revision checkout.
234: * @param moduleName name of the module to checkout.
235: * @param destPath destination directory for checkout.
236: * @param revision the revision to checkout.
237: * @param recurse whether you want it to checkout files recursively.
238: * @exception ClientException
239: */
240: long checkout(String moduleName, String destPath,
241: Revision revision, boolean recurse) throws ClientException;
242:
243: /**
244: * Sets the notification callback used to send processing information back
245: * to the calling program.
246: * @param notify listener that the SVN library should call on many
247: * file operations.
248: * @deprecated use notification2 instead
249: */
250: void notification(Notify notify);
251:
252: /**
253: * Sets the notification callback used to send processing information back
254: * to the calling program.
255: * @param notify listener that the SVN library should call on many
256: * file operations.
257: * @since 1.2
258: */
259: void notification2(Notify2 notify);
260:
261: /**
262: * Sets the commit message handler. This allows more complex commit message
263: * with the list of the elements to be commited as input.
264: * @param messageHandler callback for entering commit messages
265: * if this is set the message parameter is ignored.
266: */
267: void commitMessageHandler(CommitMessage messageHandler);
268:
269: /**
270: * Sets a file for deletion.
271: * @param path path or url to be deleted
272: * @param message if path is a url, this will be the commit message.
273: * @param force delete even when there are local modifications.
274: * @exception ClientException
275: */
276: void remove(String[] path, String message, boolean force)
277: throws ClientException;
278:
279: /**
280: * Reverts a file to a pristine state.
281: * @param path path of the file.
282: * @param recurse recurse into subdirectories
283: * @exception ClientException
284: */
285: void revert(String path, boolean recurse) throws ClientException;
286:
287: /**
288: * Adds a file to the repository.
289: * @param path path to be added.
290: * @param recurse recurse into subdirectories
291: * @exception ClientException
292: */
293: void add(String path, boolean recurse) throws ClientException;
294:
295: /**
296: * Adds a file to the repository.
297: * @param path path to be added.
298: * @param recurse recurse into subdirectories
299: * @param force if adding a directory and recurse true and path is a
300: * directory, all not already managed files are added.
301: * @exception ClientException
302: * @since 1.2
303: */
304: void add(String path, boolean recurse, boolean force)
305: throws ClientException;
306:
307: /**
308: * Updates the directory or file from repository
309: * @param path target file.
310: * @param revision the revision number to update.
311: * Revision.HEAD will update to the
312: * latest revision.
313: * @param recurse recursively update.
314: * @exception ClientException
315: */
316: long update(String path, Revision revision, boolean recurse)
317: throws ClientException;
318:
319: /**
320: * Updates the directories or files from repository
321: * @param path array of target files.
322: * @param revision the revision number to update.
323: * Revision.HEAD will update to the
324: * latest revision.
325: * @param recurse recursively update.
326: * @param ignoreExternals if externals are ignored during update
327: * @exception ClientException
328: * @since 1.2
329: */
330: long[] update(String[] path, Revision revision, boolean recurse,
331: boolean ignoreExternals) throws ClientException;
332:
333: /**
334: * Commits changes to the repository.
335: * @param path files to commit.
336: * @param message log message.
337: * @param recurse whether the operation should be done recursively.
338: * @return Returns a long representing the revision. It returns a
339: * -1 if the revision number is invalid.
340: * @exception ClientException
341: */
342: long commit(String[] path, String message, boolean recurse)
343: throws ClientException;
344:
345: /**
346: * Commits changes to the repository.
347: * @param path files to commit.
348: * @param message log message.
349: * @param recurse whether the operation should be done recursively.
350: * @param noUnlock do remove any locks
351: * @return Returns a long representing the revision. It returns a
352: * -1 if the revision number is invalid.
353: * @exception ClientException
354: */
355: long commit(String[] path, String message, boolean recurse,
356: boolean noUnlock) throws ClientException;
357:
358: /**
359: * Copies a versioned file with the history preserved.
360: * @param srcPath source path or url
361: * @param destPath destination path or url
362: * @param message commit message if destPath is an url
363: * @param revision source revision
364: * @exception ClientException
365: */
366: void copy(String srcPath, String destPath, String message,
367: Revision revision) throws ClientException;
368:
369: /**
370: * Moves or renames a file.
371: * @param srcPath source path or url
372: * @param destPath destination path or url
373: * @param message commit message if destPath is an url
374: * @param revision source revision (unused)
375: * @param force even with local modifications.
376: * @exception ClientException
377: */
378: void move(String srcPath, String destPath, String message,
379: Revision revision, boolean force) throws ClientException;
380:
381: /**
382: * Moves or renames a file.
383: * @param srcPath source path or url
384: * @param destPath destination path or url
385: * @param message commit message if destPath is an url
386: * @param force even with local modifications.
387: * @exception ClientException
388: * @since 1.2
389: */
390: void move(String srcPath, String destPath, String message,
391: boolean force) throws ClientException;
392:
393: /**
394: * Creates a directory directly in a repository or creates a
395: * directory on disk and schedules it for addition.
396: * @param path directories to be created
397: * @param message commit message to used if path contains urls
398: * @exception ClientException
399: */
400: void mkdir(String[] path, String message) throws ClientException;
401:
402: /**
403: * Recursively cleans up a local directory, finishing any
404: * incomplete operations, removing lockfiles, etc.
405: * @param path a local directory.
406: * @exception ClientException
407: */
408: void cleanup(String path) throws ClientException;
409:
410: /**
411: * Removes the 'conflicted' state on a file.
412: * @param path path to cleanup
413: * @param recurse recurce into subdirectories
414: * @exception ClientException
415: */
416: void resolved(String path, boolean recurse) throws ClientException;
417:
418: /**
419: * Exports the contents of either a subversion repository into a
420: * 'clean' directory (meaning a directory with no administrative
421: * directories).
422: * @param srcPath the url of the repository path to be exported
423: * @param destPath a destination path that must not already exist.
424: * @param revision the revsion to be exported
425: * @param force set if it is ok to overwrite local files
426: * @exception ClientException
427: */
428: long doExport(String srcPath, String destPath, Revision revision,
429: boolean force) throws ClientException;
430:
431: /**
432: * Exports the contents of either a subversion repository into a
433: * 'clean' directory (meaning a directory with no administrative
434: * directories).
435: * @param srcPath the url of the repository path to be exported
436: * @param destPath a destination path that must not already exist.
437: * @param revision the revsion to be exported
438: * @param pegRevision the revision to interpret srcPath
439: * @param force set if it is ok to overwrite local files
440: * @param ignoreExternals ignore external during export
441: * @param recurse recurse to subdirectories
442: * @param nativeEOL which EOL characters to use during export
443: * @exception ClientException
444: * @since 1.2
445: */
446: long doExport(String srcPath, String destPath, Revision revision,
447: Revision pegRevision, boolean force,
448: boolean ignoreExternals, boolean recurse, String nativeEOL)
449: throws ClientException;
450:
451: /**
452: * Update local copy to mirror a new url.
453: * @param path the working copy path
454: * @param url the new url for the working copy
455: * @param revision the new base revision of working copy
456: * @param recurse traverse into subdirectories
457: * @exception ClientException
458: */
459: long doSwitch(String path, String url, Revision revision,
460: boolean recurse) throws ClientException;
461:
462: /**
463: * Import a file or directory into a repository directory at
464: * head.
465: * @param path the local path
466: * @param url the target url
467: * @param message the log message.
468: * @param recurse traverse into subdirectories
469: * @exception ClientException
470: */
471: void doImport(String path, String url, String message,
472: boolean recurse) throws ClientException;
473:
474: /**
475: * Merge changes from two paths into a new local path.
476: * @param path1 first path or url
477: * @param revision1 first revision
478: * @param path2 second path or url
479: * @param revision2 second revision
480: * @param localPath target local path
481: * @param force overwrite local changes
482: * @param recurse traverse into subdirectories
483: * @exception ClientException
484: */
485: void merge(String path1, Revision revision1, String path2,
486: Revision revision2, String localPath, boolean force,
487: boolean recurse) throws ClientException;
488:
489: /**
490: * Merge changes from two paths into a new local path.
491: * @param path1 first path or url
492: * @param revision1 first revision
493: * @param path2 second path or url
494: * @param revision2 second revision
495: * @param localPath target local path
496: * @param force overwrite local changes
497: * @param recurse traverse into subdirectories
498: * @param ignoreAncestry ignore if files are not related
499: * @param dryRun do not change anything
500: * @exception ClientException
501: * @since 1.2
502: */
503: void merge(String path1, Revision revision1, String path2,
504: Revision revision2, String localPath, boolean force,
505: boolean recurse, boolean ignoreAncestry, boolean dryRun)
506: throws ClientException;
507:
508: /**
509: * Merge changes from two paths into a new local path.
510: * @param path path or url
511: * @param pegRevision revision to interpret path
512: * @param revision1 first revision
513: * @param revision2 second revision
514: * @param localPath target local path
515: * @param force overwrite local changes
516: * @param recurse traverse into subdirectories
517: * @param ignoreAncestry ignore if files are not related
518: * @param dryRun do not change anything
519: * @exception ClientException
520: * @since 1.2
521: */
522: void merge(String path, Revision pegRevision, Revision revision1,
523: Revision revision2, String localPath, boolean force,
524: boolean recurse, boolean ignoreAncestry, boolean dryRun)
525: throws ClientException;
526:
527: /**
528: * Display the differences between two paths
529: * @param target1 first path or url
530: * @param revision1 first revision
531: * @param target2 second path or url
532: * @param revision2 second revision
533: * @param outFileName file name where difference are written
534: * @param recurse traverse into subdirectories
535: * @exception ClientException
536: */
537: void diff(String target1, Revision revision1, String target2,
538: Revision revision2, String outFileName, boolean recurse)
539: throws ClientException;
540:
541: /**
542: * Display the differences between two paths
543: * @param target1 first path or url
544: * @param revision1 first revision
545: * @param target2 second path or url
546: * @param revision2 second revision
547: * @param outFileName file name where difference are written
548: * @param recurse traverse into subdirectories
549: * @param ignoreAncestry ignore if files are not related
550: * @param noDiffDeleted no output on deleted files
551: * @param force diff even on binary files
552: * @exception ClientException
553: * @since 1.2
554: */
555: void diff(String target1, Revision revision1, String target2,
556: Revision revision2, String outFileName, boolean recurse,
557: boolean ignoreAncestry, boolean noDiffDeleted, boolean force)
558: throws ClientException;
559:
560: /**
561: * Display the differences between two paths
562: * @param target path or url
563: * @param pegRevision revision tointerpret target
564: * @param startRevision first Revision to compare
565: * @param endRevision second Revision to compare
566: * @param outFileName file name where difference are written
567: * @param recurse traverse into subdirectories
568: * @param ignoreAncestry ignore if files are not related
569: * @param noDiffDeleted no output on deleted files
570: * @param force diff even on binary files
571: * @exception ClientException
572: * @since 1.2
573: */
574: void diff(String target, Revision pegRevision,
575: Revision startRevision, Revision endRevision,
576: String outFileName, boolean recurse,
577: boolean ignoreAncestry, boolean noDiffDeleted, boolean force)
578: throws ClientException;
579:
580: /**
581: * Retrieves the properties of an item
582: * @param path the path of the item
583: * @return array of property objects
584: */
585: PropertyData[] properties(String path) throws ClientException;
586:
587: /**
588: * Retrieves the properties of an item
589: * @param path the path of the item
590: * @param revision the revision of the item
591: * @return array of property objects
592: * @since 1.2
593: */
594: PropertyData[] properties(String path, Revision revision)
595: throws ClientException;
596:
597: /**
598: * Retrieves the properties of an item
599: * @param path the path of the item
600: * @param revision the revision of the item
601: * @param pegRevision the revision to interpret path
602: * @return array of property objects
603: * @since 1.2
604: */
605: PropertyData[] properties(String path, Revision revision,
606: Revision pegRevision) throws ClientException;
607:
608: /**
609: * Sets one property of an item with a String value
610: * @param path path of the item
611: * @param name name of the property
612: * @param value new value of the property
613: * @param recurse set property also on the subdirectories
614: * @throws ClientException
615: */
616: void propertySet(String path, String name, String value,
617: boolean recurse) throws ClientException;
618:
619: /**
620: * Sets one property of an item with a String value
621: * @param path path of the item
622: * @param name name of the property
623: * @param value new value of the property
624: * @param recurse set property also on the subdirectories
625: * @param force do not check if the value is valid
626: * @throws ClientException
627: * @since 1.2
628: */
629: void propertySet(String path, String name, String value,
630: boolean recurse, boolean force) throws ClientException;
631:
632: /**
633: * Sets one property of an item with a byte array value
634: * @param path path of the item
635: * @param name name of the property
636: * @param value new value of the property
637: * @param recurse set property also on the subdirectories
638: * @throws ClientException
639: */
640: void propertySet(String path, String name, byte[] value,
641: boolean recurse) throws ClientException;
642:
643: /**
644: * Sets one property of an item with a byte array value
645: * @param path path of the item
646: * @param name name of the property
647: * @param value new value of the property
648: * @param recurse set property also on the subdirectories
649: * @param force do not check if the value is valid
650: * @throws ClientException
651: * @since 1.2
652: */
653: void propertySet(String path, String name, byte[] value,
654: boolean recurse, boolean force) throws ClientException;
655:
656: /**
657: * Remove one property of an item.
658: * @param path path of the item
659: * @param name name of the property
660: * @param recurse remove the property also on subdirectories
661: * @throws ClientException
662: */
663: void propertyRemove(String path, String name, boolean recurse)
664: throws ClientException;
665:
666: /**
667: * Create and sets one property of an item with a String value
668: * @param path path of the item
669: * @param name name of the property
670: * @param value new value of the property
671: * @param recurse set property also on the subdirectories
672: * @throws ClientException
673: */
674: void propertyCreate(String path, String name, String value,
675: boolean recurse) throws ClientException;
676:
677: /**
678: * Create and sets one property of an item with a String value
679: * @param path path of the item
680: * @param name name of the property
681: * @param value new value of the property
682: * @param recurse set property also on the subdirectories
683: * @param force do not check if the value is valid
684: * @throws ClientException
685: * @since 1.2
686: */
687: void propertyCreate(String path, String name, String value,
688: boolean recurse, boolean force) throws ClientException;
689:
690: /**
691: * Create and sets one property of an item with a byte array value
692: * @param path path of the item
693: * @param name name of the property
694: * @param value new value of the property
695: * @param recurse set property also on the subdirectories
696: * @throws ClientException
697: */
698: void propertyCreate(String path, String name, byte[] value,
699: boolean recurse) throws ClientException;
700:
701: /**
702: * Create and sets one property of an item with a byte array value
703: * @param path path of the item
704: * @param name name of the property
705: * @param value new value of the property
706: * @param recurse set property also on the subdirectories
707: * @param force do not check if the value is valid
708: * @throws ClientException
709: * @since 1.2
710: */
711: void propertyCreate(String path, String name, byte[] value,
712: boolean recurse, boolean force) throws ClientException;
713:
714: /**
715: * Retrieve one revsision property of one item
716: * @param path path of the item
717: * @param name name of the property
718: * @param rev revision to retrieve
719: * @return the Property
720: * @throws ClientException
721: */
722: PropertyData revProperty(String path, String name, Revision rev)
723: throws ClientException;
724:
725: /**
726: * Retrieve all revsision properties of one item
727: * @param path path of the item
728: * @param rev revision to retrieve
729: * @return the Properties
730: * @throws ClientException
731: * @since 1.2
732: */
733: PropertyData[] revProperties(String path, Revision rev)
734: throws ClientException;
735:
736: /**
737: * set one revsision property of one item
738: * @param path path of the item
739: * @param name name of the property
740: * @param rev revision to retrieve
741: * @param value value of the property
742: * @param force use force to set
743: * @throws ClientException
744: * @since 1.2
745: */
746: void setRevProperty(String path, String name, Revision rev,
747: String value, boolean force) throws ClientException;
748:
749: /**
750: * Retrieve one property of one iten
751: * @param path path of the item
752: * @param name name of property
753: * @return the Property
754: * @throws ClientException
755: */
756: PropertyData propertyGet(String path, String name)
757: throws ClientException;
758:
759: /**
760: * Retrieve one property of one iten
761: * @param path path of the item
762: * @param name name of property
763: * @param revision revision of the item
764: * @return the Property
765: * @throws ClientException
766: * @since 1.2
767: */
768: PropertyData propertyGet(String path, String name, Revision revision)
769: throws ClientException;
770:
771: /**
772: * Retrieve one property of one iten
773: * @param path path of the item
774: * @param name name of property
775: * @param revision revision of the item
776: * @param pegRevision the revision to interpret path
777: * @return the Property
778: * @throws ClientException
779: * @since 1.2
780: */
781: PropertyData propertyGet(String path, String name,
782: Revision revision, Revision pegRevision)
783: throws ClientException;
784:
785: /**
786: * Retrieve the content of a file
787: * @param path the path of the file
788: * @param revision the revision to retrieve
789: * @return the content as byte array
790: * @throws ClientException
791: */
792: byte[] fileContent(String path, Revision revision)
793: throws ClientException;
794:
795: /**
796: * Retrieve the content of a file
797: * @param path the path of the file
798: * @param revision the revision to retrieve
799: * @param pegRevision the revision to interpret path
800: * @return the content as byte array
801: * @throws ClientException
802: * @since 1.2
803: */
804: byte[] fileContent(String path, Revision revision,
805: Revision pegRevision) throws ClientException;
806:
807: /**
808: * Write the file's content to the specified output stream. If
809: * you need an InputStream, use a
810: * PipedInputStream/PipedOutputStream combination.
811: *
812: * @param path the path of the file
813: * @param revision the revision to retrieve
814: * @param pegRevision the revision at which to interpret the path
815: * @param the stream to write the file's content to
816: * @throws ClientException
817: * @see <a href="http://java.sun.com/j2se/1.4.2/docs/api/java/io/PipedOutputStream.html">PipedOutputStream</a>
818: * @see <a href="http://java.sun.com/j2se/1.4.2/docs/api/java/io/PipedInputStream.html">PipedInputStream</a>
819: */
820: void streamFileContent(String path, Revision revision,
821: Revision pegRevision, int bufferSize, OutputStream stream)
822: throws ClientException;
823:
824: /**
825: * Rewrite the url's in the working copy
826: * @param from old url
827: * @param to new url
828: * @param path working copy path
829: * @param recurse recurse into subdirectories
830: * @throws ClientException
831: */
832: void relocate(String from, String to, String path, boolean recurse)
833: throws ClientException;
834:
835: /**
836: * Return for each line of the file, the author and the revision of the
837: * last together with the content.
838: * @deprecated
839: * @param path the path
840: * @param revisionStart the first revision to show
841: * @param revisionEnd the last revision to show
842: * @return the content together with author and revision of last change
843: * @throws ClientException
844: */
845: byte[] blame(String path, Revision revisionStart,
846: Revision revisionEnd) throws ClientException;
847:
848: /**
849: * Retrieve the content together with the author, the revision and the date
850: * of the last change of each line
851: * @param path the path
852: * @param revisionStart the first revision to show
853: * @param revisionEnd the last revision to show
854: * @param callback callback to receive the file content and the other
855: * information
856: * @throws ClientException
857: */
858: void blame(String path, Revision revisionStart,
859: Revision revisionEnd, BlameCallback callback)
860: throws ClientException;
861:
862: /**
863: * Retrieve the content together with the author, the revision and the date
864: * of the last change of each line
865: * @param path the path
866: * @param pegRevision the revision to interpret the path
867: * @param revisionStart the first revision to show
868: * @param revisionEnd the last revision to show
869: * @param callback callback to receive the file content and the other
870: * information
871: * @throws ClientException
872: * @since 1.2
873: */
874: void blame(String path, Revision pegRevision,
875: Revision revisionStart, Revision revisionEnd,
876: BlameCallback callback) throws ClientException;
877:
878: /**
879: * Set directory for the configuration information, taking the
880: * usual steps to ensure that Subversion's config file templates
881: * exist in the specified location.
882: *
883: * @param configDir path of the directory
884: * @throws ClientException
885: */
886: void setConfigDirectory(String configDir) throws ClientException;
887:
888: /**
889: * Get the configuration directory
890: * @return the directory
891: * @throws ClientException
892: */
893: String getConfigDirectory() throws ClientException;
894:
895: /**
896: * cancel the active operation
897: * @throws ClientException
898: */
899: void cancelOperation() throws ClientException;
900:
901: /**
902: * Retrieves the working copy information for an item
903: * @param path path of the item
904: * @return the information object
905: * @throws ClientException
906: */
907: Info info(String path) throws ClientException;
908:
909: /**
910: * Lock a working copy item
911: * @param path path of the item
912: * @param comment
913: * @param force break an existing lock
914: * @throws ClientException
915: * @since 1.2
916: */
917: void lock(String[] path, String comment, boolean force)
918: throws ClientException;
919:
920: /**
921: * Unlock a working copy item
922: * @param path path of the item
923: * @param force break an existing lock
924: * @throws ClientException
925: * @since 1.2
926: */
927: void unlock(String[] path, boolean force) throws ClientException;
928:
929: /**
930: * Retrieve information about repository or working copy items.
931: * @param pathOrUrl the path or the url of the item
932: * @param revision the revision of the item to return
933: * @param pegRevision the revision to interpret pathOrUrl
934: * @param recurse flag if to recurse, if the item is a directory
935: * @return the information objects
936: * @since 1.2
937: */
938: Info2[] info2(String pathOrUrl, Revision revision,
939: Revision pegRevision, boolean recurse)
940: throws ClientException;
941:
942: /**
943: * Produce a compact "version number" for a working copy
944: * @param path path of the working copy
945: * @param trailUrl to detect switches of the whole working copy
946: * @param lastChanged last changed rather than current revisions
947: * @return the compact "version number"
948: * @throws ClientException
949: * @since 1.2
950: */
951: String getVersionInfo(String path, String trailUrl,
952: boolean lastChanged) throws ClientException;
953: }
|