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