-
Notifications
You must be signed in to change notification settings - Fork 173
/
ScmProvider.java
967 lines (894 loc) · 42.5 KB
/
ScmProvider.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
package org.apache.maven.scm.provider;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
import org.apache.maven.scm.CommandParameters;
import org.apache.maven.scm.ScmBranch;
import org.apache.maven.scm.ScmBranchParameters;
import org.apache.maven.scm.ScmException;
import org.apache.maven.scm.ScmFileSet;
import org.apache.maven.scm.ScmTagParameters;
import org.apache.maven.scm.ScmVersion;
import org.apache.maven.scm.command.add.AddScmResult;
import org.apache.maven.scm.command.blame.BlameScmRequest;
import org.apache.maven.scm.command.blame.BlameScmResult;
import org.apache.maven.scm.command.branch.BranchScmResult;
import org.apache.maven.scm.command.changelog.ChangeLogScmRequest;
import org.apache.maven.scm.command.changelog.ChangeLogScmResult;
import org.apache.maven.scm.command.checkin.CheckInScmResult;
import org.apache.maven.scm.command.checkout.CheckOutScmResult;
import org.apache.maven.scm.command.diff.DiffScmResult;
import org.apache.maven.scm.command.edit.EditScmResult;
import org.apache.maven.scm.command.export.ExportScmResult;
import org.apache.maven.scm.command.info.InfoScmResult;
import org.apache.maven.scm.command.list.ListScmResult;
import org.apache.maven.scm.command.mkdir.MkdirScmResult;
import org.apache.maven.scm.command.remoteinfo.RemoteInfoScmResult;
import org.apache.maven.scm.command.remove.RemoveScmResult;
import org.apache.maven.scm.command.status.StatusScmResult;
import org.apache.maven.scm.command.tag.TagScmResult;
import org.apache.maven.scm.command.unedit.UnEditScmResult;
import org.apache.maven.scm.command.untag.UntagScmResult;
import org.apache.maven.scm.command.update.UpdateScmResult;
import org.apache.maven.scm.log.ScmLogger;
import org.apache.maven.scm.repository.ScmRepository;
import org.apache.maven.scm.repository.ScmRepositoryException;
import org.apache.maven.scm.repository.UnknownRepositoryStructure;
import java.io.File;
import java.util.Date;
import java.util.List;
/**
* @author <a href="mailto:evenisse@apache.org">Emmanuel Venisse</a>
*
*/
public interface ScmProvider
{
String ROLE = ScmProvider.class.getName();
String getScmType();
/**
* Add a logger listener.
*
* @param logger The logger
*/
@Deprecated
void addListener( ScmLogger logger );
boolean requiresEditMode();
ScmProviderRepository makeProviderScmRepository( String scmSpecificUrl, char delimiter )
throws ScmRepositoryException;
ScmProviderRepository makeProviderScmRepository( File path )
throws ScmRepositoryException, UnknownRepositoryStructure;
/**
* Validate the scm url.
*
* @param scmSpecificUrl The SCM url
* @param delimiter The delimiter used in the SCM url
* @return Returns a list of messages if the validation failed
*/
List<String> validateScmUrl( String scmSpecificUrl, char delimiter );
/**
* Returns the scm reserved file name where the SCM stores information like 'CVS', '.svn'.
*
* @return the scm reserved file name
*/
String getScmSpecificFilename();
/**
* Check if this tag is valid for this SCM provider.
*
* @param tag tag name to check
* @return true if tag is valid
*/
boolean validateTagName( String tag );
/**
* Given a tag name, make it suitable for this SCM provider. For example, CVS converts "." into "_"
*
* @param tag input tag name
* @return sanitized tag name
*/
String sanitizeTagName( String tag );
/**
* Adds the given files to the source control system
*
* @param repository the source control system
* @param fileSet the files to be added
* @return an {@link AddScmResult} that contains the files that have been added
* @throws ScmException if any
*/
AddScmResult add( ScmRepository repository, ScmFileSet fileSet )
throws ScmException;
/**
* Adds the given files to the source control system
*
* @param repository the source control system
* @param fileSet the files to be added
* @param message a string that is a comment on the new added file
* @return an {@link AddScmResult} that contains the files that have been added
* @throws ScmException if any
*/
AddScmResult add( ScmRepository repository, ScmFileSet fileSet, String message )
throws ScmException;
/**
* Adds the given files to the source control system
*
* @param repository the source control system
* @param fileSet the files to be added
* @param commandParameters {@link CommandParameters}
* @return an {@link AddScmResult} that contains the files that have been added
* @throws ScmException if any
*/
AddScmResult add( ScmRepository repository, ScmFileSet fileSet, CommandParameters commandParameters )
throws ScmException;
/**
* Branch (or label in some systems) will create a branch of the source file with a certain branch name
*
* @param repository the source control system
* @param fileSet the files to branch. Implementations can also give the changes
* from the {@link org.apache.maven.scm.ScmFileSet#getBasedir()} downwards.
* @param branchName the branch name to apply to the files
* @return TODO
* @throws ScmException if any
* @deprecated use {@link #branch(ScmRepository, ScmFileSet, String, ScmBranchParameters)}
*/
BranchScmResult branch( ScmRepository repository, ScmFileSet fileSet, String branchName )
throws ScmException;
/**
* Branch (or label in some systems) will create a branch of the source file with a certain branch name
*
* @param repository the source control system
* @param fileSet the files to branch. Implementations can also give the changes
* from the {@link org.apache.maven.scm.ScmFileSet#getBasedir()} downwards.
* @param branchName the branch name to apply to the files
* @param message the commit message used for the tag creation
* @return TODO
* @throws ScmException if any
* @deprecated use {@link #branch(ScmRepository, ScmFileSet, String, ScmBranchParameters)}
*/
BranchScmResult branch( ScmRepository repository, ScmFileSet fileSet, String branchName, String message )
throws ScmException;
/**
* Branch (or label in some systems) will create a branch of the source file with a certain
* branch name
*
* @param repository the source control system
* @param fileSet the files to branch. Implementations can also give the changes from the
* {@link org.apache.maven.scm.ScmFileSet#getBasedir()} downwards.
* @param branchName the branch name to apply to the files
* @param scmBranchParameters TODO
* @return TODO
* @throws ScmException if any
* @since 1.3
*/
BranchScmResult branch( ScmRepository repository, ScmFileSet fileSet, String branchName,
ScmBranchParameters scmBranchParameters )
throws ScmException;
/**
* Returns the changes that have happened in the source control system in a certain period of time.
* This can be adding, removing, updating, ... of files
*
* @param repository the source control system
* @param fileSet the files to know the changes about. Implementations can also give the changes
* from the {@link org.apache.maven.scm.ScmFileSet#getBasedir()} downwards.
* @param startDate the start date of the period
* @param endDate the end date of the period
* @param numDays the number days before the current time if startdate and enddate are null
* @param branch the branch/tag name
* @return The SCM result of the changelog command
* @throws ScmException if any
* @deprecated you must use {@link ScmProvider#changeLog(org.apache.maven.scm.repository.ScmRepository,
* org.apache.maven.scm.ScmFileSet, java.util.Date, java.util.Date, int,
* org.apache.maven.scm.ScmBranch)}
*/
ChangeLogScmResult changeLog( ScmRepository repository, ScmFileSet fileSet, Date startDate, Date endDate,
int numDays, String branch )
throws ScmException;
/**
* Returns the changes that have happened in the source control system in a certain period of time.
* This can be adding, removing, updating, ... of files
*
* @param repository the source control system
* @param fileSet the files to know the changes about. Implementations can also give the changes
* from the {@link org.apache.maven.scm.ScmFileSet#getBasedir()} downwards.
* @param startDate the start date of the period
* @param endDate the end date of the period
* @param numDays the number days before the current time if startdate and enddate are null
* @param branch the branch/tag
* @return The SCM result of the changelog command
* @throws ScmException if any
* @deprecated use {@link #changeLog(org.apache.maven.scm.command.changelog.ChangeLogScmRequest)} instead
*/
@Deprecated
ChangeLogScmResult changeLog( ScmRepository repository, ScmFileSet fileSet, Date startDate, Date endDate,
int numDays, ScmBranch branch )
throws ScmException;
/**
* Returns the changes that have happened in the source control system in a certain period of time.
* This can be adding, removing, updating, ... of files
*
* @param repository the source control system
* @param fileSet the files to know the changes about. Implementations can also give the changes
* from the {@link org.apache.maven.scm.ScmFileSet#getBasedir()} downwards.
* @param startDate the start date of the period
* @param endDate the end date of the period
* @param numDays the number days before the current time if startdate and enddate are null
* @param branch the branch/tag name
* @param datePattern the date pattern use in changelog output returned by scm tool
* @return The SCM result of the changelog command
* @throws ScmException if any
* @deprecated use {@link #changeLog(org.apache.maven.scm.command.changelog.ChangeLogScmRequest)} instead
*/
@Deprecated
ChangeLogScmResult changeLog( ScmRepository repository, ScmFileSet fileSet, Date startDate, Date endDate,
int numDays, String branch, String datePattern )
throws ScmException;
/**
* Returns the changes that have happened in the source control system in a certain period of time.
* This can be adding, removing, updating, ... of files
*
* @param repository the source control system
* @param fileSet the files to know the changes about. Implementations can also give the changes
* from the {@link org.apache.maven.scm.ScmFileSet#getBasedir()} downwards.
* @param startDate the start date of the period
* @param endDate the end date of the period
* @param numDays the number days before the current time if startDate and endDate are null
* @param branch the branch/tag
* @param datePattern the date pattern use in changelog output returned by scm tool
* @return The SCM result of the changelog command
* @throws ScmException if any
* @deprecated use {@link #changeLog(org.apache.maven.scm.command.changelog.ChangeLogScmRequest)} instead
*/
ChangeLogScmResult changeLog( ScmRepository repository, ScmFileSet fileSet, Date startDate, Date endDate,
int numDays, ScmBranch branch, String datePattern )
throws ScmException;
/**
* Returns the changes that have happened in the source control system in a certain period of time.
* This can be adding, removing, updating, ... of files
*
* @param scmRequest request wrapping detailed parameters for the changelog command
* @return The SCM result of the changelog command
* @throws ScmException if any
* @since 1.8
*/
ChangeLogScmResult changeLog( ChangeLogScmRequest scmRequest )
throws ScmException;
/**
* Returns the changes that have happened in the source control system between two tags.
* This can be adding, removing, updating, ... of files
*
* @param repository the source control system
* @param fileSet the files to know the changes about. Implementations can also give the changes
* from the {@link org.apache.maven.scm.ScmFileSet#getBasedir()} downwards.
* @param startTag the start tag
* @param endTag the end tag
* @return The SCM result of the changelog command
* @throws ScmException if any
* @deprecated use {@link #changeLog(org.apache.maven.scm.command.changelog.ChangeLogScmRequest)} instead
*/
@Deprecated
ChangeLogScmResult changeLog( ScmRepository repository, ScmFileSet fileSet, String startTag, String endTag )
throws ScmException;
/**
* Returns the changes that have happened in the source control system between two tags.
* This can be adding, removing, updating, ... of files
*
* @param repository the source control system
* @param fileSet the files to know the changes about. Implementations can also give the changes
* from the {@link org.apache.maven.scm.ScmFileSet#getBasedir()} downwards.
* @param startVersion the start branch/tag/revision
* @param endVersion the end branch/tag/revision
* @return The SCM result of the changelog command
* @throws ScmException if any
* @deprecated use {@link #changeLog(org.apache.maven.scm.command.changelog.ChangeLogScmRequest)} instead
*/
@Deprecated
ChangeLogScmResult changeLog( ScmRepository repository, ScmFileSet fileSet, ScmVersion startVersion,
ScmVersion endVersion )
throws ScmException;
/**
* Returns the changes that have happened in the source control system between two tags.
* This can be adding, removing, updating, ... of files
*
* @param repository the source control system
* @param fileSet the files to know the changes about. Implementations can also give the changes
* from the {@link org.apache.maven.scm.ScmFileSet#getBasedir()} downwards.
* @param startTag the start tag
* @param endTag the end tag
* @param datePattern the date pattern use in changelog output returned by scm tool
* @return TODO
* @throws ScmException if any
* @deprecated use {@link #changeLog(org.apache.maven.scm.command.changelog.ChangeLogScmRequest)} instead
*/
@Deprecated
ChangeLogScmResult changeLog( ScmRepository repository, ScmFileSet fileSet, String startTag, String endTag,
String datePattern )
throws ScmException;
/**
* Returns the changes that have happened in the source control system between two tags.
* This can be adding, removing, updating, ... of files
*
* @param repository the source control system
* @param fileSet the files to know the changes about. Implementations can also give the changes
* from the {@link org.apache.maven.scm.ScmFileSet#getBasedir()} downwards.
* @param startRevision the start revision
* @param endRevision the end revision
* @param datePattern the date pattern use in changelog output returned by scm tool
* @return TODO
* @throws ScmException if any
* @deprecated use {@link #changeLog(org.apache.maven.scm.command.changelog.ChangeLogScmRequest)} instead
*/
@Deprecated
ChangeLogScmResult changeLog( ScmRepository repository, ScmFileSet fileSet, ScmVersion startRevision,
ScmVersion endRevision, String datePattern )
throws ScmException;
/**
* Save the changes you have done into the repository. This will create a new version of the file or
* directory in the repository.
* <p>
* When the fileSet has no entries, the fileSet.getBaseDir() is recursively committed.
* When the fileSet has entries, the commit is non-recursive and only the elements in the fileSet
* are committed.
*
* @param repository the source control system
* @param fileSet the files to check in (sometimes called commit)
* @param tag tag or revision
* @param message a string that is a comment on the changes that where done
* @return TODO
* @throws ScmException if any
* @deprecated you must use {@link ScmProvider#checkIn(org.apache.maven.scm.repository.ScmRepository,
* org.apache.maven.scm.ScmFileSet, org.apache.maven.scm.ScmVersion, String)}
*/
CheckInScmResult checkIn( ScmRepository repository, ScmFileSet fileSet, String tag, String message )
throws ScmException;
/**
* Save the changes you have done into the repository. This will create a new version of the file or
* directory in the repository.
* <p>
* When the fileSet has no entries, the fileSet.getBaseDir() is recursively committed.
* When the fileSet has entries, the commit is non-recursive and only the elements in the fileSet
* are committed.
*
* @param repository the source control system
* @param fileSet the files to check in (sometimes called commit)
* @param message a string that is a comment on the changes that where done
* @return TODO
* @throws ScmException if any
*/
CheckInScmResult checkIn( ScmRepository repository, ScmFileSet fileSet, String message )
throws ScmException;
/**
* Save the changes you have done into the repository. This will create a new version of the file or
* directory in the repository.
* <p>
* When the fileSet has no entries, the fileSet.getBaseDir() is recursively committed.
* When the fileSet has entries, the commit is non-recursive and only the elements in the fileSet
* are committed.
*
* @param repository the source control system
* @param fileSet the files to check in (sometimes called commit)
* @param revision branch/tag/revision
* @param message a string that is a comment on the changes that where done
* @return TODO
* @throws ScmException if any
*/
CheckInScmResult checkIn( ScmRepository repository, ScmFileSet fileSet, ScmVersion revision, String message )
throws ScmException;
/**
* Create a copy of the repository on your local machine
*
* @param repository the source control system
* @param fileSet the files are copied to the {@link org.apache.maven.scm.ScmFileSet#getBasedir()} location
* @param tag get the version defined by the tag
* @return TODO
* @throws ScmException if any
* @deprecated you must use {@link ScmProvider#checkOut(org.apache.maven.scm.repository.ScmRepository,
* org.apache.maven.scm.ScmFileSet, org.apache.maven.scm.ScmVersion)}
*/
CheckOutScmResult checkOut( ScmRepository repository, ScmFileSet fileSet, String tag )
throws ScmException;
/**
* Create a copy of the repository on your local machine
*
* @param repository the source control system
* @param fileSet the files are copied to the {@link org.apache.maven.scm.ScmFileSet#getBasedir()} location
* @return TODO
* @throws ScmException if any
*/
CheckOutScmResult checkOut( ScmRepository repository, ScmFileSet fileSet )
throws ScmException;
/**
* Create a copy of the repository on your local machine
*
* @param repository the source control system
* @param fileSet the files are copied to the {@link org.apache.maven.scm.ScmFileSet#getBasedir()} location
* @param version get the version defined by the revision, branch or tag
* @return TODO
* @throws ScmException if any
*/
CheckOutScmResult checkOut( ScmRepository repository, ScmFileSet fileSet, ScmVersion version )
throws ScmException;
/**
* Create a copy of the repository on your local machine.
*
* @param scmRepository the source control system
* @param scmFileSet the files are copied to the {@link org.apache.maven.scm.ScmFileSet#getBasedir()} location
* @param tag tag or revision
* @param recursive whether to check out recursively
* @return TODO
* @throws ScmException if any
* @deprecated you must use {@link ScmProvider#checkOut(org.apache.maven.scm.repository.ScmRepository,
* org.apache.maven.scm.ScmFileSet, org.apache.maven.scm.ScmVersion, boolean)}
*/
CheckOutScmResult checkOut( ScmRepository scmRepository, ScmFileSet scmFileSet, String tag, boolean recursive )
throws ScmException;
/**
* Create a copy of the repository on your local machine.
*
* @param scmRepository the source control system
* @param scmFileSet the files are copied to the {@link org.apache.maven.scm.ScmFileSet#getBasedir()} location
* @param recursive whether to check out recursively
* @return TODO
* @throws ScmException if any
*/
CheckOutScmResult checkOut( ScmRepository scmRepository, ScmFileSet scmFileSet, boolean recursive )
throws ScmException;
/**
* Create a copy of the repository on your local machine.
*
* @param scmRepository the source control system
* @param scmFileSet the files are copied to the {@link org.apache.maven.scm.ScmFileSet#getBasedir()} location
* @param version get the version defined by the revision, branch or tag
* @param recursive whether to check out recursively
* @return TODO
* @throws ScmException if any
*/
CheckOutScmResult checkOut( ScmRepository scmRepository, ScmFileSet scmFileSet, ScmVersion version,
boolean recursive )
throws ScmException;
/**
* Create a copy of the repository on your local machine.
*
* @param scmRepository the source control system
* @param scmFileSet the files are copied to the {@link org.apache.maven.scm.ScmFileSet#getBasedir()}
* location
* @param version get the version defined by the revision, branch or tag
* @param commandParameters parameters
* @return TODO
* @throws ScmException if any
* @since 1.9.6
*/
CheckOutScmResult checkOut( ScmRepository scmRepository, ScmFileSet scmFileSet, ScmVersion version , //
CommandParameters commandParameters )
throws ScmException;
/**
* Create a diff between two branch/tag/revision.
*
* @param scmRepository the source control system
* @param scmFileSet the files are copied to the {@link org.apache.maven.scm.ScmFileSet#getBasedir()} location
* @param startRevision the start revision
* @param endRevision the end revision
* @return TODO
* @throws ScmException if any
* @deprecated you must use {@link ScmProvider#diff(org.apache.maven.scm.repository.ScmRepository,
* org.apache.maven.scm.ScmFileSet, org.apache.maven.scm.ScmVersion, org.apache.maven.scm.ScmVersion)}
*/
DiffScmResult diff( ScmRepository scmRepository, ScmFileSet scmFileSet, String startRevision, String endRevision )
throws ScmException;
/**
* Create a diff between two branch/tag/revision.
*
* @param scmRepository the source control system
* @param scmFileSet the files are copied to the {@link org.apache.maven.scm.ScmFileSet#getBasedir()} location
* @param startVersion the start branch/tag/revision
* @param endVersion the end branch/tag/revision
* @return TODO
* @throws ScmException if any
*/
DiffScmResult diff( ScmRepository scmRepository, ScmFileSet scmFileSet, ScmVersion startVersion,
ScmVersion endVersion )
throws ScmException;
/**
* Create an exported copy of the repository on your local machine
*
* @param repository the source control system
* @param fileSet the files are copied to the {@link org.apache.maven.scm.ScmFileSet#getBasedir()} location
* @param tag get the version defined by the tag
* @return TODO
* @throws ScmException if any
* @deprecated you must use {@link ScmProvider#export(org.apache.maven.scm.repository.ScmRepository,
* org.apache.maven.scm.ScmFileSet, org.apache.maven.scm.ScmVersion)}
*/
ExportScmResult export( ScmRepository repository, ScmFileSet fileSet, String tag )
throws ScmException;
/**
* Create an exported copy of the repository on your local machine
*
* @param repository the source control system
* @param fileSet the files are copied to the {@link org.apache.maven.scm.ScmFileSet#getBasedir()} location
* @return TODO
* @throws ScmException if any
*/
ExportScmResult export( ScmRepository repository, ScmFileSet fileSet )
throws ScmException;
/**
* Create an exported copy of the repository on your local machine
*
* @param repository the source control system
* @param fileSet the files are copied to the {@link org.apache.maven.scm.ScmFileSet#getBasedir()} location
* @param version get the version defined by the branch/tag/revision
* @return TODO
* @throws ScmException if any
*/
ExportScmResult export( ScmRepository repository, ScmFileSet fileSet, ScmVersion version )
throws ScmException;
/**
* Create an exported copy of the repository on your local machine
*
* @param repository the source control system
* @param fileSet the files are copied to the {@link org.apache.maven.scm.ScmFileSet#getBasedir()} location
* @param tag get the version defined by the tag
* @param outputDirectory the directory where the export will be stored
* @return TODO
* @throws ScmException if any
* @deprecated you must use {@link ScmProvider#export(org.apache.maven.scm.repository.ScmRepository,
* org.apache.maven.scm.ScmFileSet, org.apache.maven.scm.ScmVersion, String)}
*/
ExportScmResult export( ScmRepository repository, ScmFileSet fileSet, String tag, String outputDirectory )
throws ScmException;
/**
* Create an exported copy of the repository on your local machine
*
* @param repository the source control system
* @param fileSet the files are copied to the {@link org.apache.maven.scm.ScmFileSet#getBasedir()} location
* @param version get the version defined by the branch/tag/revision
* @param outputDirectory the directory where the export will be stored
* @return TODO
* @throws ScmException if any
*/
ExportScmResult export( ScmRepository repository, ScmFileSet fileSet, ScmVersion version, String outputDirectory )
throws ScmException;
/**
* Removes the given files from the source control system
*
* @param repository the source control system
* @param fileSet the files to be removed
* @param message TODO
* @return TODO
* @throws ScmException if any
*/
RemoveScmResult remove( ScmRepository repository, ScmFileSet fileSet, String message )
throws ScmException;
/**
* Returns the status of the files in the source control system. The state of each file can be one
* of the {@link org.apache.maven.scm.ScmFileStatus} flags.
*
* @param repository the source control system
* @param fileSet the files to know the status about. Implementations can also give the changes
* from the {@link org.apache.maven.scm.ScmFileSet#getBasedir()} downwards.
* @return TODO
* @throws ScmException if any
*/
StatusScmResult status( ScmRepository repository, ScmFileSet fileSet )
throws ScmException;
/**
* Tag (or label in some systems) will tag the source file with a certain tag
*
* @param repository the source control system
* @param fileSet the files to tag. Implementations can also give the changes
* from the {@link org.apache.maven.scm.ScmFileSet#getBasedir()} downwards.
* @param tagName the tag name to apply to the files
* @return TODO
* @throws ScmException if any
* @deprecated use {@link #tag(ScmRepository, ScmFileSet, String, ScmTagParameters)}
*/
TagScmResult tag( ScmRepository repository, ScmFileSet fileSet, String tagName )
throws ScmException;
/**
* Deletes a tag.
*
* @param repository the source control system
* @param fileSet a fileset with the relevant working directory as basedir
* @param parameters TODO
* @return TODO
* @throws ScmException if any
*/
UntagScmResult untag( ScmRepository repository, ScmFileSet fileSet, CommandParameters parameters )
throws ScmException;
/**
* Tag (or label in some systems) will tag the source file with a certain tag
*
* @param repository the source control system
* @param fileSet the files to tag. Implementations can also give the changes
* from the {@link org.apache.maven.scm.ScmFileSet#getBasedir()} downwards.
* @param tagName the tag name to apply to the files
* @param message the commit message used for the tag creation
* @return TODO
* @throws ScmException if any
* @deprecated use {@link #tag(ScmRepository, ScmFileSet, String, ScmTagParameters)}
*/
TagScmResult tag( ScmRepository repository, ScmFileSet fileSet, String tagName, String message )
throws ScmException;
/**
* Tag (or label in some systems) will tag the source file with a certain tag
*
* @param repository the source control system
* @param fileSet the files to tag. Implementations can also give the changes
* from the {@link org.apache.maven.scm.ScmFileSet#getBasedir()} downwards.
* @param tagName the tag name to apply to the files
* @param scmTagParameters bean to pass some paramters for tagging {@link ScmTagParameters}
* @return TODO
* @throws ScmException if any
* @since 1.2
*/
TagScmResult tag( ScmRepository repository, ScmFileSet fileSet, String tagName, ScmTagParameters scmTagParameters )
throws ScmException;
/**
* Updates the copy on the local machine with the changes in the repository
*
* @param repository the source control system
* @param fileSet location of your local copy
* @return TODO
* @throws ScmException if any
*/
UpdateScmResult update( ScmRepository repository, ScmFileSet fileSet )
throws ScmException;
/**
* Updates the copy on the local machine with the changes in the repository
*
* @param repository the source control system
* @param fileSet location of your local copy
* @param tag use the version defined by the tag
* @return TODO
* @throws ScmException if any
* @deprecated you must use {@link ScmProvider#update(org.apache.maven.scm.repository.ScmRepository,
* org.apache.maven.scm.ScmFileSet, org.apache.maven.scm.ScmVersion)}
*/
UpdateScmResult update( ScmRepository repository, ScmFileSet fileSet, String tag )
throws ScmException;
/**
* Updates the copy on the local machine with the changes in the repository
*
* @param repository the source control system
* @param fileSet location of your local copy
* @param version use the version defined by the branch/tag/revision
* @return TODO
* @throws ScmException if any
*/
UpdateScmResult update( ScmRepository repository, ScmFileSet fileSet, ScmVersion version )
throws ScmException;
/**
* Updates the copy on the local machine with the changes in the repository
*
* @param repository the source control system
* @param fileSet location of your local copy
* @param tag use the version defined by the tag
* @param runChangelog Run the changelog command after the update
* @return TODO
* @throws ScmException if any
* @deprecated you must use {@link ScmProvider#update(org.apache.maven.scm.repository.ScmRepository,
* org.apache.maven.scm.ScmFileSet, org.apache.maven.scm.ScmVersion, boolean)}
*/
UpdateScmResult update( ScmRepository repository, ScmFileSet fileSet, String tag, boolean runChangelog )
throws ScmException;
/**
* Updates the copy on the local machine with the changes in the repository
*
* @param repository the source control system
* @param fileSet location of your local copy
* @param runChangelog Run the changelog command after the update
* @return TODO
* @throws ScmException if any
*/
UpdateScmResult update( ScmRepository repository, ScmFileSet fileSet, boolean runChangelog )
throws ScmException;
/**
* Updates the copy on the local machine with the changes in the repository
*
* @param repository the source control system
* @param fileSet location of your local copy
* @param version use the version defined by the branch/tag/revision
* @param runChangelog Run the changelog command after the update
* @return TODO
* @throws ScmException if any
*/
UpdateScmResult update( ScmRepository repository, ScmFileSet fileSet, ScmVersion version, boolean runChangelog )
throws ScmException;
/**
* Updates the copy on the local machine with the changes in the repository
*
* @param repository the source control system
* @param fileSet location of your local copy
* @param tag use the version defined by the tag
* @param datePattern the date pattern use in changelog output returned by scm tool
* @return TODO
* @throws ScmException if any
* @deprecated you must use {@link ScmProvider#update(org.apache.maven.scm.repository.ScmRepository,
* org.apache.maven.scm.ScmFileSet, org.apache.maven.scm.ScmVersion, String)}
*/
UpdateScmResult update( ScmRepository repository, ScmFileSet fileSet, String tag, String datePattern )
throws ScmException;
/**
* Updates the copy on the local machine with the changes in the repository
*
* @param repository the source control system
* @param fileSet location of your local copy
* @param version use the version defined by the branch/tag/revision
* @param datePattern the date pattern use in changelog output returned by scm tool
* @return TODO
* @throws ScmException if any
*/
UpdateScmResult update( ScmRepository repository, ScmFileSet fileSet, ScmVersion version, String datePattern )
throws ScmException;
/**
* Updates the copy on the local machine with the changes in the repository
*
* @param repository the source control system
* @param fileSet location of your local copy
* @param tag use the version defined by the tag
* @param lastUpdate TODO
* @return TODO
* @throws ScmException if any
* @deprecated you must use {@link ScmProvider#update(org.apache.maven.scm.repository.ScmRepository,
* org.apache.maven.scm.ScmFileSet, org.apache.maven.scm.ScmVersion, java.util.Date)}
*/
UpdateScmResult update( ScmRepository repository, ScmFileSet fileSet, String tag, Date lastUpdate )
throws ScmException;
/**
* Updates the copy on the local machine with the changes in the repository
*
* @param repository the source control system
* @param fileSet location of your local copy
* @param version use the version defined by the branch/tag/revision
* @param lastUpdate TODO
* @return TODO
* @throws ScmException if any
*/
UpdateScmResult update( ScmRepository repository, ScmFileSet fileSet, ScmVersion version, Date lastUpdate )
throws ScmException;
/**
* Updates the copy on the local machine with the changes in the repository
*
* @param repository the source control system
* @param fileSet location of your local copy
* @param tag use the version defined by the tag
* @param lastUpdate Date of last update
* @param datePattern the date pattern use in changelog output returned by scm tool
* @return TODO
* @throws ScmException if any
* @deprecated you must use {@link ScmProvider#update(org.apache.maven.scm.repository.ScmRepository,
* org.apache.maven.scm.ScmFileSet, org.apache.maven.scm.ScmVersion, java.util.Date, String)}
*/
UpdateScmResult update( ScmRepository repository, ScmFileSet fileSet, String tag, Date lastUpdate,
String datePattern )
throws ScmException;
/**
* Updates the copy on the local machine with the changes in the repository
*
* @param repository the source control system
* @param fileSet location of your local copy
* @param version use the version defined by the branch/tag/revision
* @param lastUpdate Date of last update
* @param datePattern the date pattern use in changelog output returned by scm tool
* @return TODO
* @throws ScmException if any
*/
UpdateScmResult update( ScmRepository repository, ScmFileSet fileSet, ScmVersion version, Date lastUpdate,
String datePattern )
throws ScmException;
/**
* Make a file editable. This is used in source control systems where you look at read-only files
* and you need to make them not read-only anymore before you can edit them. This can also mean
* that no other user in the system can make the file not read-only anymore.
*
* @param repository the source control system
* @param fileSet the files to make editable
* @return TODO
* @throws ScmException if any
*/
EditScmResult edit( ScmRepository repository, ScmFileSet fileSet )
throws ScmException;
/**
* Make a file no longer editable. This is the conterpart of {@link #edit(
*org.apache.maven.scm.repository.ScmRepository, org.apache.maven.scm.ScmFileSet)}.
* It makes the file read-only again.
*
* @param repository the source control system
* @param fileSet the files to make uneditable
* @return TODO
* @throws ScmException if any
*/
UnEditScmResult unedit( ScmRepository repository, ScmFileSet fileSet )
throws ScmException;
/**
* List each element (files and directories) of <B>fileSet</B> as they exist in the repository.
*
* @param repository the source control system
* @param fileSet the files to list
* @param recursive descend recursively
* @param tag use the version defined by the tag
* @return the list of files in the repository
* @throws ScmException if any
* @deprecated you must use {@link ScmProvider#list(org.apache.maven.scm.repository.ScmRepository,
* org.apache.maven.scm.ScmFileSet, boolean, org.apache.maven.scm.ScmVersion)}
*/
ListScmResult list( ScmRepository repository, ScmFileSet fileSet, boolean recursive, String tag )
throws ScmException;
/**
* List each element (files and directories) of <B>fileSet</B> as they exist in the repository.
*
* @param repository the source control system
* @param fileSet the files to list
* @param recursive descend recursively
* @param version use the version defined by the branch/tag/revision
* @return the list of files in the repository
* @throws ScmException if any
*/
ListScmResult list( ScmRepository repository, ScmFileSet fileSet, boolean recursive, ScmVersion version )
throws ScmException;
/**
* Returns the blame of specified file
*
* @param repository the source control system
* @param fileSet location of your local copy
* @param filename file
* @return blame for specified file
* @throws ScmException if any
* @since 1.4
* @deprecated use blame with {@link BlameScmRequest} parameter
*/
BlameScmResult blame( ScmRepository repository, ScmFileSet fileSet, String filename )
throws ScmException;
/**
*
* @param blameScmRequest TODO
* @return blame for the file specified in the request
* @throws ScmException if any
* @since 1.8
*/
BlameScmResult blame( BlameScmRequest blameScmRequest )
throws ScmException;
/**
* Create directory/directories in the repository.
*
* @param repository TODO
* @param fileSet TODO
* @param createInLocal TODO
* @param message TODO
* @return TODO
* @throws ScmException if any
*/
MkdirScmResult mkdir( ScmRepository repository, ScmFileSet fileSet, String message, boolean createInLocal )
throws ScmException;
/**
* @param repository the source control system
* @param fileSet location of your local copy
* @param parameters some parameters (not use currently but for future use)
* @return if the scm implementation doesn't support "info" result will <code>null</code>
* @throws ScmException if any
* @since 1.5
*/
InfoScmResult info( ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters )
throws ScmException;
/**
* @param repository the source control system
* @param fileSet not use currently but for future use
* @param parameters some parameters (not use currently but for future use)
* @return if the scm implementation doesn't support "info" result will <code>null</code>
* @throws ScmException if any
* @since 1.6
*/
RemoteInfoScmResult remoteInfo( ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters )
throws ScmException;
}