|
|
@ -58,11 +58,6 @@ import org.eclipse.jgit.lib.ObjectId; |
|
|
|
public interface PreUploadHook { |
|
|
|
public interface PreUploadHook { |
|
|
|
/** A simple no-op hook. */ |
|
|
|
/** A simple no-op hook. */ |
|
|
|
public static final PreUploadHook NULL = new PreUploadHook() { |
|
|
|
public static final PreUploadHook NULL = new PreUploadHook() { |
|
|
|
public void onPreAdvertiseRefs(UploadPack up) |
|
|
|
|
|
|
|
throws ServiceMayNotContinueException { |
|
|
|
|
|
|
|
// Do nothing.
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public void onBeginNegotiateRound(UploadPack up, |
|
|
|
public void onBeginNegotiateRound(UploadPack up, |
|
|
|
Collection<? extends ObjectId> wants, int cntOffered) |
|
|
|
Collection<? extends ObjectId> wants, int cntOffered) |
|
|
|
throws ServiceMayNotContinueException { |
|
|
|
throws ServiceMayNotContinueException { |
|
|
@ -84,21 +79,6 @@ public interface PreUploadHook { |
|
|
|
} |
|
|
|
} |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* Invoked just before {@link UploadPack#sendAdvertisedRefs(RefAdvertiser)}. |
|
|
|
|
|
|
|
* <p> |
|
|
|
|
|
|
|
* New code should prefer implementing |
|
|
|
|
|
|
|
* {@link AdvertiseRefsHook#advertiseRefs(UploadPack)}, which is more powerful |
|
|
|
|
|
|
|
* and may replace this method in the future. |
|
|
|
|
|
|
|
* |
|
|
|
|
|
|
|
* @param up |
|
|
|
|
|
|
|
* the upload pack instance handling the connection. |
|
|
|
|
|
|
|
* @throws ServiceMayNotContinueException |
|
|
|
|
|
|
|
* abort; the message will be sent to the user. |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
public void onPreAdvertiseRefs(UploadPack up) |
|
|
|
|
|
|
|
throws ServiceMayNotContinueException; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* Invoked before negotiation round is started. |
|
|
|
* Invoked before negotiation round is started. |
|
|
|
* |
|
|
|
* |
|
|
|