From 21350471ad8c59941443004315b2cd199fb0d7ce Mon Sep 17 00:00:00 2001 From: Tomas Ljunggren Date: Thu, 12 Apr 2012 13:14:31 +0200 Subject: Integration release of NQt Gerrit 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 --- .../main/java/com/google/gerrit/sshd/commands/StagingApprove.java | 7 ++++--- 1 file 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(), false).call(); + new HashSet(), sendMail).call(); } } -- cgit v1.2.3