class PushProcess
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private PushConnection |
connection
Push operation connection created to perform this operation
|
private java.io.OutputStream |
out
an outputstream to write messages to
|
(package private) static java.lang.String |
PROGRESS_OPENING_CONNECTION
Task name for
ProgressMonitor used during opening connection. |
private java.util.List<java.lang.String> |
pushOptions
A list of option strings associated with this push
|
private java.util.Map<java.lang.String,RemoteRefUpdate> |
toPush
Refs to update on remote side.
|
private Transport |
transport
Transport used to perform this operation.
|
private RevWalk |
walker
Revision walker for checking some updates properties.
|
Constructor and Description |
---|
PushProcess(Transport transport,
java.util.Collection<RemoteRefUpdate> toPush)
Create process for specified transport and refs updates specification.
|
PushProcess(Transport transport,
java.util.Collection<RemoteRefUpdate> toPush,
java.io.OutputStream out)
Create process for specified transport and refs updates specification.
|
Modifier and Type | Method and Description |
---|---|
(package private) PushResult |
execute(ProgressMonitor monitor)
Perform push operation between local and remote repository - set remote
refs appropriately, send needed objects and update local tracking refs.
|
java.util.List<java.lang.String> |
getPushOptions()
Gets the list of option strings associated with this push.
|
private void |
modifyUpdatesForDryRun() |
private java.util.Map<java.lang.String,RemoteRefUpdate> |
prepareRemoteUpdates() |
private java.util.Map<java.lang.String,RemoteRefUpdate> |
rejectAll() |
private void |
updateTrackingRefs() |
static final java.lang.String PROGRESS_OPENING_CONNECTION
ProgressMonitor
used during opening connection.private final Transport transport
private PushConnection connection
private final java.util.Map<java.lang.String,RemoteRefUpdate> toPush
private final RevWalk walker
private final java.io.OutputStream out
private java.util.List<java.lang.String> pushOptions
PushProcess(Transport transport, java.util.Collection<RemoteRefUpdate> toPush) throws TransportException
transport
- transport between remote and local repository, used to create
connection.toPush
- specification of refs updates (and local tracking branches).TransportException
PushProcess(Transport transport, java.util.Collection<RemoteRefUpdate> toPush, java.io.OutputStream out) throws TransportException
transport
- transport between remote and local repository, used to create
connection.toPush
- specification of refs updates (and local tracking branches).out
- OutputStream to write messages toTransportException
PushResult execute(ProgressMonitor monitor) throws NotSupportedException, TransportException
When Transport.isDryRun()
is true, result of this operation is
just estimation of real operation result, no real action is performed.
monitor
- progress monitor used for feedback about operation.NotSupportedException
- when push operation is not supported by provided transport.TransportException
- when some error occurred during operation, like I/O, protocol
error, or local database consistency error.private java.util.Map<java.lang.String,RemoteRefUpdate> prepareRemoteUpdates() throws TransportException
TransportException
private java.util.Map<java.lang.String,RemoteRefUpdate> rejectAll()
private void modifyUpdatesForDryRun()
private void updateTrackingRefs()
public java.util.List<java.lang.String> getPushOptions()