summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomas Ljunggren <tomas.ljunggren@tieto.com>2012-04-12 13:14:31 +0200
committerTomas Ljunggren <tomas.ljunggren@tieto.com>2012-04-12 13:52:03 +0200
commit21350471ad8c59941443004315b2cd199fb0d7ce (patch)
treef06ad8889e576c4e20eea1f62b11891e6d351f04
parentf617a647fbd4222812b99b42d84acf233d4f92b5 (diff)
Integration release of NQt GerritRC-V2.2.1-INT-019BL-QTQAINFRA-408
Fixed JIRA issues: 167 Fixed gerrit email verification link requires insecure login 195 Added support for European style dates 220 Added a check to prevent NumberFormatException 270 Fixed review database update from StagingApprove 335 Fixed automatic update of reviewer list 340 Don't send excess emails on integration success 347 Fixed late removal of review approvals 348 Fixed cherry pick footer settings 350 Consider sanity review column 352 Fix typo in project config's topic review checkbox label 355 Hide review panel also on diff and topic pages 357 Add support for public anonymous access to gerrit 366 Improved code to get TopicScreen 372 Validate topic current change set 375 Topic permalink copy to clipboard corrected 381 Do not permit trailing slash when pushing 382 Added a check to prevent NullPointerException Added a check to prevent ArrayIndexOutOfBoundsException 385 Keep highlight on review request 389 Set patch approval changeOpen to false 411 Updated to use current patch id in loadFileList method. 456 Remove leading and trailing whitespace in username when creating a request 462 Updated for eclipse 3.7, m2e and fixed the full name of the MAVEN2_CLASSPATH_CONTAINER 468 Fixed the Review score put on wrong change Change-Id: I718a8ad2b12690005f77fd98030ff01f0f96db1a
-rw-r--r--gerrit-sshd/src/main/java/com/google/gerrit/sshd/commands/StagingApprove.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/gerrit-sshd/src/main/java/com/google/gerrit/sshd/commands/StagingApprove.java b/gerrit-sshd/src/main/java/com/google/gerrit/sshd/commands/StagingApprove.java
index c0830c27c7..1beefb0bab 100644
--- a/gerrit-sshd/src/main/java/com/google/gerrit/sshd/commands/StagingApprove.java
+++ b/gerrit-sshd/src/main/java/com/google/gerrit/sshd/commands/StagingApprove.java
@@ -243,7 +243,8 @@ public class StagingApprove extends BaseCommand {
// Iterate through each open change and publish message.
for (PatchSet patchSet : toApprove) {
final PatchSet.Id patchSetId = patchSet.getId();
- publishMessage(patchSetId);
+ // Publish message but only send mail if not passed
+ publishMessage(patchSetId, !passed);
if (passed) {
// Set change status to merged.
@@ -340,12 +341,12 @@ public class StagingApprove extends BaseCommand {
}
}
- private void publishMessage(final PatchSet.Id patchSetId)
+ private void publishMessage(final PatchSet.Id patchSetId, final boolean sendMail)
throws NoSuchChangeException, OrmException, NoSuchRefException,
IOException, InvalidChangeOperationException {
if (message != null && message.length() > 0) {
publishCommentsFactory.create(patchSetId, message,
- new HashSet<ApprovalCategoryValue.Id>(), false).call();
+ new HashSet<ApprovalCategoryValue.Id>(), sendMail).call();
}
}