Merge branch 'stable-2.14' into stable-2.15
* stable-2.14:
Display Used Permits in addition to permits available
Add readable text to the limit type
Change-Id: Id93f79428dd4ed6ab9169cfd6c0f415d72c2b305
diff --git a/WORKSPACE b/WORKSPACE
index db29b00..3359311 100644
--- a/WORKSPACE
+++ b/WORKSPACE
@@ -3,7 +3,7 @@
load("//:bazlets.bzl", "load_bazlets")
load_bazlets(
- commit = "78c35a7eb33ee5ea0980923e246c7dba37347193",
+ commit = "9af263722b7eafe99af079d6ef7cf1de23e6f8d7",
#local_path = "/home/<user>/projects/bazlets",
)
diff --git a/external_plugin_deps.bzl b/external_plugin_deps.bzl
index aa72198..151b2fb 100644
--- a/external_plugin_deps.bzl
+++ b/external_plugin_deps.bzl
@@ -3,8 +3,8 @@
def external_plugin_deps():
maven_jar(
name = "mockito",
- artifact = "org.mockito:mockito-core:2.27.0",
- sha1 = "835fc3283b481f4758b8ef464cd560c649c08b00",
+ artifact = "org.mockito:mockito-core:2.28.2",
+ sha1 = "91110215a8cb9b77a46e045ee758f77d79167cc0",
deps = [
"@byte-buddy//jar",
"@objenesis//jar",
diff --git a/src/main/java/com/googlesource/gerrit/plugins/ratelimiter/ListCommand.java b/src/main/java/com/googlesource/gerrit/plugins/ratelimiter/ListCommand.java
index 3971039..e31d9bc 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/ratelimiter/ListCommand.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/ratelimiter/ListCommand.java
@@ -1,3 +1,30 @@
+// Copyright (C) 2017 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.googlesource.gerrit.plugins.ratelimiter;
+import static com.google.gerrit.sshd.CommandMetaData.Mode.MASTER_OR_SLAVE;
+import static com.googlesource.gerrit.plugins.ratelimiter.Module.UPLOAD_PACK_PER_HOUR;
+import com.google.common.cache.LoadingCache;
+import com.google.gerrit.common.data.GlobalCapability;
+import com.google.gerrit.extensions.annotations.RequiresCapability;
+import com.google.gerrit.sshd.AdminHighPriorityCommand;
+import com.google.gerrit.sshd.CommandMetaData;
+import com.google.gerrit.sshd.SshCommand;
+import com.google.inject.Inject;
+import com.google.inject.name.Named;
+import java.time.Duration;
+import java.util.Map;
+import java.util.Map.Entry;
import java.util.Optional;
import java.util.concurrent.TimeUnit;
@AdminHighPriorityCommand
@@ -18,6 +45,9 @@
UserResolver userResolver) {
this.uploadPackPerHour = uploadPackPerHour;
this.userResolver = userResolver;
+ }
+ @Override
+ protected void run() throws UnloggedFailure {
try {
stdout.println(DASHED_LINE);
stdout.println("* " + UPLOAD_PACK_PER_HOUR + " *");