Package com.google.gerrit.server.patch
Class SubmitWithStickyApprovalDiff
java.lang.Object
com.google.gerrit.server.patch.SubmitWithStickyApprovalDiff
This class is used on submit to compute the diff between the latest approved patch-set, and the
current submitted patch-set.
Latest approved patch-set is defined by the latest patch-set which has Code-Review label voted with the maximum possible value.
If the latest approved patch-set is the same as the submitted patch-set, the diff will be empty.
We exclude the magic files from the returned diff to make it shorter and more concise.
-
Method Summary
Modifier and TypeMethodDescriptioncom.google.common.collect.ImmutableList
<FileDiffOutput> apply
(ChangeNotes notes, CurrentUser currentUser) Returns the list of modified filescomputeDiffFromModifiedFiles
(ChangeNotes notes, CurrentUser currentUser, com.google.common.collect.ImmutableList<FileDiffOutput> modifiedFilesList) getDiffForFile
(PatchScript patchScript, List<String> formatterResult) Show patch set as unified difference for a specific file.
-
Method Details
-
computeDiffFromModifiedFiles
public String computeDiffFromModifiedFiles(ChangeNotes notes, CurrentUser currentUser, com.google.common.collect.ImmutableList<FileDiffOutput> modifiedFilesList) throws AuthException, IOException, PermissionBackendException, InvalidChangeOperationException -
apply
public com.google.common.collect.ImmutableList<FileDiffOutput> apply(ChangeNotes notes, CurrentUser currentUser) throws AuthException, IOException, PermissionBackendException, InvalidChangeOperationException Returns the list of modified files -
getDiffForFile
Show patch set as unified difference for a specific file. We on purpose are not usingDiffInfoCreator
since we'd like to get the original git/JGit style diff.
-