Allow watching specific branches or any other search query
Any valid search string is now a valid filter expression or a watched project. The only operator not supported here is the is:watched operator, because that creates a recursive call that would never succeed. The change turned out far bigger than it should be due to the request scope requirement for the query builder. We had to rearrange a lot of code to ensure we always have the request scope available in order to construct a query builder and execute the filter expressions. Bug: issue 492 Change-Id: I199d9b215e000c049279cd8e86e7a36386fee0fb Signed-off-by: Shawn O. Pearce <sop@google.com>
This commit is contained in:
@@ -17,7 +17,6 @@ package com.google.gerrit.server.mail;
|
||||
import com.google.gerrit.reviewdb.Account;
|
||||
import com.google.gerrit.reviewdb.Change;
|
||||
import com.google.gerrit.server.ssh.SshInfo;
|
||||
import com.google.inject.Inject;
|
||||
|
||||
import com.jcraft.jsch.HostKey;
|
||||
|
||||
@@ -29,14 +28,13 @@ import java.util.Set;
|
||||
|
||||
/** Sends an email alerting a user to a new change for them to review. */
|
||||
public abstract class NewChangeSender extends OutgoingEmail {
|
||||
@Inject
|
||||
private SshInfo sshInfo;
|
||||
|
||||
private final SshInfo sshInfo;
|
||||
private final Set<Account.Id> reviewers = new HashSet<Account.Id>();
|
||||
private final Set<Account.Id> extraCC = new HashSet<Account.Id>();
|
||||
|
||||
protected NewChangeSender(Change c) {
|
||||
super(c, "newchange");
|
||||
protected NewChangeSender(EmailArguments ea, SshInfo sshInfo, Change c) {
|
||||
super(ea, c, "newchange");
|
||||
this.sshInfo = sshInfo;
|
||||
}
|
||||
|
||||
public void addReviewers(final Collection<Account.Id> cc) {
|
||||
|
||||
Reference in New Issue
Block a user