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