Merge branch 'stable'
* stable: (30 commits) Clarify the upgrade instructions Draft release notes for 2.1.5 documentation: Document why hook --change-url might be missing documentation: Fix rendering errors in gerrit.config Allow ; and & to seperate parameters in gitweb Include a quick summary of the size of a change in email Display the size of a patch (lines added/removed) Fix clearing of topic during replace Fix inherited Read Access +2 not inheriting Add some basic RefControl tests for delegated ownership Fix branch owner adding exclusive ACL Optimize RegexFilePredicate for common matches Correct copyright headers to AOSP Don't expose /COMMIT_MSG as a modified file in ChangeData Don't enable dk.brics.automaton's optional syntax Fix NPE while matching file:^ pattern on deleted files Fixed unused imports in OutgoingEmail Don't show /COMMIT_MSG in change emails Fix NPE during merge failure on new branch Honor user's syntax coloring preference in unified view ... Conflicts: gerrit-httpd/src/main/java/com/google/gerrit/httpd/rpc/patch/PatchScriptBuilder.java gerrit-server/src/main/java/com/google/gerrit/common/ChangeHookRunner.java gerrit-server/src/main/java/com/google/gerrit/server/mail/ChangeEmail.java gerrit-server/src/main/java/com/google/gerrit/server/mail/CommentSender.java gerrit-server/src/main/java/com/google/gerrit/server/mail/OutgoingEmail.java gerrit-server/src/main/java/com/google/gerrit/server/patch/PatchListCacheImpl.java gerrit-server/src/main/java/com/google/gerrit/server/patch/Text.java Change-Id: I80bfdb55872fa4bdf4f751c337b609e7ec809605
This commit is contained in:
@@ -19,6 +19,7 @@ import com.google.gerrit.reviewdb.AccountGroup;
|
||||
import com.google.gerrit.reviewdb.AccountProjectWatch;
|
||||
import com.google.gerrit.reviewdb.Change;
|
||||
import com.google.gerrit.reviewdb.ChangeMessage;
|
||||
import com.google.gerrit.reviewdb.Patch;
|
||||
import com.google.gerrit.reviewdb.PatchSet;
|
||||
import com.google.gerrit.reviewdb.PatchSetApproval;
|
||||
import com.google.gerrit.reviewdb.PatchSetInfo;
|
||||
@@ -34,6 +35,7 @@ import com.google.gerrit.server.query.change.ChangeData;
|
||||
import com.google.gerrit.server.query.change.ChangeQueryBuilder;
|
||||
import com.google.gwtorm.client.OrmException;
|
||||
|
||||
import java.text.MessageFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.Date;
|
||||
@@ -222,9 +224,20 @@ public abstract class ChangeEmail extends OutgoingEmail {
|
||||
|
||||
if (patchSet != null) {
|
||||
detail.append("---\n");
|
||||
for (PatchListEntry p : getPatchList().getPatches()) {
|
||||
PatchList patchList = getPatchList();
|
||||
for (PatchListEntry p : patchList.getPatches()) {
|
||||
if (Patch.COMMIT_MSG.equals(p.getNewName())) {
|
||||
continue;
|
||||
}
|
||||
detail.append(p.getChangeType().getCode() + " " + p.getNewName() + "\n");
|
||||
}
|
||||
detail.append(MessageFormat.format("" //
|
||||
+ "{0,choice,0#0 files|1#1 file|1<{0} files} changed, " //
|
||||
+ "{1,choice,0#0 insertions|1#1 insertion|1<{1} insertions}(+), " //
|
||||
+ "{2,choice,0#0 deletions|1#1 deletion|1<{2} deletions}(-)" //
|
||||
+ "\n", patchList.getPatches().size() - 1, //
|
||||
patchList.getInsertions(), //
|
||||
patchList.getDeletions()));
|
||||
detail.append("\n");
|
||||
}
|
||||
return detail.toString();
|
||||
|
Reference in New Issue
Block a user