* {@link #readAdvertisedRefs()} methods in constructor or before any use. They
* should also handle resources releasing in {@link #close()} method if needed.
*/
-abstract class BasePackFetchConnection extends BasePackConnection implements
- FetchConnection {
+public abstract class BasePackFetchConnection extends BasePackConnection
+ implements FetchConnection {
/**
* Maximum number of 'have' lines to send before giving up.
* <p>
private PacketLineOut pckState;
- BasePackFetchConnection(final PackTransport packTransport) {
+ /**
+ * Create a new connection to fetch using the native git transport.
+ *
+ * @param packTransport
+ * the transport.
+ */
+ public BasePackFetchConnection(final PackTransport packTransport) {
super(packTransport);
final FetchConfig cfg = local.getConfig().get(FetchConfig.KEY);
return Collections.<PackLock> emptyList();
}
+ /**
+ * Execute common ancestor negotiation and fetch the objects.
+ *
+ * @param monitor
+ * progress monitor to receive status updates.
+ * @param want
+ * the advertised remote references the caller wants to fetch.
+ * @param have
+ * additional objects to assume that already exist locally. This
+ * will be added to the set of objects reachable from the
+ * destination repository's references.
+ * @throws TransportException
+ * if any exception occurs.
+ */
protected void doFetch(final ProgressMonitor monitor,
final Collection<Ref> want, final Set<ObjectId> have)
throws TransportException {
* {@link #readAdvertisedRefs()} methods in constructor or before any use. They
* should also handle resources releasing in {@link #close()} method if needed.
*/
-class BasePackPushConnection extends BasePackConnection implements
+public abstract class BasePackPushConnection extends BasePackConnection implements
PushConnection {
static final String CAPABILITY_REPORT_STATUS = "report-status";
/** Time in milliseconds spent transferring the pack data. */
private long packTransferTime;
- BasePackPushConnection(final PackTransport packTransport) {
+ /**
+ * Create a new connection to push using the native git transport.
+ *
+ * @param packTransport
+ * the transport.
+ */
+ public BasePackPushConnection(final PackTransport packTransport) {
super(packTransport);
thinPack = transport.isPushThin();
}
return new TransportException(uri, JGitText.get().pushNotPermitted);
}
+ /**
+ * Push one or more objects and update the remote repository.
+ *
+ * @param monitor
+ * progress monitor to receive status updates.
+ * @param refUpdates
+ * update commands to be applied to the remote repository.
+ * @throws TransportException
+ * if any exception occurs.
+ */
protected void doPush(final ProgressMonitor monitor,
final Map<String, RemoteRefUpdate> refUpdates)
throws TransportException {