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 void
addRefUpdate(org.eclipse.jgit.lib.ObjectId oldId, org.eclipse.jgit.lib.ObjectId newId, String refName)
Add a command to the pending list of commands.void
addRefUpdate(org.eclipse.jgit.transport.ReceiveCommand cmd)
Add a command to the pending list of commands.org.eclipse.jgit.lib.ObjectInserter
getInserter()
Returns inserter for writing to the repo.-
Methods inherited from interface com.google.gerrit.server.update.Context
getAccount, getAccountId, getIdentifiedUser, getNotify, getProject, getRepoView, getRevWalk, getUser, getWhen, getZoneId, newCommitterIdent, newCommitterIdent, newPersonIdent
-
-
-
-
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 byContext.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 IOException
Add a command to the pending list of commands.Adding commands to the
RepoContext
is 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 IOException
Add a command to the pending list of commands.Adding commands to the
RepoContext
is 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.
-
-