Class AbstractPullPerformer


  • public abstract class AbstractPullPerformer
    extends Object
    Class which performs pull operation using the EDT comparison and merge mechanism
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected org.eclipse.jgit.transport.FetchResult fetchResult
      Result of the peformed fetch command.
      protected org.eclipse.jgit.lib.BranchConfig.BranchRebaseMode rebaseMode
      Is used to determine which command should be used after fetching: either merge or one of rebase variations.
      protected String reference
      Git reference
      protected String remote
      Git remote name
      protected org.eclipse.jgit.lib.Repository repository
      Git repository to work with
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected AbstractPullPerformer​(org.eclipse.jgit.lib.Repository repository, org.eclipse.jgit.lib.BranchConfig.BranchRebaseMode rebaseMode, String remote, String reference)
      Creates a new instance with the given parameters.
    • Field Detail

      • repository

        protected final org.eclipse.jgit.lib.Repository repository
        Git repository to work with
      • remote

        protected final String remote
        Git remote name
      • reference

        protected final String reference
        Git reference
      • rebaseMode

        protected final org.eclipse.jgit.lib.BranchConfig.BranchRebaseMode rebaseMode
        Is used to determine which command should be used after fetching: either merge or one of rebase variations. See BranchConfig.BranchRebaseMode
      • fetchResult

        protected org.eclipse.jgit.transport.FetchResult fetchResult
        Result of the peformed fetch command.
    • Constructor Detail

      • AbstractPullPerformer

        protected AbstractPullPerformer​(org.eclipse.jgit.lib.Repository repository,
                                        org.eclipse.jgit.lib.BranchConfig.BranchRebaseMode rebaseMode,
                                        String remote,
                                        String reference)
        Creates a new instance with the given parameters.
        Parameters:
        repository - the Git repository to run pull on, cannot be null
        rebaseMode - rebase mode to be used after fetching (see BranchConfig.BranchRebaseMode), cannot be null
        remote - git remote name, cannot be null
        reference - git reference, cannot be null
    • Method Detail

      • perform

        public void perform​(org.eclipse.core.runtime.IProgressMonitor monitor)
                     throws PullPerformerException
        Performs pull operation
        Parameters:
        monitor - the progress monitor to indicate progress, may be null
        Throws:
        PullPerformerException - if an exception occurred while pulling from the repository
      • onPullFinished

        protected abstract void onPullFinished​(DtPullResult pullResult)
        Performs actions needed after the pull operation has been finished.
        Parameters:
        pullResult - encapsulates the result of the pull operation performed, cannot be null
      • performMerge

        protected abstract void performMerge​(org.eclipse.core.runtime.IProgressMonitor monitor)
                                      throws PullPerformerException
        Performs merge operation.
        Parameters:
        monitor - the progress monitor to indicate progress, may be null
        Throws:
        PullPerformerException - if an exception occurred while merging