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