3
* ====================================================================
4
* Copyright (c) 2003-2004 CollabNet. All rights reserved.
6
* This software is licensed as described in the file COPYING, which
7
* you should have received as part of this distribution. The terms
8
* are also available at http://subversion.tigris.org/license-1.html.
9
* If newer versions of this license are posted there, you may use a
10
* newer version instead, at your option.
12
* This software consists of voluntary contributions made by many
13
* individuals. For exact contribution history, see the revision
14
* history and logs, available at http://subversion.tigris.org/.
15
* ====================================================================
18
package org.tigris.subversion.javahl;
20
* This class provides a threadsafe wrapped for SVNClient
22
public class SVNClientSynchronized implements SVNClientInterface
25
* the wrapped object, which does all the work
27
private SVNClient worker;
30
* our class, we synchronize on that.
32
static private Class clazz = SVNClientSynchronized.class;
37
public SVNClientSynchronized()
39
worker = new SVNClient();
43
* release the native peer (should not depend on finalize)
51
* Returns the last destination path submitted.
53
* @return path in Subversion format.
55
public String getLastPath()
59
return worker.getLastPath();
64
* List a directory or file of the working copy.
66
* @param path Path to explore.
67
* @param descend Recurse into subdirectories if existant.
68
* @param onServer Request status information from server.
69
* @param getAll get status for uninteristing files (unchanged).
70
* @return Array of Status entries.
72
public Status[] status(String path, boolean descend, boolean onServer,
73
boolean getAll) throws ClientException
77
return worker.status(path, descend, onServer, getAll);
81
* List a directory or file of the working copy.
83
* @param path Path to explore.
84
* @param descend Recurse into subdirectories if existant.
85
* @param onServer Request status information from server.
86
* @param getAll get status for uninteristing files (unchanged).
87
* @param noIgnore get status for normaly ignored files and directories.
88
* @return Array of Status entries.
90
public Status[] status(String path, boolean descend, boolean onServer,
91
boolean getAll, boolean noIgnore)
92
throws ClientException
96
return worker.status(path, descend, onServer, getAll, noIgnore);
101
* List a directory or file of the working copy.
103
* @param path Path to explore.
104
* @param descend Recurse into subdirectories if existant.
105
* @param onServer Request status information from server.
106
* @param getAll get status for uninteristing files (unchanged).
107
* @param noIgnore get status for normaly ignored files and
109
* @param ignoreExternals if externals are ignored during checkout
110
* @return Array of Status entries.
113
public Status[] status(String path, boolean descend, boolean onServer,
114
boolean getAll, boolean noIgnore,
115
boolean ignoreExternals) throws ClientException
119
return worker.status(path, descend, onServer, getAll, noIgnore,
125
* Lists the directory entries of an url on the server.
126
* @param url the url to list
127
* @param revision the revision to list
128
* @param recurse recurse into subdirectories
129
* @return Array of DirEntry objects.
131
public DirEntry[] list(String url, Revision revision, boolean recurse)
132
throws ClientException
136
return worker.list(url, revision, recurse);
141
* Lists the directory entries of an url on the server.
143
* @param url the url to list
144
* @param revision the revision to list
145
* @param pegRevision the revision to interpret url
146
* @param recurse recurse into subdirectories
147
* @return Array of DirEntry objects.
150
public DirEntry[] list(String url, Revision revision, Revision pegRevision,
151
boolean recurse) throws ClientException
155
return worker.list(url, revision, pegRevision, recurse);
160
* Returns the status of a single file in the path.
162
* @param path File to gather status.
163
* @param onServer Request status information from the server.
164
* @return the subversion status of the file.
166
public Status singleStatus(String path, boolean onServer)
167
throws ClientException
171
return worker.singleStatus(path, onServer);
175
* Sets the username used for authentification.
176
* @param username the username
178
public void username(String username)
182
worker.username(username);
186
* Sets the password used for authification.
187
* @param password the password
189
public void password(String password)
193
worker.password(password);
197
* Register callback interface to supply username and password on demand
198
* @param prompt the callback interface
200
public void setPrompt(PromptUserPassword prompt)
204
worker.setPrompt(prompt);
208
* Retrieve the log messages for an item
209
* @param path path or url to get the log message for.
210
* @param revisionStart first revision to show
211
* @param revisionEnd last revision to show
212
* @return array of LogMessages
214
public LogMessage[] logMessages(String path, Revision revisionStart,
215
Revision revisionEnd) throws ClientException
219
return worker.logMessages(path, revisionStart, revisionEnd, true,
225
* Retrieve the log messages for an item
226
* @param path path or url to get the log message for.
227
* @param revisionStart first revision to show
228
* @param revisionEnd last revision to show
229
* @param stopOnCopy do not continue on copy operations
230
* @return array of LogMessages
232
public LogMessage[] logMessages(String path, Revision revisionStart,
233
Revision revisionEnd, boolean stopOnCopy)
234
throws ClientException
238
return worker.logMessages(path, revisionStart, revisionEnd,
244
* Retrieve the log messages for an item
245
* @param path path or url to get the log message for.
246
* @param revisionStart first revision to show
247
* @param revisionEnd last revision to show
248
* @param stopOnCopy do not continue on copy operations
249
* @param discoverPath returns the paths of the changed items in the
251
* @return array of LogMessages
253
public LogMessage[] logMessages(String path, Revision revisionStart,
254
Revision revisionEnd, boolean stopOnCopy,
255
boolean discoverPath)
256
throws ClientException
260
return worker.logMessages(path, revisionStart, revisionEnd,
261
stopOnCopy, discoverPath);
266
* Retrieve the log messages for an item
267
* @param path path or url to get the log message for.
268
* @param revisionStart first revision to show
269
* @param revisionEnd last revision to show
270
* @param stopOnCopy do not continue on copy operations
271
* @param discoverPath returns the paths of the changed items in the
273
* @param limit limit the number of log messages (if 0 or less no
275
* @return array of LogMessages
278
public LogMessage[] logMessages(String path, Revision revisionStart,
279
Revision revisionEnd, boolean stopOnCopy,
280
boolean discoverPath, long limit)
281
throws ClientException
283
return worker.logMessages(path, revisionStart, revisionEnd,
284
stopOnCopy, discoverPath, limit);
288
* Executes a revision checkout.
289
* @param moduleName name of the module to checkout.
290
* @param destPath destination directory for checkout.
291
* @param revision the revision to checkout.
292
* @param pegRevision the peg revision to interpret the path
293
* @param recurse whether you want it to checkout files recursively.
294
* @param ignoreExternals if externals are ignored during checkout
295
* @exception ClientException
298
public long checkout(String moduleName, String destPath, Revision revision,
299
Revision pegRevision, boolean recurse,
300
boolean ignoreExternals)
301
throws ClientException
305
return worker.checkout(moduleName, destPath, revision, pegRevision,
306
recurse, ignoreExternals);
311
* Executes a revision checkout.
312
* @param moduleName name of the module to checkout.
313
* @param destPath destination directory for checkout.
314
* @param revision the revision to checkout.
315
* @param recurse whether you want it to checkout files recursively.
316
* @exception ClientException
318
public long checkout(String moduleName, String destPath, Revision revision,
320
throws ClientException
324
return worker.checkout(moduleName, destPath, revision, recurse);
328
* Sets the notification callback used to send processing information back
329
* to the calling program.
330
* @param notify listener that the SVN library should call on many
332
* @deprecated use notification2 instead
334
public void notification(Notify notify)
338
worker.notification(notify);
343
* Sets the notification callback used to send processing information back
344
* to the calling program.
346
* @param notify listener that the SVN library should call on many
350
public void notification2(Notify2 notify)
354
worker.notification2(notify);
359
* Sets the commit message handler. This allows more complex commit message
360
* with the list of the elements to be commited as input.
361
* @param messageHandler callback for entering commit messages
362
* if this is set the message parameter is ignored.
364
public void commitMessageHandler(CommitMessage messageHandler)
368
worker.commitMessageHandler(messageHandler);
372
* Sets a file for deletion.
373
* @param path path or url to be deleted
374
* @param message if path is a url, this will be the commit message.
375
* @param force delete even when there are local modifications.
376
* @exception ClientException
378
public void remove(String[] path, String message, boolean force)
379
throws ClientException
383
worker.remove(path, message, force);
387
* Reverts a file to a pristine state.
388
* @param path path of the file.
389
* @param recurse recurse into subdirectories
390
* @exception ClientException
392
public void revert(String path, boolean recurse) throws ClientException
396
worker.revert(path, recurse);
400
* Adds a file to the repository.
401
* @param path path to be added.
402
* @param recurse recurse into subdirectories
403
* @exception ClientException
405
public void add(String path, boolean recurse) throws ClientException
409
worker.add(path, recurse);
414
* Adds a file to the repository.
415
* @param path path to be added.
416
* @param recurse recurse into subdirectories
417
* @param force if adding a directory and recurse true and path is a
418
* directory, all not already managed files are added.
419
* @exception ClientException
422
public void add(String path, boolean recurse, boolean force)
423
throws ClientException
427
worker.add(path, recurse, force);
432
* Updates the directory or file from repository
433
* @param path target file.
434
* @param revision the revision number to update.
435
* Revision.HEAD will update to the
437
* @param recurse recursively update.
438
* @exception ClientException
440
public long update(String path, Revision revision, boolean recurse)
441
throws ClientException
445
return worker.update(path, revision, recurse);
450
* Updates the directories or files from repository
451
* @param path array of target files.
452
* @param revision the revision number to update.
453
* Revision.HEAD will update to the
455
* @param recurse recursively update.
456
* @param ignoreExternals if externals are ignored during update
457
* @exception ClientException
460
public long[] update(String[] path, Revision revision, boolean recurse,
461
boolean ignoreExternals) throws ClientException
465
return worker.update(path, revision, recurse, ignoreExternals);
470
* Commits changes to the repository.
471
* @param path files to commit.
472
* @param message log message.
473
* @param recurse whether the operation should be done recursively.
474
* @return Returns a long representing the revision. It returns a
475
* -1 if the revision number is invalid.
476
* @exception ClientException
478
public long commit(String[] path, String message, boolean recurse)
479
throws ClientException
483
return worker.commit(path, message, recurse, false);
487
* Copies a versioned file with the history preserved.
488
* @param srcPath source path or url
489
* @param destPath destination path or url
490
* @param message commit message if destPath is an url
491
* @param revision source revision
492
* @exception ClientException
494
public void copy(String srcPath, String destPath, String message,
495
Revision revision) throws ClientException
499
worker.copy(srcPath, destPath, message, revision);
503
* Moves or renames a file.
504
* @param srcPath source path or url
505
* @param destPath destination path or url
506
* @param message commit message if destPath is an url
507
* @param revision source revision
508
* @param force even with local modifications.
509
* @exception ClientException
512
public void move(String srcPath, String destPath, String message,
513
Revision revision, boolean force) throws ClientException
517
worker.move(srcPath, destPath, message, revision, force);
522
* Moves or renames a file.
524
* @param srcPath source path or url
525
* @param destPath destination path or url
526
* @param message commit message if destPath is an url
527
* @param force even with local modifications.
528
* @throws ClientException
531
public void move(String srcPath, String destPath, String message,
532
boolean force) throws ClientException
536
worker.move(srcPath, destPath, message, force);
541
* Creates a directory directly in a repository or creates a
542
* directory on disk and schedules it for addition.
543
* @param path directories to be created
544
* @param message commit message to used if path contains urls
545
* @exception ClientException
547
public void mkdir(String[] path, String message) throws ClientException
551
worker.mkdir(path, message);
555
* Recursively cleans up a local directory, finishing any
556
* incomplete operations, removing lockfiles, etc.
557
* @param path a local directory.
558
* @exception ClientException
560
public void cleanup(String path) throws ClientException
564
worker.cleanup(path);
568
* Removes the 'conflicted' state on a file.
569
* @param path path to cleanup
570
* @param recurse recurce into subdirectories
571
* @exception ClientException
573
public void resolved(String path, boolean recurse) throws ClientException
577
worker.resolved(path,recurse);
581
* Exports the contents of either a subversion repository into a
582
* 'clean' directory (meaning a directory with no administrative
584
* @param srcPath the url of the repository path to be exported
585
* @param destPath a destination path that must not already exist.
586
* @param revision the revsion to be exported
587
* @param force set if it is ok to overwrite local files
588
* @exception ClientException
590
public long doExport(String srcPath, String destPath, Revision revision,
591
boolean force) throws ClientException
595
return worker.doExport(srcPath, destPath, revision, force);
600
* Exports the contents of either a subversion repository into a
601
* 'clean' directory (meaning a directory with no administrative
604
* @param srcPath the url of the repository path to be exported
605
* @param destPath a destination path that must not already exist.
606
* @param revision the revsion to be exported
607
* @param pegRevision the revision to interpret srcPath
608
* @param force set if it is ok to overwrite local files
609
* @param ignoreExternals ignore external during export
610
* @param recurse recurse to subdirectories
611
* @param nativeEOL which EOL characters to use during export
612
* @throws ClientException
615
public long doExport(String srcPath, String destPath, Revision revision,
616
Revision pegRevision, boolean force,
617
boolean ignoreExternals, boolean recurse,
619
throws ClientException
623
return worker.doExport(srcPath, destPath, revision, pegRevision,
624
force, ignoreExternals, recurse, nativeEOL);
629
* Update local copy to mirror a new url.
630
* @param path the working copy path
631
* @param url the new url for the working copy
632
* @param revision the new base revision of working copy
633
* @param recurse traverse into subdirectories
634
* @exception ClientException
636
public long doSwitch(String path, String url, Revision revision,
637
boolean recurse) throws ClientException
641
return worker.doSwitch(path, url, revision, recurse);
645
* Import a file or directory into a repository directory at
647
* @param path the local path
648
* @param url the target url
649
* @param message the log message.
650
* @param recurse traverse into subdirectories
651
* @exception ClientException
653
public void doImport(String path, String url, String message,
654
boolean recurse) throws ClientException
658
worker.doImport(path, url, message, recurse);
662
* Merge changes from two paths into a new local path.
663
* @param path1 first path or url
664
* @param revision1 first revision
665
* @param path2 second path or url
666
* @param revision2 second revision
667
* @param localPath target local path
668
* @param force overwrite local changes
669
* @param recurse traverse into subdirectories
670
* @exception ClientException
672
public void merge(String path1, Revision revision1, String path2,
673
Revision revision2, String localPath, boolean force,
674
boolean recurse) throws ClientException
678
worker.merge(path1, revision1, path2, revision2, localPath, force,
684
* Merge changes from two paths into a new local path.
686
* @param path1 first path or url
687
* @param revision1 first revision
688
* @param path2 second path or url
689
* @param revision2 second revision
690
* @param localPath target local path
691
* @param force overwrite local changes
692
* @param recurse traverse into subdirectories
693
* @param ignoreAncestry ignore if files are not related
694
* @param dryRun do not change anything
695
* @throws ClientException
698
public void merge(String path1, Revision revision1, String path2,
699
Revision revision2, String localPath, boolean force,
700
boolean recurse, boolean ignoreAncestry, boolean dryRun)
701
throws ClientException
705
worker.merge(path1, revision1, path2, revision2, localPath, force,
706
recurse, ignoreAncestry, dryRun);
711
* Merge changes from two paths into a new local path.
713
* @param path path or url
714
* @param pegRevision revision to interpret path
715
* @param revision1 first revision
716
* @param revision2 second revision
717
* @param localPath target local path
718
* @param force overwrite local changes
719
* @param recurse traverse into subdirectories
720
* @param ignoreAncestry ignore if files are not related
721
* @param dryRun do not change anything
722
* @throws ClientException
725
public void merge(String path, Revision pegRevision, Revision revision1,
726
Revision revision2, String localPath, boolean force,
727
boolean recurse, boolean ignoreAncestry, boolean dryRun)
728
throws ClientException
732
worker.merge(path, pegRevision, revision1, revision2, localPath,
733
force, recurse, ignoreAncestry, dryRun);
738
* Display the differences between two paths
739
* @param target1 first path or url
740
* @param revision1 first revision
741
* @param target2 second path or url
742
* @param revision2 second revision
743
* @param outFileName file name where difference are written
744
* @param recurse traverse into subdirectories
745
* @exception ClientException
747
public void diff(String target1, Revision revision1, String target2,
748
Revision revision2, String outFileName, boolean recurse)
749
throws ClientException
753
worker.diff(target1, revision1, target2, revision2, outFileName,
759
* Display the differences between two paths
761
* @param target1 first path or url
762
* @param revision1 first revision
763
* @param target2 second path or url
764
* @param revision2 second revision
765
* @param outFileName file name where difference are written
766
* @param recurse traverse into subdirectories
767
* @param ignoreAncestry ignore if files are not related
768
* @param noDiffDeleted no output on deleted files
769
* @param force diff even on binary files
770
* @throws ClientException
773
public void diff(String target1, Revision revision1, String target2,
774
Revision revision2, String outFileName, boolean recurse,
775
boolean ignoreAncestry, boolean noDiffDeleted,
776
boolean force) throws ClientException
780
worker.diff(target1, revision1, target2, revision2, outFileName,
781
recurse, ignoreAncestry, noDiffDeleted, force);
786
* Display the differences between two paths
788
* @param target path or url
789
* @param pegRevision revision tointerpret target
790
* @param startRevision first Revision to compare
791
* @param endRevision second Revision to compare
792
* @param outFileName file name where difference are written
793
* @param recurse traverse into subdirectories
794
* @param ignoreAncestry ignore if files are not related
795
* @param noDiffDeleted no output on deleted files
796
* @param force diff even on binary files
797
* @throws ClientException
800
public void diff(String target, Revision pegRevision,
801
Revision startRevision, Revision endRevision,
802
String outFileName, boolean recurse,
803
boolean ignoreAncestry, boolean noDiffDeleted,
804
boolean force) throws ClientException
808
worker.diff(target, pegRevision, startRevision, endRevision,
809
outFileName, recurse, ignoreAncestry, noDiffDeleted, force);
814
* Retrieves the properties of an item
815
* @param path the path of the item
816
* @return array of property objects
818
public PropertyData[] properties(String path) throws ClientException
822
return worker.properties(path);
827
* Retrieves the properties of an item
829
* @param path the path of the item
830
* @param revision the revision of the item
831
* @return array of property objects
834
public PropertyData[] properties(String path, Revision revision)
835
throws ClientException
839
return worker.properties(path, revision);
844
* Retrieves the properties of an item
846
* @param path the path of the item
847
* @param revision the revision of the item
848
* @param pegRevision the revision to interpret path
849
* @return array of property objects
852
public PropertyData[] properties(String path, Revision revision,
853
Revision pegRevision)
854
throws ClientException
858
return properties(path, revision, pegRevision);
863
* Sets one property of an item with a String value
864
* @param path path of the item
865
* @param name name of the property
866
* @param value new value of the property
867
* @param recurse set property also on the subdirectories
868
* @throws ClientException
870
public void propertySet(String path, String name, String value,
871
boolean recurse) throws ClientException
875
worker.propertySet(path, name, value, recurse);
880
* Sets one property of an item with a String value
882
* @param path path of the item
883
* @param name name of the property
884
* @param value new value of the property
885
* @param recurse set property also on the subdirectories
886
* @param force do not check if the value is valid
887
* @throws ClientException
890
public void propertySet(String path, String name, String value,
891
boolean recurse, boolean force)
892
throws ClientException
896
worker.propertySet(path, name, value, recurse, force);
901
* Sets one property of an item with a byte array value
902
* @param path path of the item
903
* @param name name of the property
904
* @param value new value of the property
905
* @param recurse set property also on the subdirectories
906
* @throws ClientException
908
public void propertySet(String path, String name, byte[] value,
909
boolean recurse) throws ClientException
913
worker.propertySet(path, name, value, recurse);
918
* Sets one property of an item with a byte array value
920
* @param path path of the item
921
* @param name name of the property
922
* @param value new value of the property
923
* @param recurse set property also on the subdirectories
924
* @param force do not check if the value is valid
925
* @throws ClientException
928
public void propertySet(String path, String name, byte[] value,
929
boolean recurse, boolean force)
930
throws ClientException
934
worker.propertySet(path, name, value, recurse, force);
939
* Remove one property of an item.
940
* @param path path of the item
941
* @param name name of the property
942
* @param recurse remove the property also on subdirectories
943
* @throws ClientException
945
public void propertyRemove(String path, String name, boolean recurse)
946
throws ClientException
950
worker.propertyRemove(path, name, recurse);
954
* Create and sets one property of an item with a String value
955
* @param path path of the item
956
* @param name name of the property
957
* @param value new value of the property
958
* @param recurse set property also on the subdirectories
959
* @throws ClientException
961
public void propertyCreate(String path, String name, String value,
962
boolean recurse) throws ClientException
966
worker.propertyCreate(path, name, value, recurse);
971
* Create and sets one property of an item with a String value
973
* @param path path of the item
974
* @param name name of the property
975
* @param value new value of the property
976
* @param recurse set property also on the subdirectories
977
* @param force do not check if the value is valid
978
* @throws ClientException
981
public void propertyCreate(String path, String name, String value,
982
boolean recurse, boolean force)
983
throws ClientException
987
worker.propertyCreate(path, name, value, recurse, force);
992
* Create and sets one property of an item with a byte array value
993
* @param path path of the item
994
* @param name name of the property
995
* @param value new value of the property
996
* @param recurse set property also on the subdirectories
997
* @throws ClientException
999
public void propertyCreate(String path, String name, byte[] value,
1000
boolean recurse) throws ClientException
1004
worker.propertyCreate(path, name, value, recurse);
1009
* Create and sets one property of an item with a byte array value
1011
* @param path path of the item
1012
* @param name name of the property
1013
* @param value new value of the property
1014
* @param recurse set property also on the subdirectories
1015
* @param force do not check if the value is valid
1016
* @throws ClientException
1019
public void propertyCreate(String path, String name, byte[] value,
1020
boolean recurse, boolean force)
1021
throws ClientException
1025
worker.propertyCreate(path, name, value, recurse, force);
1030
* Retrieve one revsision property of one item
1031
* @param path path of the item
1032
* @param name name of the property
1033
* @param rev revision to retrieve
1034
* @return the Property
1035
* @throws ClientException
1037
public PropertyData revProperty(String path, String name, Revision rev)
1038
throws ClientException
1042
return worker.revProperty(path, name, rev);
1047
* Retrieve all revsision properties of one item
1049
* @param path path of the item
1050
* @param rev revision to retrieve
1051
* @return the Properties
1052
* @throws ClientException
1055
public PropertyData[] revProperties(String path, Revision rev)
1056
throws ClientException
1060
return worker.revProperties(path, rev);
1065
* set one revsision property of one item
1066
* @param path path of the item
1067
* @param name name of the property
1068
* @param rev revision to retrieve
1069
* @param value value of the property
1071
* @throws ClientException
1074
public void setRevProperty(String path, String name, Revision rev,
1075
String value, boolean force)
1076
throws ClientException
1080
worker.setRevProperty(path, name, rev, value, force);
1085
* Retrieve one property of one iten
1086
* @param path path of the item
1087
* @param name name of property
1088
* @return the Property
1089
* @throws ClientException
1091
public PropertyData propertyGet(String path, String name)
1092
throws ClientException
1096
return worker.propertyGet(path, name);
1100
* Retrieve one property of one iten
1102
* @param path path of the item
1103
* @param name name of property
1104
* @param revision revision of the item
1105
* @return the Property
1106
* @throws ClientException
1109
public PropertyData propertyGet(String path, String name, Revision revision)
1110
throws ClientException
1114
return worker.propertyGet(path, name, revision);
1119
* Retrieve one property of one iten
1121
* @param path path of the item
1122
* @param name name of property
1123
* @param revision revision of the item
1124
* @param pegRevision the revision to interpret path
1125
* @return the Property
1126
* @throws ClientException
1129
public PropertyData propertyGet(String path, String name, Revision revision,
1130
Revision pegRevision) throws ClientException
1134
return worker.propertyGet(path, name, revision, pegRevision);
1139
* Retrieve the content of a file
1140
* @param path the path of the file
1141
* @param revision the revision to retrieve
1142
* @return the content as byte array
1143
* @throws ClientException
1145
public byte[] fileContent(String path, Revision revision)
1146
throws ClientException
1150
return worker.fileContent(path, revision);
1155
* Retrieve the content of a file
1157
* @param path the path of the file
1158
* @param revision the revision to retrieve
1159
* @param pegRevision the revision to interpret path
1160
* @return the content as byte array
1161
* @throws ClientException
1164
public byte[] fileContent(String path, Revision revision,
1165
Revision pegRevision) throws ClientException
1169
return worker.fileContent(path, revision, pegRevision);
1174
* Rewrite the url's in the working copy
1175
* @param from old url
1177
* @param path working copy path
1178
* @param recurse recurse into subdirectories
1179
* @throws ClientException
1181
public void relocate(String from, String to, String path, boolean recurse)
1182
throws ClientException
1186
worker.relocate(from, to, path, recurse);
1190
* Return for each line of the file, the author and the revision of the
1191
* last together with the content.
1193
* @param path the path
1194
* @param revisionStart the first revision to show
1195
* @param revisionEnd the last revision to show
1196
* @return the content together with author and revision of last change
1197
* @throws ClientException
1199
public byte[] blame(String path, Revision revisionStart,
1200
Revision revisionEnd) throws ClientException
1204
return worker.blame(path,revisionStart, revisionEnd);
1208
* Retrieve the content together with the author, the revision and the date
1209
* of the last change of each line
1210
* @param path the path
1211
* @param revisionStart the first revision to show
1212
* @param revisionEnd the last revision to show
1213
* @param callback callback to receive the file content and the other
1215
* @throws ClientException
1217
public void blame(String path, Revision revisionStart, Revision revisionEnd,
1218
BlameCallback callback) throws ClientException
1222
worker.blame(path, revisionStart, revisionEnd, callback);
1227
* Retrieve the content together with the author, the revision and the date
1228
* of the last change of each line
1229
* @param path the path
1230
* @param pegRevision the revision to interpret the path
1231
* @param revisionStart the first revision to show
1232
* @param revisionEnd the last revision to show
1233
* @param callback callback to receive the file content and the other
1235
* @throws ClientException
1238
public void blame(String path, Revision pegRevision, Revision revisionStart,
1239
Revision revisionEnd, BlameCallback callback)
1240
throws ClientException
1244
worker.blame(path, pegRevision, revisionStart, revisionEnd,
1250
* Set directory for the configuration information
1251
* @param configDir path of the directory
1252
* @throws ClientException
1254
public void setConfigDirectory(String configDir) throws ClientException
1258
worker.setConfigDirectory(configDir);
1262
* Get the configuration directory
1263
* @return the directory
1264
* @throws ClientException
1266
public String getConfigDirectory() throws ClientException
1270
return worker.getConfigDirectory();
1274
* cancel the active operation
1275
* @throws ClientException
1277
public void cancelOperation() throws ClientException
1279
// this method is not synchronized, because it is designed to be called
1280
// from another thread
1281
worker.cancelOperation();
1285
* Retrieves the working copy information for an item
1286
* @param path path of the item
1287
* @return the information object
1288
* @throws ClientException
1290
public Info info(String path) throws ClientException
1294
return worker.info(path);
1299
* Commits changes to the repository.
1301
* @param path files to commit.
1302
* @param message log message.
1303
* @param recurse whether the operation should be done recursively.
1304
* @param noUnlock do remove any locks
1305
* @return Returns a long representing the revision. It returns a
1306
* -1 if the revision number is invalid.
1307
* @throws ClientException
1310
public long commit(String[] path, String message, boolean recurse,
1311
boolean noUnlock) throws ClientException
1315
return worker.commit(path, message, recurse, noUnlock);
1320
* Lock a working copy item
1322
* @param path path of the item
1324
* @param force break an existing lock
1325
* @throws ClientException
1328
public void lock(String[] path, String comment, boolean force)
1329
throws ClientException
1333
worker.lock(path, comment, force);
1338
* Unlock a working copy item
1340
* @param path path of the item
1341
* @param force break an existing lock
1342
* @throws ClientException
1345
public void unlock(String[] path, boolean force)
1346
throws ClientException
1350
worker.unlock(path, force);
1355
* Retrieve information about repository or working copy items.
1357
* @param pathOrUrl the path or the url of the item
1358
* @param revision the revision of the item to return
1359
* @param pegRevision the revision to interpret pathOrUrl
1360
* @param recurse flag if to recurse, if the item is a directory
1361
* @return the information objects
1364
public Info2[] info2(String pathOrUrl, Revision revision,
1365
Revision pegRevision, boolean recurse)
1366
throws ClientException
1370
return worker.info2(pathOrUrl, revision, pegRevision, recurse);
1375
* Produce a compact "version number" for a working copy
1376
* @param path path of the working copy
1377
* @param trailUrl to detect switches of the whole working copy
1378
* @param lastChanged last changed rather than current revisions
1379
* @return the compact "version number"
1380
* @throws ClientException
1383
public String getVersionInfo(String path, String trailUrl,
1384
boolean lastChanged) throws ClientException
1388
return worker.getVersionInfo(path, trailUrl, lastChanged);