Merge "Remove unused "commit message edited" mail sender and template"
diff --git a/Documentation/config-mail.txt b/Documentation/config-mail.txt
index 8d2ec4d..2477843 100644
--- a/Documentation/config-mail.txt
+++ b/Documentation/config-mail.txt
@@ -50,12 +50,6 @@
text that will be appended to emails related to a user submitting comments on
changes. See `ChangeSubject.vm`, `Comment.vm` and `ChangeFooter.vm`.
-=== CommitMessageEdited.vm
-
-The `CommitMessageEdited.vm` template will determine the contents of the email
-related to a user editing the commit message through the Gerrit UI. It is a
-`ChangeEmail`: see `ChangeSubject.vm` and `ChangeFooter.vm`.
-
=== Footer.vm
The `Footer.vm` template will determine the contents of the footer text
diff --git a/gerrit-pgm/src/main/java/com/google/gerrit/pgm/init/SitePathInitializer.java b/gerrit-pgm/src/main/java/com/google/gerrit/pgm/init/SitePathInitializer.java
index 7261c96..82daf81 100644
--- a/gerrit-pgm/src/main/java/com/google/gerrit/pgm/init/SitePathInitializer.java
+++ b/gerrit-pgm/src/main/java/com/google/gerrit/pgm/init/SitePathInitializer.java
@@ -94,7 +94,6 @@
extractMailExample("ChangeSubject.vm");
extractMailExample("Comment.vm");
extractMailExample("CommentFooter.vm");
- extractMailExample("CommitMessageEdited.vm");
extractMailExample("Footer.vm");
extractMailExample("Merged.vm");
extractMailExample("MergeFail.vm");
diff --git a/gerrit-server/src/main/java/com/google/gerrit/server/config/GerritGlobalModule.java b/gerrit-server/src/main/java/com/google/gerrit/server/config/GerritGlobalModule.java
index 9f72f08..e3738c0 100644
--- a/gerrit-server/src/main/java/com/google/gerrit/server/config/GerritGlobalModule.java
+++ b/gerrit-server/src/main/java/com/google/gerrit/server/config/GerritGlobalModule.java
@@ -91,7 +91,6 @@
import com.google.gerrit.server.git.validators.MergeValidators.ProjectConfigValidator;
import com.google.gerrit.server.group.SystemGroupBackend;
import com.google.gerrit.server.mail.AddReviewerSender;
-import com.google.gerrit.server.mail.CommitMessageEditedSender;
import com.google.gerrit.server.mail.CreateChangeSender;
import com.google.gerrit.server.mail.EmailModule;
import com.google.gerrit.server.mail.FromAddressGenerator;
@@ -179,7 +178,6 @@
factory(CapabilityControl.Factory.class);
factory(ChangeData.Factory.class);
factory(ChangeQueryBuilder.Factory.class);
- factory(CommitMessageEditedSender.Factory.class);
factory(CreateChangeSender.Factory.class);
factory(GroupDetailFactory.Factory.class);
factory(GroupInfoCacheFactory.Factory.class);
diff --git a/gerrit-server/src/main/java/com/google/gerrit/server/mail/CommitMessageEditedSender.java b/gerrit-server/src/main/java/com/google/gerrit/server/mail/CommitMessageEditedSender.java
deleted file mode 100644
index e388f16..0000000
--- a/gerrit-server/src/main/java/com/google/gerrit/server/mail/CommitMessageEditedSender.java
+++ /dev/null
@@ -1,36 +0,0 @@
-// Copyright (C) 2012 The Android Open Source Project
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package com.google.gerrit.server.mail;
-
-import com.google.gerrit.common.errors.EmailException;
-import com.google.gerrit.reviewdb.client.Change;
-import com.google.inject.Inject;
-import com.google.inject.assistedinject.Assisted;
-
-public class CommitMessageEditedSender extends ReplacePatchSetSender {
- public static interface Factory {
- CommitMessageEditedSender create(Change change);
- }
-
- @Inject
- public CommitMessageEditedSender(EmailArguments ea, @Assisted Change c) {
- super(ea, c);
- }
-
- @Override
- protected void formatChange() throws EmailException {
- appendText(velocifyFile("CommitMessageEdited.vm"));
- }
-}
diff --git a/gerrit-server/src/main/resources/com/google/gerrit/server/mail/CommitMessageEdited.vm b/gerrit-server/src/main/resources/com/google/gerrit/server/mail/CommitMessageEdited.vm
deleted file mode 100644
index f583101..0000000
--- a/gerrit-server/src/main/resources/com/google/gerrit/server/mail/CommitMessageEdited.vm
+++ /dev/null
@@ -1,54 +0,0 @@
-## Copyright (C) 2012 The Android Open Source Project
-##
-## Licensed under the Apache License, Version 2.0 (the "License");
-## you may not use this file except in compliance with the License.
-## You may obtain a copy of the License at
-##
-## http://www.apache.org/licenses/LICENSE-2.0
-##
-## Unless required by applicable law or agreed to in writing, software
-## distributed under the License is distributed on an "AS IS" BASIS,
-## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-## See the License for the specific language governing permissions and
-## limitations under the License.
-##
-##
-## Template Type:
-## -------------
-## This is a velocity mail template, see: http://velocity.apache.org and the
-## gerrit-docs:config-mail.txt for more info on modifying gerrit mail templates.
-##
-## Template File Names and extensions:
-## ----------------------------------
-## Gerrit will use templates ending in ".vm" but will ignore templates ending
-## in ".vm.example". If a .vm template does not exist, the default internal
-## gerrit template which is the same as the .vm.example will be used. If you
-## want to override the default template, copy the .vm.example file to a .vm
-## file and edit it appropriately.
-##
-## This Template:
-## --------------
-## The CommitMessageUpdated.vm template will determine the contents of the email
-## related to a user editing the commit message for a change through the Gerrit UI.
-## It is a ChangeEmail: see ChangeSubject.vm and ChangeFooter.vm.
-##
-#if($email.reviewerNames)
-Hello $email.joinStrings($email.reviewerNames, ', '),
-
-I'd like you to reexamine a change.#if($email.changeUrl) Please visit
-
- $email.changeUrl
-
-to look at the new patch set with edited commit message (#$patchSet.patchSetId).
-#end
-#else
-$fromName has created a new patch set by editing the commit message in Gerrit (#$patchSet.patchSetId).
-#end
-
-Change subject: $change.subject
-......................................................................
-
-$email.changeDetail
-#if($email.sshHost)
- git pull ssh://$email.sshHost/$projectName $patchSet.refName
-#end