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