Interface ScmMirrorCommandFactory
public interface ScmMirrorCommandFactory
- Since:
- 4.1
-
Method Summary
Modifier and TypeMethodDescriptionsynchronize
(MirrorSyncCommandParameters parameters, MirrorSyncCallback callback) Creates a command that fetches all branches and tags from the providedremote URL
.updateRefs
(MirrorUpdateRefsCommandParameters parameters) Applies the providedref changes
in the repository.
-
Method Details
-
synchronize
@Nonnull Command<Void> synchronize(@Nonnull MirrorSyncCommandParameters parameters, @Nonnull MirrorSyncCallback callback) Creates a command that fetches all branches and tags from the providedremote URL
. The fetched branches and tags overwrite any local branches and tags, and local branches and tags that are not present in the remote repository are deleted. Starting from 4.11, the command throws anAuthenticationFailedScmException
if the fetch fails because of authentication issues, or aNotAuthorizedScmException
if the fetch fails because of authorization issues.- Parameters:
parameters
- describes what to synchronizecallback
- callback to process synchronization details- Returns:
- the command
-
updateRefs
Applies the providedref changes
in the repository. If one or more of the updates cannot be performed (e.g. the toHash does not exist in the repository or the fromHash does not match the current value in the repository), the command will apply all ref updates that can be safely applied, then throw aMirrorUpdateRefsCommandFailedException
.- Parameters:
parameters
- describes what ref changes to apply- Returns:
- the command
- Since:
- 4.2
-