1 package org.apache.maven.scm.manager; 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.ScmBranch; 23 import org.apache.maven.scm.ScmException; 24 import org.apache.maven.scm.ScmFileSet; 25 import org.apache.maven.scm.ScmVersion; 26 import org.apache.maven.scm.command.add.AddScmResult; 27 import org.apache.maven.scm.command.blame.BlameScmRequest; 28 import org.apache.maven.scm.command.blame.BlameScmResult; 29 import org.apache.maven.scm.command.branch.BranchScmResult; 30 import org.apache.maven.scm.command.changelog.ChangeLogScmRequest; 31 import org.apache.maven.scm.command.changelog.ChangeLogScmResult; 32 import org.apache.maven.scm.command.checkin.CheckInScmResult; 33 import org.apache.maven.scm.command.checkout.CheckOutScmResult; 34 import org.apache.maven.scm.command.diff.DiffScmResult; 35 import org.apache.maven.scm.command.edit.EditScmResult; 36 import org.apache.maven.scm.command.export.ExportScmResult; 37 import org.apache.maven.scm.command.list.ListScmResult; 38 import org.apache.maven.scm.command.mkdir.MkdirScmResult; 39 import org.apache.maven.scm.command.remove.RemoveScmResult; 40 import org.apache.maven.scm.command.status.StatusScmResult; 41 import org.apache.maven.scm.command.tag.TagScmResult; 42 import org.apache.maven.scm.command.unedit.UnEditScmResult; 43 import org.apache.maven.scm.command.update.UpdateScmResult; 44 import org.apache.maven.scm.provider.ScmProvider; 45 import org.apache.maven.scm.repository.ScmRepository; 46 import org.apache.maven.scm.repository.ScmRepositoryException; 47 import org.apache.maven.scm.repository.UnknownRepositoryStructure; 48 49 import java.io.File; 50 import java.util.Date; 51 import java.util.List; 52 53 /** 54 * @author <a href="mailto:trygvis@inamo.no">Trygve Laugstøl</a> 55 * @author <a href="mailto:brett@apache.org">Brett Porter</a> 56 * @author <a href="mailto:evenisse@apache.org">Emmanuel Venisse</a> 57 * @author Olivier Lamy 58 * 59 */ 60 public interface ScmManager 61 { 62 // ---------------------------------------------------------------------- 63 // Repository 64 // ---------------------------------------------------------------------- 65 66 /** 67 * Generate a SCMRepository from a SCM url. 68 * 69 * @param scmUrl the scm url 70 * @return The scm repository 71 * @throws ScmRepositoryException if an error occurs in the scm repository construction 72 * @throws NoSuchScmProviderException if the provider doesn't exist 73 */ 74 ScmRepository makeScmRepository( String scmUrl ) 75 throws ScmRepositoryException, NoSuchScmProviderException; 76 77 ScmRepository makeProviderScmRepository( String providerType, File path ) 78 throws ScmRepositoryException, UnknownRepositoryStructure, NoSuchScmProviderException; 79 80 /** 81 * Validate a SCM URL. 82 * 83 * @param scmUrl the SCM URL to validate 84 * @return <code>List</code> of <code>String</code> objects with the messages returned by the SCM provider 85 */ 86 List<String> validateScmRepository( String scmUrl ); 87 88 ScmProvider getProviderByUrl( String scmUrl ) 89 throws ScmRepositoryException, NoSuchScmProviderException; 90 91 /** 92 * Returns the default provider registered for this providerType or a specific implementation if the 93 * 'maven.scm.provider.providerType.implementation' system property is defined. For example: 94 * maven.scm.provider.git.implementation=git 95 * 96 * @param providerType The provider type (git, svn...) 97 * @return The scm provider 98 * @throws NoSuchScmProviderException if the provider doesn't exist 99 */ 100 ScmProvider getProviderByType( String providerType ) 101 throws NoSuchScmProviderException; 102 103 ScmProvider getProviderByRepository( ScmRepository repository ) 104 throws NoSuchScmProviderException; 105 106 /** 107 * Set a provider to be used for a type of SCM. If there was already a designed provider for that type it will be 108 * replaced. 109 * 110 * @param providerType the type of SCM, eg. <code>svn</code>, <code>git</code> 111 * @param provider the provider that will be used for that SCM type 112 */ 113 void setScmProvider( String providerType, ScmProvider provider ); 114 115 /** 116 * Set the provider implementation 117 * 118 * @param providerType The provider type, eg. <code>git</code> 119 * @param providerImplementation The provider implementation (the role-hint of the provider), eg. <code>git</code>, 120 * <code>svn</code> 121 */ 122 void setScmProviderImplementation( String providerType, String providerImplementation ); 123 124 /** 125 * Adds the given files to the source control system 126 * 127 * @param repository the source control system 128 * @param fileSet the files to be added 129 * @return an {@link AddScmResult} that contains the file paths (relative to {@code fileSet.getBasedir()}) that 130 * have been added 131 * @throws ScmException if any 132 * 133 */ 134 AddScmResult add( ScmRepository repository, ScmFileSet fileSet ) 135 throws ScmException; 136 137 /** 138 * Adds the given files to the source control system 139 * 140 * @param repository the source control system 141 * @param fileSet the files to be added 142 * @param message a string that is a comment on the new added file 143 * @return an {@link AddScmResult} that contains the file paths (relative to {@code fileSet.getBasedir()}) that 144 * have been added 145 * @throws ScmException if any 146 */ 147 AddScmResult add( ScmRepository repository, ScmFileSet fileSet, String message ) 148 throws ScmException; 149 150 /** 151 * Branch (or label in some systems) will create a branch of the source file with a certain branch name 152 * 153 * @param repository the source control system 154 * @param fileSet the files to branch. Implementations can also give the changes from the 155 * {@link org.apache.maven.scm.ScmFileSet#getBasedir()} downwards. 156 * @param branchName the branch name to apply to the files 157 * @return TODO 158 * @throws ScmException if any 159 */ 160 BranchScmResult branch( ScmRepository repository, ScmFileSet fileSet, String branchName ) 161 throws ScmException; 162 163 /** 164 * Branch (or label in some systems) will create a branch of the source file with a certain branch name 165 * 166 * @param repository the source control system 167 * @param fileSet the files to branch. Implementations can also give the changes from the 168 * {@link org.apache.maven.scm.ScmFileSet#getBasedir()} downwards. 169 * @param branchName the branch name to apply to the files 170 * @param message the commit message used for the tag creation 171 * @return TODO 172 * @throws ScmException if any 173 */ 174 BranchScmResult branch( ScmRepository repository, ScmFileSet fileSet, String branchName, String message ) 175 throws ScmException; 176 177 /** 178 * Returns the changes that have happend in the source control system in a certain period of time. This can be 179 * adding, removing, updating, ... of files 180 * 181 * @param repository the source control system 182 * @param fileSet the files to know the changes about. Implementations can also give the changes from the 183 * {@link org.apache.maven.scm.ScmFileSet#getBasedir()} downwards. 184 * @param startDate the start date of the period 185 * @param endDate the end date of the period 186 * @param numDays the number days before the current time if startdate and enddate are null 187 * @param branch the branch/tag 188 * @return The SCM result of the changelog command 189 * @throws ScmException if any 190 * @deprecated use {@link #changeLog(org.apache.maven.scm.command.changelog.ChangeLogScmRequest)} instead 191 */ 192 @Deprecated 193 ChangeLogScmResult changeLog( ScmRepository repository, ScmFileSet fileSet, Date startDate, Date endDate, 194 int numDays, ScmBranch branch ) 195 throws ScmException; 196 197 /** 198 * Returns the changes that have happend in the source control system in a certain period of time. This can be 199 * adding, removing, updating, ... of files 200 * 201 * @param repository the source control system 202 * @param fileSet the files to know the changes about. Implementations can also give the changes from the 203 * {@link org.apache.maven.scm.ScmFileSet#getBasedir()} downwards. 204 * @param startDate the start date of the period 205 * @param endDate the end date of the period 206 * @param numDays the number days before the current time if startdate and enddate are null 207 * @param branch the branch/tag 208 * @param datePattern the date pattern use in changelog output returned by scm tool 209 * @return The SCM result of the changelog command 210 * @throws ScmException if any 211 * @deprecated use {@link #changeLog(org.apache.maven.scm.command.changelog.ChangeLogScmRequest)} instead 212 */ 213 @Deprecated 214 ChangeLogScmResult changeLog( ScmRepository repository, ScmFileSet fileSet, Date startDate, Date endDate, 215 int numDays, ScmBranch branch, String datePattern ) 216 throws ScmException; 217 218 /** 219 * Returns the changes that have happend in the source control system in a certain period of time. This can be 220 * adding, removing, updating, ... of files 221 * 222 * @param scmRequest request wrapping detailed parameters for the changelog command 223 * @return The SCM result of the changelog command 224 * @throws ScmException if any 225 * @since 1.8 226 */ 227 ChangeLogScmResult changeLog( ChangeLogScmRequest scmRequest ) 228 throws ScmException; 229 230 /** 231 * Returns the changes that have happend in the source control system between two tags. This can be adding, 232 * removing, updating, ... of files 233 * 234 * @param repository the source control system 235 * @param fileSet the files to know the changes about. Implementations can also give the changes from the 236 * {@link org.apache.maven.scm.ScmFileSet#getBasedir()} downwards. 237 * @param startVersion the start branch/tag/revision 238 * @param endVersion the end branch/tag/revision 239 * @return The SCM result of the changelog command 240 * @throws ScmException if any 241 * @deprecated use {@link #changeLog(org.apache.maven.scm.command.changelog.ChangeLogScmRequest)} instead 242 */ 243 @Deprecated 244 ChangeLogScmResult changeLog( ScmRepository repository, ScmFileSet fileSet, ScmVersion startVersion, 245 ScmVersion endVersion ) 246 throws ScmException; 247 248 /** 249 * Returns the changes that have happend in the source control system between two tags. This can be adding, 250 * removing, updating, ... of files 251 * 252 * @param repository the source control system 253 * @param fileSet the files to know the changes about. Implementations can also give the changes from the 254 * {@link org.apache.maven.scm.ScmFileSet#getBasedir()} downwards. 255 * @param startRevision the start revision 256 * @param endRevision the end revision 257 * @param datePattern the date pattern use in changelog output returned by scm tool 258 * @return TODO 259 * @throws ScmException if any 260 * @deprecated use {@link #changeLog(org.apache.maven.scm.command.changelog.ChangeLogScmRequest)} instead 261 */ 262 @Deprecated 263 ChangeLogScmResult changeLog( ScmRepository repository, ScmFileSet fileSet, ScmVersion startRevision, 264 ScmVersion endRevision, String datePattern ) 265 throws ScmException; 266 267 /** 268 * Save the changes you have done into the repository. This will create a new version of the file or directory in 269 * the repository. 270 * <p> 271 * When the fileSet has no entries, the {@code fileSet.getBasedir()} is recursively committed. When the fileSet 272 * has entries, the commit is non-recursive and only the elements in the fileSet are committed. 273 * 274 * @param repository the source control system 275 * @param fileSet the files to check in (sometimes called commit) 276 * @param message a string that is a comment on the changes that where done 277 * @return a {@link CheckInScmResult} that contains the file paths (relative to {@code fileSet.getBasedir()}) that 278 * have been checked in. 279 * @throws ScmException if any 280 */ 281 CheckInScmResult checkIn( ScmRepository repository, ScmFileSet fileSet, String message ) 282 throws ScmException; 283 284 /** 285 * Save the changes you have done into the repository. This will create a new version of the file or directory in 286 * the repository. 287 * <p> 288 * When the fileSet has no entries, the {@code fileSet.getBasedir()} is recursively committed. When the fileSet 289 * has entries, the commit is non-recursive and only the elements in the fileSet are committed. 290 * 291 * @param repository the source control system 292 * @param fileSet the files to check in (sometimes called commit) 293 * @param revision branch/tag/revision 294 * @param message a string that is a comment on the changes that where done 295 * @return a {@link CheckInScmResult} that contains the file paths (relative to {@code fileSet.getBasedir()}) that 296 * have been checked in. 297 * @throws ScmException if any 298 */ 299 CheckInScmResult checkIn( ScmRepository repository, ScmFileSet fileSet, ScmVersion revision, String message ) 300 throws ScmException; 301 302 /** 303 * Create a copy of the repository on your local machine 304 * 305 * @param repository the source control system 306 * @param fileSet the files are copied to the {@link org.apache.maven.scm.ScmFileSet#getBasedir()} location 307 * @return TODO 308 * @throws ScmException if any 309 */ 310 CheckOutScmResult checkOut( ScmRepository repository, ScmFileSet fileSet ) 311 throws ScmException; 312 313 /** 314 * Create a copy of the repository on your local machine 315 * 316 * @param repository the source control system 317 * @param fileSet the files are copied to the {@link org.apache.maven.scm.ScmFileSet#getBasedir()} location 318 * @param version get the version defined by the revision, branch or tag 319 * @return TODO 320 * @throws ScmException if any 321 */ 322 CheckOutScmResult checkOut( ScmRepository repository, ScmFileSet fileSet, ScmVersion version ) 323 throws ScmException; 324 325 /** 326 * Create a copy of the repository on your local machine. 327 * 328 * @param scmRepository the source control system 329 * @param scmFileSet the files are copied to the {@link org.apache.maven.scm.ScmFileSet#getBasedir()} location 330 * @param recursive whether to check out recursively 331 * @return TODO 332 * @throws ScmException if any 333 */ 334 CheckOutScmResult checkOut( ScmRepository scmRepository, ScmFileSet scmFileSet, boolean recursive ) 335 throws ScmException; 336 337 /** 338 * Create a copy of the repository on your local machine. 339 * 340 * @param scmRepository the source control system 341 * @param scmFileSet the files are copied to the {@link org.apache.maven.scm.ScmFileSet#getBasedir()} location 342 * @param version get the version defined by the revision, branch or tag 343 * @param recursive whether to check out recursively 344 * @return TODO 345 * @throws ScmException if any 346 */ 347 CheckOutScmResult checkOut( ScmRepository scmRepository, ScmFileSet scmFileSet, ScmVersion version, 348 boolean recursive ) 349 throws ScmException; 350 351 /** 352 * Create a diff between two branch/tag/revision. 353 * 354 * @param scmRepository the source control system 355 * @param scmFileSet the files are copied to the {@link org.apache.maven.scm.ScmFileSet#getBasedir()} location 356 * @param startVersion the start branch/tag/revision 357 * @param endVersion the end branch/tag/revision 358 * @return TODO 359 * @throws ScmException if any 360 */ 361 DiffScmResult diff( ScmRepository scmRepository, ScmFileSet scmFileSet, ScmVersion startVersion, 362 ScmVersion endVersion ) 363 throws ScmException; 364 365 /** 366 * Make a file editable. This is used in source control systems where you look at read-only files and you need to 367 * make them not read-only anymore before you can edit them. This can also mean that no other user in the system can 368 * make the file not read-only anymore. 369 * 370 * @param repository the source control system 371 * @param fileSet the files to make editable 372 * @return TODO 373 * @throws ScmException if any 374 */ 375 EditScmResult edit( ScmRepository repository, ScmFileSet fileSet ) 376 throws ScmException; 377 378 /** 379 * Create an exported copy of the repository on your local machine 380 * 381 * @param repository the source control system 382 * @param fileSet the files are copied to the {@link org.apache.maven.scm.ScmFileSet#getBasedir()} location 383 * @return TODO 384 * @throws ScmException if any 385 */ 386 ExportScmResult export( ScmRepository repository, ScmFileSet fileSet ) 387 throws ScmException; 388 389 /** 390 * Create an exported copy of the repository on your local machine 391 * 392 * @param repository the source control system 393 * @param fileSet the files are copied to the {@link org.apache.maven.scm.ScmFileSet#getBasedir()} location 394 * @param version get the version defined by the branch/tag/revision 395 * @return TODO 396 * @throws ScmException if any 397 */ 398 ExportScmResult export( ScmRepository repository, ScmFileSet fileSet, ScmVersion version ) 399 throws ScmException; 400 401 /** 402 * Create an exported copy of the repository on your local machine 403 * 404 * @param repository the source control system 405 * @param fileSet the files are copied to the {@link org.apache.maven.scm.ScmFileSet#getBasedir()} location 406 * @param outputDirectory the directory where the export will be stored 407 * @return TODO 408 * @throws ScmException if any 409 */ 410 ExportScmResult export( ScmRepository repository, ScmFileSet fileSet, String outputDirectory ) 411 throws ScmException; 412 413 /** 414 * Create an exported copy of the repository on your local machine 415 * 416 * @param repository the source control system 417 * @param fileSet the files are copied to the {@link org.apache.maven.scm.ScmFileSet#getBasedir()} location 418 * @param version get the version defined by the branch/tag/revision 419 * @param outputDirectory the directory where the export will be stored 420 * @return TODO 421 * @throws ScmException if any 422 */ 423 ExportScmResult export( ScmRepository repository, ScmFileSet fileSet, ScmVersion version, String outputDirectory ) 424 throws ScmException; 425 426 /** 427 * List each element (files and directories) of <B>fileSet</B> as they exist in the repository. 428 * 429 * @param repository the source control system 430 * @param fileSet the files to list 431 * @param recursive descend recursively 432 * @param version use the version defined by the branch/tag/revision 433 * @return the list of files in the repository 434 * @throws ScmException if any 435 */ 436 ListScmResult list( ScmRepository repository, ScmFileSet fileSet, boolean recursive, ScmVersion version ) 437 throws ScmException; 438 439 /** 440 * Create new directory/directories in the repository. 441 * 442 * @param repository TODO 443 * @param fileSet TODO 444 * @param message TODO 445 * @param createInLocal TODO 446 * @return TODO 447 * @throws ScmException if any 448 */ 449 MkdirScmResult mkdir( ScmRepository repository, ScmFileSet fileSet, String message, boolean createInLocal ) 450 throws ScmException; 451 452 /** 453 * Removes the given files from the source control system 454 * 455 * @param repository the source control system 456 * @param fileSet the files to be removed 457 * @param message TODO 458 * @return a {@link RemoveScmResult} that contains the file paths (relative to {@code fileSet.getBasedir()}) that 459 * have been removed 460 * @throws ScmException if any 461 */ 462 RemoveScmResult remove( ScmRepository repository, ScmFileSet fileSet, String message ) 463 throws ScmException; 464 465 /** 466 * Returns the status of the files in the source control system. The state of each file can be one of the 467 * {@link org.apache.maven.scm.ScmFileStatus} flags. 468 * 469 * @param repository the source control system 470 * @param fileSet the files to know the status about. Implementations can also give the changes from the 471 * {@link org.apache.maven.scm.ScmFileSet#getBasedir()} downwards. 472 * @return TODO 473 * @throws ScmException if any 474 */ 475 StatusScmResult status( ScmRepository repository, ScmFileSet fileSet ) 476 throws ScmException; 477 478 /** 479 * Tag (or label in some systems) will tag the source file with a certain tag 480 * 481 * @param repository the source control system 482 * @param fileSet the files to tag. Implementations can also give the changes from the 483 * {@link org.apache.maven.scm.ScmFileSet#getBasedir()} downwards. 484 * @param tagName the tag name to apply to the files 485 * @return TODO 486 * @throws ScmException if any 487 */ 488 TagScmResult tag( ScmRepository repository, ScmFileSet fileSet, String tagName ) 489 throws ScmException; 490 491 /** 492 * Tag (or label in some systems) will tag the source file with a certain tag 493 * 494 * @param repository the source control system 495 * @param fileSet the files to tag. Implementations can also give the changes from the 496 * {@link org.apache.maven.scm.ScmFileSet#getBasedir()} downwards. 497 * @param tagName the tag name to apply to the files 498 * @param message the commit message used for the tag creation 499 * @return TODO 500 * @throws ScmException if any 501 */ 502 TagScmResult tag( ScmRepository repository, ScmFileSet fileSet, String tagName, String message ) 503 throws ScmException; 504 505 /** 506 * Make a file no longer editable. This is the conterpart of 507 * {@link #edit(org.apache.maven.scm.repository.ScmRepository, org.apache.maven.scm.ScmFileSet)}. It makes the file 508 * read-only again. 509 * 510 * @param repository the source control system 511 * @param fileSet the files to make uneditable 512 * @return TODO 513 * @throws ScmException if any 514 */ 515 UnEditScmResult unedit( ScmRepository repository, ScmFileSet fileSet ) 516 throws ScmException; 517 518 /** 519 * Updates the copy on the local machine with the changes in the repository 520 * 521 * @param repository the source control system 522 * @param fileSet location of your local copy 523 * @return TODO 524 * @throws ScmException if any 525 */ 526 UpdateScmResult update( ScmRepository repository, ScmFileSet fileSet ) 527 throws ScmException; 528 529 /** 530 * Updates the copy on the local machine with the changes in the repository 531 * 532 * @param repository the source control system 533 * @param fileSet location of your local copy 534 * @param version use the version defined by the branch/tag/revision 535 * @return TODO 536 * @throws ScmException if any 537 */ 538 UpdateScmResult update( ScmRepository repository, ScmFileSet fileSet, ScmVersion version ) 539 throws ScmException; 540 541 /** 542 * Updates the copy on the local machine with the changes in the repository 543 * 544 * @param repository the source control system 545 * @param fileSet location of your local copy 546 * @param runChangelog Run the changelog command after the update 547 * @return TODO 548 * @throws ScmException if any 549 */ 550 UpdateScmResult update( ScmRepository repository, ScmFileSet fileSet, boolean runChangelog ) 551 throws ScmException; 552 553 /** 554 * Updates the copy on the local machine with the changes in the repository 555 * 556 * @param repository the source control system 557 * @param fileSet location of your local copy 558 * @param version use the version defined by the branch/tag/revision 559 * @param runChangelog Run the changelog command after the update 560 * @return TODO 561 * @throws ScmException if any 562 */ 563 UpdateScmResult update( ScmRepository repository, ScmFileSet fileSet, ScmVersion version, boolean runChangelog ) 564 throws ScmException; 565 566 /** 567 * Updates the copy on the local machine with the changes in the repository 568 * 569 * @param repository the source control system 570 * @param fileSet location of your local copy 571 * @param datePattern the date pattern use in changelog output returned by scm tool 572 * @return TODO 573 * @throws ScmException if any 574 */ 575 UpdateScmResult update( ScmRepository repository, ScmFileSet fileSet, String datePattern ) 576 throws ScmException; 577 578 /** 579 * Updates the copy on the local machine with the changes in the repository 580 * 581 * @param repository the source control system 582 * @param fileSet location of your local copy 583 * @param version use the version defined by the branch/tag/revision 584 * @param datePattern the date pattern use in changelog output returned by scm tool 585 * @return TODO 586 * @throws ScmException if any 587 */ 588 UpdateScmResult update( ScmRepository repository, ScmFileSet fileSet, ScmVersion version, String datePattern ) 589 throws ScmException; 590 591 /** 592 * Updates the copy on the local machine with the changes in the repository 593 * 594 * @param repository the source control system 595 * @param fileSet location of your local copy 596 * @param lastUpdate TODO 597 * @return TODO 598 * @throws ScmException if any 599 */ 600 UpdateScmResult update( ScmRepository repository, ScmFileSet fileSet, Date lastUpdate ) 601 throws ScmException; 602 603 /** 604 * Updates the copy on the local machine with the changes in the repository 605 * 606 * @param repository the source control system 607 * @param fileSet location of your local copy 608 * @param version use the version defined by the branch/tag/revision 609 * @param lastUpdate TODO 610 * @return TODO 611 * @throws ScmException if any 612 */ 613 UpdateScmResult update( ScmRepository repository, ScmFileSet fileSet, ScmVersion version, Date lastUpdate ) 614 throws ScmException; 615 616 /** 617 * Updates the copy on the local machine with the changes in the repository 618 * 619 * @param repository the source control system 620 * @param fileSet location of your local copy 621 * @param lastUpdate Date of last update 622 * @param datePattern the date pattern use in changelog output returned by scm tool 623 * @return TODO 624 * @throws ScmException if any 625 */ 626 UpdateScmResult update( ScmRepository repository, ScmFileSet fileSet, Date lastUpdate, String datePattern ) 627 throws ScmException; 628 629 /** 630 * Updates the copy on the local machine with the changes in the repository 631 * 632 * @param repository the source control system 633 * @param fileSet location of your local copy 634 * @param version use the version defined by the branch/tag/revision 635 * @param lastUpdate Date of last update 636 * @param datePattern the date pattern use in changelog output returned by scm tool 637 * @return TODO 638 * @throws ScmException if any 639 */ 640 UpdateScmResult update( ScmRepository repository, ScmFileSet fileSet, ScmVersion version, Date lastUpdate, 641 String datePattern ) 642 throws ScmException; 643 644 /** 645 * Returns the blame of specified file 646 * 647 * @param repository the source control system 648 * @param fileSet location of your local copy 649 * @param filename file 650 * @return blame for specified file 651 * @throws ScmException if any 652 * @since 1.4 653 */ 654 BlameScmResult blame( ScmRepository repository, ScmFileSet fileSet, String filename ) 655 throws ScmException; 656 657 /** 658 * @param blameScmRequest TODO 659 * @return blame for specified file 660 * @throws ScmException if any 661 * @since 1.4 662 */ 663 BlameScmResult blame( BlameScmRequest blameScmRequest ) 664 throws ScmException; 665 }