Class AbstractPullPerformer
- java.lang.Object
-
- com._1c.g5.v8.dt.compare.git.pull.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 referenceprotected String
remote
Git remote nameprotected 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.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract void
onPullFinished(DtPullResult pullResult)
Performs actions needed after the pull operation has been finished.void
perform(org.eclipse.core.runtime.IProgressMonitor monitor)
Performs pull operationprotected abstract void
performMerge(org.eclipse.core.runtime.IProgressMonitor monitor)
Performs merge operation.
-
-
-
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. SeeBranchConfig.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 benull
rebaseMode
- rebase mode to be used after fetching (seeBranchConfig.BranchRebaseMode
), cannot benull
remote
- git remote name, cannot benull
reference
- git reference, cannot benull
-
-
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 benull
- 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 benull
-
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 benull
- Throws:
PullPerformerException
- if an exception occurred while merging
-
-