org.eclipse.jgit.transport.PushProcess class, being read-only for
client.
Client can create instances of this class directly, basing on user
specification and advertised refs
(org. or through
org. helper methods. Apply this
specification on remote repository using
org.
method.
| Modifier and Type | Class and Description |
|---|---|
| public static enum | RemoteRefUpdate.
Represent current status of a remote ref update. |
| Modifier and Type | Field and Description |
|---|---|
| private ObjectId | |
| private boolean | |
| private Collection | fetchSpecs
If set, the RemoteRefUpdate is a placeholder for the "matching" RefSpec to be expanded after the advertisements have been received in a push. |
| private final boolean | |
| private final Repository | |
| private RefUpdate | |
| private String | |
| private final ObjectId | |
| private final String | |
| private final String | |
| private RemoteRefUpdate. | |
| private final TrackingRefUpdate |
| Access | Constructor and Description |
|---|---|
| public | RemoteRefUpdate(Repository
local repository to push from. localDb, String source revision - any string resolvable by
srcRef, String org.. This
resolves to the new object that the caller want remote ref to
be after update. Use null or
org. string for
delete request.full name of a remote ref to update, e.g. "refs/heads/master"
(no wildcard, no short name). remoteName, boolean true when caller want remote ref to be updated regardless
whether it is fast-forward update (old object is ancestor of
new object). forceUpdate, String optional full name of a local stored tracking branch, to
update after push, e.g. "refs/remotes/zawir/dirty" (no
wildcard, no short name); null if no local tracking branch
should be updated. localName, ObjectId optional object id that caller is expecting, requiring to be
advertised by remote side before update; update will take
place ONLY if remote side advertise exactly this expected id;
null if caller doesn't care what object id remote side
advertise. Use expectedOldObjectId)org.
when expecting no remote ref with this name.Construct remote ref update request by providing an update specification. |
| public | RemoteRefUpdate(Repository
local repository to push from. localDb, Ref source revision. Use null to delete. srcRef, String full name of a remote ref to update, e.g. "refs/heads/master"
(no wildcard, no short name). remoteName, boolean true when caller want remote ref to be updated regardless
whether it is fast-forward update (old object is ancestor of
new object). forceUpdate, String optional full name of a local stored tracking branch, to
update after push, e.g. "refs/remotes/zawir/dirty" (no
wildcard, no short name); null if no local tracking branch
should be updated. localName, ObjectId optional object id that caller is expecting, requiring to be
advertised by remote side before update; update will take
place ONLY if remote side advertise exactly this expected id;
null if caller doesn't care what object id remote side
advertise. Use expectedOldObjectId)org.
when expecting no remote ref with this name.Construct remote ref update request by providing an update specification. |
| public | RemoteRefUpdate(Repository
local repository to push from. localDb, String source revision to label srcId with. If null srcId.name() will
be used instead. srcRef, ObjectId The new object that the caller wants remote ref to be after
update. Use null or
srcId, String org. for delete
request.full name of a remote ref to update, e.g. "refs/heads/master"
(no wildcard, no short name). remoteName, boolean true when caller want remote ref to be updated regardless
whether it is fast-forward update (old object is ancestor of
new object). forceUpdate, String optional full name of a local stored tracking branch, to
update after push, e.g. "refs/remotes/zawir/dirty" (no
wildcard, no short name); null if no local tracking branch
should be updated. localName, ObjectId optional object id that caller is expecting, requiring to be
advertised by remote side before update; update will take
place ONLY if remote side advertise exactly this expected id;
null if caller doesn't care what object id remote side
advertise. Use expectedOldObjectId)org.
when expecting no remote ref with this name.Construct remote ref update request by providing an update specification. |
| private | RemoteRefUpdate(Repository localDb, String srcRef, ObjectId srcId, String remoteName, boolean forceUpdate, String localName, Collection<RefSpec> fetchSpecs, ObjectId expectedOldObjectId)
|
| public | RemoteRefUpdate(RemoteRefUpdate
configuration base. base, ObjectId new expected object id value. newExpectedOldObjectId)Create a new instance of this object basing on existing instance for configuration. |
| pack-priv | RemoteRefUpdate(Repository
local repository to push from localDb, boolean whether non-fast-forward updates shall be allowed forceUpdate, Collection<RefSpec> The fetch fetchSpecs)RefSpecs to use when this placeholder is
expanded to determine remote tracking branch updatesCreates a "placeholder" update for the "matching" RefSpec ":". |
| Modifier and Type | Method and Description |
|---|---|
| public ObjectId | Returns: expectedOldObjectId required to be advertised by remote side, as set in constructor; may be null.Get expected old object id |
| pack-priv Collection | |
| public String | Returns: message describing reasons of status when needed/possible; may be null.Get message describing reasons of status when needed/possible; may be null. |
| public ObjectId | |
| public String | Returns: name of remote ref to update, as set in constructor.Get name of remote ref to update |
| public String | Returns: source revision as specified by user (in constructor), could be any string parseable byorg.; can be
null if specified that way in constructor - this stands for
delete request.Get source revision as specified by user (in constructor) |
| public RemoteRefUpdate. | Returns: status of remote ref update operation.Get status of remote ref update operation. |
| public TrackingRefUpdate | Returns: local tracking branch update if localName was set in constructor.Get tracking branch update if localName was set in constructor. |
| public boolean | Returns: true if user specified a local tracking branch for remote update; false otherwise.Whether user specified a local tracking branch for remote update |
| public boolean | Returns: true if this update is deleting update; false otherwise.Whether this update is a deleting update |
| public boolean | Returns: true if some object is required to be advertised by remote side, as set in constructor; false otherwise.Whether some object is required to be advertised by remote side, as set in constructor |
| public boolean | Returns: true if update was fast-forward; false otherwise.Check whether update was fast-forward. |
| public boolean | Returns: true if this update is forced regardless of old remote ref object; false otherwise.Whether this update is forced regardless of old remote ref object |
| public boolean | Returns: true if this is a placeholder, false otherwiseTells whether this |
| pack-priv void | |
| pack-priv void | |
| pack-priv void | |
| pack-priv void | |
| public String | |
| protected void | updateTrackingRef(RevWalk
walker used for checking update properties. walk)Update locally stored tracking branch with the new object. |
| expectedOldObjectId | back to summary |
|---|---|
| private ObjectId expectedOldObjectId | |
| fastForward | back to summary |
|---|---|
| private boolean fastForward | |
| fetchSpecs | back to summary |
|---|---|
| private Collection<RefSpec> fetchSpecs If set, the RemoteRefUpdate is a placeholder for the "matching" RefSpec to be expanded after the advertisements have been received in a push. | |
| forceUpdate | back to summary |
|---|---|
| private final boolean forceUpdate | |
| localDb | back to summary |
|---|---|
| private final Repository localDb | |
| localUpdate | back to summary |
|---|---|
| private RefUpdate localUpdate | |
| message | back to summary |
|---|---|
| private String message | |
| newObjectId | back to summary |
|---|---|
| private final ObjectId newObjectId | |
| remoteName | back to summary |
|---|---|
| private final String remoteName | |
| srcRef | back to summary |
|---|---|
| private final String srcRef | |
| status | back to summary |
|---|---|
| private RemoteRefUpdate. | |
| trackingRefUpdate | back to summary |
|---|---|
| private final TrackingRefUpdate trackingRefUpdate | |
| RemoteRefUpdate | back to summary |
|---|---|
| public RemoteRefUpdate(Repository localDb, String srcRef, String remoteName, boolean forceUpdate, String localName, ObjectId expectedOldObjectId) throws IOException Construct remote ref update request by providing an update specification.
Object is created with default
| |
| RemoteRefUpdate | back to summary |
|---|---|
| public RemoteRefUpdate(Repository localDb, Ref srcRef, String remoteName, boolean forceUpdate, String localName, ObjectId expectedOldObjectId) throws IOException Construct remote ref update request by providing an update specification.
Object is created with default
| |
| RemoteRefUpdate | back to summary |
|---|---|
| public RemoteRefUpdate(Repository localDb, String srcRef, ObjectId srcId, String remoteName, boolean forceUpdate, String localName, ObjectId expectedOldObjectId) throws IOException Construct remote ref update request by providing an update specification.
Object is created with default
| |
| RemoteRefUpdate | back to summary |
|---|---|
| private RemoteRefUpdate(Repository localDb, String srcRef, ObjectId srcId, String remoteName, boolean forceUpdate, String localName, Collection<RefSpec> fetchSpecs, ObjectId expectedOldObjectId) throws IOException | |
| RemoteRefUpdate | back to summary |
|---|---|
| public RemoteRefUpdate(RemoteRefUpdate base, ObjectId newExpectedOldObjectId) throws IOException Create a new instance of this object basing on existing instance for
configuration. State (like
| |
| RemoteRefUpdate | back to summary |
|---|---|
| pack-priv RemoteRefUpdate(Repository localDb, boolean forceUpdate, Collection<RefSpec> fetchSpecs) Creates a "placeholder" update for the "matching" RefSpec ":".
| |
| getExpectedOldObjectId | back to summary |
|---|---|
| public ObjectId getExpectedOldObjectId() Get expected old object id
| |
| getFetchSpecs | back to summary |
|---|---|
| pack-priv Collection Retrieves the fetch
| |
| getMessage | back to summary |
|---|---|
| public String getMessage() Get message describing reasons of status when needed/possible; may be null.
| |
| getNewObjectId | back to summary |
|---|---|
| public ObjectId getNewObjectId() Get new object id
| |
| getRemoteName | back to summary |
|---|---|
| public String getRemoteName() Get name of remote ref to update
| |
| getSrcRef | back to summary |
|---|---|
| public String getSrcRef() Get source revision as specified by user (in constructor)
| |
| getStatus | back to summary |
|---|---|
| public RemoteRefUpdate. Get status of remote ref update operation.
| |
| getTrackingRefUpdate | back to summary |
|---|---|
| public TrackingRefUpdate getTrackingRefUpdate() Get tracking branch update if localName was set in constructor.
| |
| hasTrackingRefUpdate | back to summary |
|---|---|
| public boolean hasTrackingRefUpdate() Whether user specified a local tracking branch for remote update
| |
| isDelete | back to summary |
|---|---|
| public boolean isDelete() Whether this update is a deleting update
| |
| isExpectingOldObjectId | back to summary |
|---|---|
| public boolean isExpectingOldObjectId() Whether some object is required to be advertised by remote side, as set in constructor
| |
| isFastForward | back to summary |
|---|---|
| public boolean isFastForward() Check whether update was fast-forward. Note that this result is
meaningful only after successful update (when status is
| |
| isForceUpdate | back to summary |
|---|---|
| public boolean isForceUpdate() Whether this update is forced regardless of old remote ref object
| |
| isMatching | back to summary |
|---|---|
| public boolean isMatching() Tells whether this
| |
| setExpectedOldObjectId | back to summary |
|---|---|
| pack-priv void setExpectedOldObjectId(ObjectId id) | |
| setFastForward | back to summary |
|---|---|
| pack-priv void setFastForward(boolean fastForward) | |
| setMessage | back to summary |
|---|---|
| pack-priv void setMessage(String message) | |
| setStatus | back to summary |
|---|---|
| pack-priv void setStatus(RemoteRefUpdate. | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non-
| |
| updateTrackingRef | back to summary |
|---|---|
| protected void updateTrackingRef(RevWalk walk) throws IOException Update locally stored tracking branch with the new object.
| |
| Modifier and Type | Field and Description |
|---|---|
| public static final RemoteRefUpdate. | AWAITING_REPORT
Push process is awaiting update report from remote repository. |
| public static final RemoteRefUpdate. | NON_EXISTING
Remote ref didn't exist. |
| public static final RemoteRefUpdate. | NOT_ATTEMPTED
Push process hasn't yet attempted to update this ref. |
| public static final RemoteRefUpdate. | OK
Remote ref was successfully updated. |
| public static final RemoteRefUpdate. | REJECTED_NODELETE
Remote ref update was rejected, because remote side doesn't support/allow deleting refs. |
| public static final RemoteRefUpdate. | REJECTED_NONFASTFORWARD
Remote ref update was rejected, as it would cause non fast-forward update. |
| public static final RemoteRefUpdate. | REJECTED_OTHER_REASON
Remote ref update was rejected for other reason, possibly described
in |
| public static final RemoteRefUpdate. | REJECTED_REMOTE_CHANGED
Remote ref update was rejected, because old object id on remote repository wasn't the same as defined expected old object. |
| public static final RemoteRefUpdate. | UP_TO_DATE
Remote ref was up to date, there was no need to update anything. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static RemoteRefUpdate. | |
| public static RemoteRefUpdate. |
| AWAITING_REPORT | back to summary |
|---|---|
| public static final RemoteRefUpdate. Push process is awaiting update report from remote repository. This is a temporary state or state after critical error in push process. | |
| NON_EXISTING | back to summary |
|---|---|
| public static final RemoteRefUpdate. Remote ref didn't exist. Can occur on delete request of a non existing ref. | |
| NOT_ATTEMPTED | back to summary |
|---|---|
| public static final RemoteRefUpdate. Push process hasn't yet attempted to update this ref. This is the default status, prior to push process execution. | |
| OK | back to summary |
|---|---|
| public static final RemoteRefUpdate. Remote ref was successfully updated. | |
| REJECTED_NODELETE | back to summary |
|---|---|
| public static final RemoteRefUpdate. Remote ref update was rejected, because remote side doesn't support/allow deleting refs. | |
| REJECTED_NONFASTFORWARD | back to summary |
|---|---|
| public static final RemoteRefUpdate. Remote ref update was rejected, as it would cause non fast-forward update. | |
| REJECTED_OTHER_REASON | back to summary |
|---|---|
| public static final RemoteRefUpdate. Remote ref update was rejected for other reason, possibly described
in | |
| REJECTED_REMOTE_CHANGED | back to summary |
|---|---|
| public static final RemoteRefUpdate. Remote ref update was rejected, because old object id on remote repository wasn't the same as defined expected old object. | |
| UP_TO_DATE | back to summary |
|---|---|
| public static final RemoteRefUpdate. Remote ref was up to date, there was no need to update anything. | |
| Status | back to summary |
|---|---|
| private Status() | |
| valueOf | back to summary |
|---|---|
| public static RemoteRefUpdate. | |
| values | back to summary |
|---|---|
| public static RemoteRefUpdate. | |