Package com.google.gerrit.server.update
Interface RepoContext
-
- All Superinterfaces:
Context
public interface RepoContext extends Context
Context for performing theRepoOnlyOp.updateRepo(com.google.gerrit.server.update.RepoContext)phase.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default voidaddRefUpdate(org.eclipse.jgit.lib.ObjectId oldId, org.eclipse.jgit.lib.ObjectId newId, String refName)Add a command to the pending list of commands.voidaddRefUpdate(org.eclipse.jgit.transport.ReceiveCommand cmd)Add a command to the pending list of commands.org.eclipse.jgit.lib.ObjectInsertergetInserter()-
Methods inherited from interface com.google.gerrit.server.update.Context
getAccount, getAccountId, getIdentifiedUser, getNotify, getProject, getRepoView, getRevWalk, getTimeZone, getUser, getWhen
-
-
-
-
Method Detail
-
getInserter
org.eclipse.jgit.lib.ObjectInserter getInserter() throws IOException- Returns:
- inserter for writing to the repo. Callers should not flush; the walk returned by
Context.getRevWalk()is able to read back objects inserted by this inserter without flushing first. - Throws:
IOException- if an error occurred opening the repo.
-
addRefUpdate
void addRefUpdate(org.eclipse.jgit.transport.ReceiveCommand cmd) throws IOExceptionAdd a command to the pending list of commands.Adding commands to the
RepoContextis the only way of updating refs in the repository from aBatchUpdateOp.- Parameters:
cmd- ref update command.- Throws:
IOException- if an error occurred opening the repo.
-
addRefUpdate
default void addRefUpdate(org.eclipse.jgit.lib.ObjectId oldId, org.eclipse.jgit.lib.ObjectId newId, String refName) throws IOExceptionAdd a command to the pending list of commands.Adding commands to the
RepoContextis the only way of updating refs in the repository from aBatchUpdateOp.- Parameters:
oldId- the old object ID; must not be null. UseObjectId.zeroId()for ref creation.newId- the new object ID; must not be null. UseObjectId.zeroId()for ref deletion.refName- the ref name.- Throws:
IOException- if an error occurred opening the repo.
-
-