public abstract class AbstractAdvertiseRefsHook extends Object implements AdvertiseRefsHook
AdvertiseRefsHook that advertises the same refs for
upload-pack and receive-pack.DEFAULT| Constructor and Description |
|---|
AbstractAdvertiseRefsHook() |
| Modifier and Type | Method and Description |
|---|---|
void |
advertiseRefs(BaseReceivePack receivePack)
Advertise refs for receive-pack.
|
void |
advertiseRefs(UploadPack uploadPack)
Advertise refs for upload-pack.
|
protected Set<ObjectId> |
getAdvertisedHaves(Repository repository,
RevWalk revWalk)
Get the additional haves to advertise.
|
protected abstract Map<String,Ref> |
getAdvertisedRefs(Repository repository,
RevWalk revWalk)
Get the refs to advertise.
|
public void advertiseRefs(UploadPack uploadPack) throws ServiceMayNotContinueException
AdvertiseRefsHookadvertiseRefs in interface AdvertiseRefsHookuploadPack - instance on which to call
UploadPack.setAdvertisedRefs(java.util.Map)
if necessary.ServiceMayNotContinueException - abort; the message will be sent to the user.public void advertiseRefs(BaseReceivePack receivePack) throws ServiceMayNotContinueException
AdvertiseRefsHookadvertiseRefs in interface AdvertiseRefsHookreceivePack - instance on which to call
BaseReceivePack.setAdvertisedRefs(java.util.Map,java.util.Set)
if necessary.ServiceMayNotContinueException - abort; the message will be sent to the user.protected abstract Map<String,Ref> getAdvertisedRefs(Repository repository, RevWalk revWalk) throws ServiceMayNotContinueException
repository - repository instance.revWalk - open rev walk on the repository.ServiceMayNotContinueException - abort; the message will be sent to the user.protected Set<ObjectId> getAdvertisedHaves(Repository repository, RevWalk revWalk) throws ServiceMayNotContinueException
repository - repository instance.revWalk - open rev walk on the repository.BaseReceivePack.getAdvertisedObjects().ServiceMayNotContinueException - abort; the message will be sent to the user.Copyright © 2014. All rights reserved.