Package com.google.gerrit.server.fixes
Class FixReplacementInterpreter
java.lang.Object
com.google.gerrit.server.fixes.FixReplacementInterpreter
An interpreter for
FixReplacement
s.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiontoCommitModification
(org.eclipse.jgit.lib.Repository repository, ProjectState projectState, org.eclipse.jgit.lib.ObjectId patchSetCommitId, List<FixReplacement> fixReplacements) Transforms the givenFixReplacement
s intoTreeModification
s.
-
Constructor Details
-
FixReplacementInterpreter
-
-
Method Details
-
toCommitModification
public CommitModification toCommitModification(org.eclipse.jgit.lib.Repository repository, ProjectState projectState, org.eclipse.jgit.lib.ObjectId patchSetCommitId, List<FixReplacement> fixReplacements) throws BadRequestException, ResourceNotFoundException, IOException, ResourceConflictException Transforms the givenFixReplacement
s intoTreeModification
s.- Parameters:
repository
- the affected Git repositoryprojectState
- the affected projectpatchSetCommitId
- the patch set which should be modifiedfixReplacements
- the replacements which should be applied- Returns:
- a list of
TreeModification
s representing the given replacements - Throws:
ResourceNotFoundException
- if a file to which one of the replacements refers doesn't existResourceConflictException
- if the replacements can't be transformed intoTreeModification
sBadRequestException
IOException
-