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:
@@ -23,6 +23,7 @@ import com.google.gerrit.reviewdb.ReviewDb;
|
||||
import com.google.gerrit.reviewdb.TrackingId;
|
||||
import com.google.gerrit.server.config.TrackingFooter;
|
||||
import com.google.gerrit.server.config.TrackingFooters;
|
||||
import com.google.gerrit.server.git.MergeOp;
|
||||
import com.google.gerrit.server.git.MergeQueue;
|
||||
import com.google.gwtorm.client.AtomicUpdate;
|
||||
import com.google.gwtorm.client.OrmConcurrencyException;
|
||||
@@ -135,8 +136,8 @@ public class ChangeUtil {
|
||||
db.trackingIds().delete(toDelete);
|
||||
}
|
||||
|
||||
public static void submit(PatchSet.Id patchSetId, IdentifiedUser user, ReviewDb db, MergeQueue merger)
|
||||
throws OrmException {
|
||||
public static void submit(MergeOp.Factory opFactory, PatchSet.Id patchSetId,
|
||||
IdentifiedUser user, ReviewDb db, MergeQueue merger) throws OrmException {
|
||||
final Change.Id changeId = patchSetId.getParentKey();
|
||||
final PatchSetApproval approval = createSubmitApproval(patchSetId, user, db);
|
||||
|
||||
@@ -154,7 +155,7 @@ public class ChangeUtil {
|
||||
});
|
||||
|
||||
if (change.getStatus() == Change.Status.SUBMITTED) {
|
||||
merger.merge(change.getDest());
|
||||
merger.merge(opFactory, change.getDest());
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user