Keep mergeability flag always up to date
The mergeability flag of a change is immediately updated when the change is created or when a new patch set is uploaded. When a branch is updated the mergeability flag is asynchronously updated for all open changes that are destined for that branch. This way the mergeability flag is always up to date. With this the (new) change screen doesn't need to explicitly trigger the update of this flag whenever the screen is loaded. The corresponding call is removed. In a follow-up change we can now display the mergeability flag also in the change tables and user dashboards which wouldn't make sense if the displayed information is outdated. It is important to update the mergeability flag on a branch update in the background since the computation and even the check whether the mergeability flag needs to be recomputed is expensive. Change-Id: Id20e567e5c5d5b3d851ca5cda9bde01ac01c9967 Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
This commit is contained in:

committed by
Shawn Pearce

parent
ca80447775
commit
f8be8fdca6
@@ -25,6 +25,7 @@ import com.google.gerrit.server.GerritPersonIdent;
|
||||
import com.google.gerrit.server.GerritPersonIdentProvider;
|
||||
import com.google.gerrit.server.RemotePeer;
|
||||
import com.google.gerrit.server.cache.h2.DefaultCacheFactory;
|
||||
import com.google.gerrit.server.change.MergeabilityChecksExecutorModule;
|
||||
import com.google.gerrit.server.config.AllProjectsName;
|
||||
import com.google.gerrit.server.config.AllProjectsNameProvider;
|
||||
import com.google.gerrit.server.config.AnonymousCowardName;
|
||||
@@ -155,6 +156,7 @@ public class InMemoryModule extends FactoryModule {
|
||||
install(new DefaultCacheFactory.Module());
|
||||
install(new SmtpEmailSender.Module());
|
||||
install(new SignedTokenEmailTokenVerifier.Module());
|
||||
install(new MergeabilityChecksExecutorModule());
|
||||
|
||||
IndexType indexType = null;
|
||||
try {
|
||||
|
Reference in New Issue
Block a user