org.eclipse.jgit.api
Class PullCommand

java.lang.Object
  extended by org.eclipse.jgit.api.GitCommand<PullResult>
      extended by org.eclipse.jgit.api.PullCommand
All Implemented Interfaces:
Callable<PullResult>

public class PullCommand
extends GitCommand<PullResult>

The Pull command

See Also:
Git documentation about Pull

Field Summary
 
Fields inherited from class org.eclipse.jgit.api.GitCommand
repo
 
Constructor Summary
protected PullCommand(Repository repo)
           
 
Method Summary
 PullResult call()
          Executes the Pull command with all the options and parameters collected by the setter methods (e.g.
 PullCommand setCredentialsProvider(CredentialsProvider credentialsProvider)
           
 PullCommand setProgressMonitor(ProgressMonitor monitor)
           
 PullCommand setTimeout(int timeout)
           
 
Methods inherited from class org.eclipse.jgit.api.GitCommand
checkCallable, getRepository, setCallable
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PullCommand

protected PullCommand(Repository repo)
Parameters:
repo -
Method Detail

setTimeout

public PullCommand setTimeout(int timeout)
Parameters:
timeout - in seconds
Returns:
this instance

setProgressMonitor

public PullCommand setProgressMonitor(ProgressMonitor monitor)
Parameters:
monitor - a progress monitor
Returns:
this instance

setCredentialsProvider

public PullCommand setCredentialsProvider(CredentialsProvider credentialsProvider)
Parameters:
credentialsProvider - the CredentialsProvider to use
Returns:
this instance

call

public PullResult call()
                throws WrongRepositoryStateException,
                       InvalidConfigurationException,
                       DetachedHeadException,
                       InvalidRemoteException,
                       CanceledException,
                       RefNotFoundException
Executes the Pull command with all the options and parameters collected by the setter methods (e.g. setProgressMonitor(ProgressMonitor)) of this class. Each instance of this class should only be used for one invocation of the command. Don't call this method twice on an instance.

Returns:
the result of the pull
Throws:
WrongRepositoryStateException
InvalidConfigurationException
DetachedHeadException
InvalidRemoteException
CanceledException
RefNotFoundException


Copyright © 2011. All Rights Reserved.