Merge "Merge branch 'stable-2.11'"
This commit is contained in:
commit
9e471a9bca
@ -14,9 +14,12 @@ plugin ls - List the installed plugins.
|
||||
List the installed plugins and show their version and status.
|
||||
|
||||
== ACCESS
|
||||
* Caller must be a member of the privileged 'Administrators' group.
|
||||
* The caller must be a member of a group that is granted the
|
||||
link:access-control.html#capability_viewPlugins[View Plugins]
|
||||
capability or the link:access-control.html#capability_administrateServer[
|
||||
Administrate Server] capability.
|
||||
* link:config-gerrit.html#plugins.allowRemoteAdmin[plugins.allowRemoteAdmin]
|
||||
must be enabled in `$site_path/etc/gerrit.config`.
|
||||
must be enabled in `$site_path/etc/gerrit.config`.
|
||||
|
||||
== SCRIPTING
|
||||
This command is intended to be used in scripts.
|
||||
|
@ -388,7 +388,7 @@ public class H2CacheImpl<K, V> extends AbstractLoadingCache<K, V> implements
|
||||
return b;
|
||||
}
|
||||
} catch (SQLException e) {
|
||||
log.warn("Cannot build BloomFilter for " + url, e);
|
||||
log.warn("Cannot build BloomFilter for " + url + ": " + e.getMessage());
|
||||
c = close(c);
|
||||
return null;
|
||||
} finally {
|
||||
|
@ -1128,13 +1128,12 @@ public class ChangeScreen extends Screen {
|
||||
private void renderRevisionInfo(ChangeInfo info,
|
||||
NativeMap<ActionInfo> actionMap) {
|
||||
RevisionInfo revisionInfo = info.revision(revision);
|
||||
boolean current = info.status().isOpen()
|
||||
&& revision.equals(info.current_revision())
|
||||
boolean current = revision.equals(info.current_revision())
|
||||
&& !revisionInfo.is_edit();
|
||||
|
||||
if (revisionInfo.is_edit()) {
|
||||
statusText.setInnerText(Util.C.changeEdit());
|
||||
} else if (!current && info.status() == Change.Status.NEW) {
|
||||
} else if (!current) {
|
||||
statusText.setInnerText(Util.C.notCurrent());
|
||||
labels.setVisible(false);
|
||||
} else {
|
||||
@ -1149,7 +1148,7 @@ public class ChangeScreen extends Screen {
|
||||
}
|
||||
history.set(commentLinkProcessor, replyAction, changeId, info);
|
||||
|
||||
if (current) {
|
||||
if (current && info.status().isOpen()) {
|
||||
quickApprove.set(info, revision, replyAction);
|
||||
loadSubmitType(info.status(), isSubmittable(info));
|
||||
} else {
|
||||
|
@ -50,6 +50,8 @@ class OAuthOverOpenIDLogoutServlet extends HttpLogoutServlet {
|
||||
protected void doLogout(HttpServletRequest req, HttpServletResponse rsp)
|
||||
throws IOException {
|
||||
super.doLogout(req, rsp);
|
||||
oauthSession.get().logout();
|
||||
if (req.getSession(false) != null) {
|
||||
oauthSession.get().logout();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -54,6 +54,7 @@ import com.google.gerrit.server.config.MasterNodeStartup;
|
||||
import com.google.gerrit.server.config.RestCacheAdminModule;
|
||||
import com.google.gerrit.server.contact.ContactStoreModule;
|
||||
import com.google.gerrit.server.contact.HttpContactStoreConnection;
|
||||
import com.google.gerrit.server.git.ChangeCacheImplModule;
|
||||
import com.google.gerrit.server.git.GarbageCollectionModule;
|
||||
import com.google.gerrit.server.git.ReceiveCommitsExecutorModule;
|
||||
import com.google.gerrit.server.git.WorkQueue;
|
||||
@ -324,6 +325,7 @@ public class Daemon extends SiteProgram {
|
||||
modules.add(new DiffExecutorModule());
|
||||
modules.add(new MimeUtil2Module());
|
||||
modules.add(cfgInjector.getInstance(GerritGlobalModule.class));
|
||||
modules.add(new ChangeCacheImplModule(slave));
|
||||
modules.add(new InternalAccountDirectory.Module());
|
||||
modules.add(new DefaultCacheFactory.Module());
|
||||
if (emailModule != null) {
|
||||
|
@ -76,7 +76,6 @@ import com.google.gerrit.server.git.MergeQueue;
|
||||
import com.google.gerrit.server.git.MergeUtil;
|
||||
import com.google.gerrit.server.git.NotesBranchUtil;
|
||||
import com.google.gerrit.server.git.ReceivePackInitializer;
|
||||
import com.google.gerrit.server.git.SearchingChangeCacheImpl;
|
||||
import com.google.gerrit.server.git.TagCache;
|
||||
import com.google.gerrit.server.git.TransferConfig;
|
||||
import com.google.gerrit.server.git.validators.CommitValidationListener;
|
||||
@ -158,7 +157,6 @@ public class GerritGlobalModule extends FactoryModule {
|
||||
install(authModule);
|
||||
install(AccountByEmailCacheImpl.module());
|
||||
install(AccountCacheImpl.module());
|
||||
install(SearchingChangeCacheImpl.module());
|
||||
install(ChangeKindCacheImpl.module());
|
||||
install(ConflictsCacheImpl.module());
|
||||
install(GroupCacheImpl.module());
|
||||
@ -257,7 +255,6 @@ public class GerritGlobalModule extends FactoryModule {
|
||||
DynamicSet.setOf(binder(), ProjectDeletedListener.class);
|
||||
DynamicSet.setOf(binder(), HeadUpdatedListener.class);
|
||||
DynamicSet.setOf(binder(), UsageDataPublishedListener.class);
|
||||
DynamicSet.bind(binder(), GitReferenceUpdatedListener.class).to(SearchingChangeCacheImpl.class);
|
||||
DynamicSet.bind(binder(), GitReferenceUpdatedListener.class).to(ReindexAfterUpdate.class);
|
||||
DynamicSet.bind(binder(), GitReferenceUpdatedListener.class)
|
||||
.to(ProjectConfigEntry.UpdateChecker.class);
|
||||
|
@ -0,0 +1,38 @@
|
||||
// Copyright (C) 2015 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.git;
|
||||
|
||||
import com.google.gerrit.extensions.events.GitReferenceUpdatedListener;
|
||||
import com.google.gerrit.extensions.registration.DynamicSet;
|
||||
import com.google.inject.AbstractModule;
|
||||
|
||||
public class ChangeCacheImplModule extends AbstractModule {
|
||||
private final boolean slave;
|
||||
|
||||
public ChangeCacheImplModule(boolean slave) {
|
||||
this.slave = slave;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void configure() {
|
||||
if (slave) {
|
||||
install(ScanningChangeCacheImpl.module());
|
||||
} else {
|
||||
install(SearchingChangeCacheImpl.module());
|
||||
DynamicSet.bind(binder(), GitReferenceUpdatedListener.class)
|
||||
.to(SearchingChangeCacheImpl.class);
|
||||
}
|
||||
}
|
||||
}
|
@ -48,7 +48,7 @@ import java.util.concurrent.ExecutionException;
|
||||
@Singleton
|
||||
public class ScanningChangeCacheImpl implements ChangeCache {
|
||||
private static final Logger log =
|
||||
LoggerFactory.getLogger(SearchingChangeCacheImpl.class);
|
||||
LoggerFactory.getLogger(ScanningChangeCacheImpl.class);
|
||||
|
||||
public static Module module() {
|
||||
return new CacheModule() {
|
||||
|
@ -191,6 +191,8 @@ public class PutConfig implements RestModifyView<ProjectResource, Input> {
|
||||
throw new ResourceConflictException("Cannot update " + projectName
|
||||
+ ": " + e.getCause().getMessage());
|
||||
} else {
|
||||
log.warn(String.format("Failed to update config of project %s.",
|
||||
projectName), e);
|
||||
throw new ResourceConflictException("Cannot update " + projectName);
|
||||
}
|
||||
}
|
||||
|
@ -39,6 +39,7 @@ import com.google.gerrit.server.config.GerritServerConfig;
|
||||
import com.google.gerrit.server.config.SitePath;
|
||||
import com.google.gerrit.server.config.TrackingFooters;
|
||||
import com.google.gerrit.server.config.TrackingFootersProvider;
|
||||
import com.google.gerrit.server.git.ChangeCacheImplModule;
|
||||
import com.google.gerrit.server.git.EmailReviewCommentsExecutor;
|
||||
import com.google.gerrit.server.git.GarbageCollection;
|
||||
import com.google.gerrit.server.git.GitRepositoryManager;
|
||||
@ -128,6 +129,7 @@ public class InMemoryModule extends FactoryModule {
|
||||
}
|
||||
});
|
||||
install(cfgInjector.getInstance(GerritGlobalModule.class));
|
||||
install(new ChangeCacheImplModule(false));
|
||||
factory(GarbageCollection.Factory.class);
|
||||
|
||||
bindScope(RequestScoped.class, PerThreadRequestScope.REQUEST);
|
||||
|
@ -39,6 +39,7 @@ import com.google.gerrit.server.config.RestCacheAdminModule;
|
||||
import com.google.gerrit.server.config.SitePath;
|
||||
import com.google.gerrit.server.contact.ContactStoreModule;
|
||||
import com.google.gerrit.server.contact.HttpContactStoreConnection;
|
||||
import com.google.gerrit.server.git.ChangeCacheImplModule;
|
||||
import com.google.gerrit.server.git.GarbageCollectionModule;
|
||||
import com.google.gerrit.server.git.LocalDiskRepositoryManager;
|
||||
import com.google.gerrit.server.git.ReceiveCommitsExecutorModule;
|
||||
@ -288,6 +289,7 @@ public class WebAppInitializer extends GuiceServletContextListener
|
||||
modules.add(new DiffExecutorModule());
|
||||
modules.add(new MimeUtil2Module());
|
||||
modules.add(cfgInjector.getInstance(GerritGlobalModule.class));
|
||||
modules.add(new ChangeCacheImplModule(false));
|
||||
modules.add(new InternalAccountDirectory.Module());
|
||||
modules.add(new DefaultCacheFactory.Module());
|
||||
modules.add(new SmtpEmailSender.Module());
|
||||
|
Loading…
Reference in New Issue
Block a user