Merge branch 'stable-3.0' * stable-3.0: Upgrade bazlets to latest stable-2.15 Upgrade bazlets to latest stable-2.14 Change-Id: I05b31e8e4b2dffda59ba5e4b43a00ff152c99150
diff --git a/WORKSPACE b/WORKSPACE index 8988243..1ca201c 100644 --- a/WORKSPACE +++ b/WORKSPACE
@@ -3,27 +3,27 @@ load("//:bazlets.bzl", "load_bazlets") load_bazlets( - commit = "631205bc4f7903d3cf656a844cab2bfd6b03f246", + commit = "1ddb1d6c71b77972a89aa0a717f6250ef256d166", #local_path = "/home/<user>/projects/bazlets", ) # Release Plugin API -load( - "@com_googlesource_gerrit_bazlets//:gerrit_api.bzl", - "gerrit_api", -) - -# Snapshot Plugin API #load( -# "@com_googlesource_gerrit_bazlets//:gerrit_api_maven_local.bzl", -# "gerrit_api_maven_local", +# "@com_googlesource_gerrit_bazlets//:gerrit_api.bzl", +# "gerrit_api", #) +# Snapshot Plugin API +load( + "@com_googlesource_gerrit_bazlets//:gerrit_api_maven_local.bzl", + "gerrit_api_maven_local", +) + # Load release Plugin API -gerrit_api() +#gerrit_api() # Load snapshot Plugin API -#gerrit_api_maven_local() +gerrit_api_maven_local() load(":external_plugin_deps.bzl", "external_plugin_deps")
diff --git a/src/main/java/com/googlesource/gerrit/plugins/lfs/GetLfsGlobalConfig.java b/src/main/java/com/googlesource/gerrit/plugins/lfs/GetLfsGlobalConfig.java index ebbc81c..3f92417 100644 --- a/src/main/java/com/googlesource/gerrit/plugins/lfs/GetLfsGlobalConfig.java +++ b/src/main/java/com/googlesource/gerrit/plugins/lfs/GetLfsGlobalConfig.java
@@ -15,6 +15,7 @@ package com.googlesource.gerrit.plugins.lfs; import com.google.common.collect.Maps; +import com.google.gerrit.extensions.restapi.Response; import com.google.gerrit.extensions.restapi.RestApiException; import com.google.gerrit.extensions.restapi.RestReadView; import com.google.gerrit.server.project.ProjectResource; @@ -35,7 +36,7 @@ } @Override - public LfsGlobalConfigInfo apply(ProjectResource resource) throws RestApiException { + public Response apply(ProjectResource resource) throws RestApiException { adminView.validate(resource); LfsGlobalConfigInfo info = new LfsGlobalConfigInfo(); @@ -56,6 +57,6 @@ info.namespaces.put(section.getNamespace(), sectionInfo); } } - return info; + return Response.ok(info); } }
diff --git a/src/main/java/com/googlesource/gerrit/plugins/lfs/GetLfsProjectConfig.java b/src/main/java/com/googlesource/gerrit/plugins/lfs/GetLfsProjectConfig.java index 07c1d7d..aedfad1 100644 --- a/src/main/java/com/googlesource/gerrit/plugins/lfs/GetLfsProjectConfig.java +++ b/src/main/java/com/googlesource/gerrit/plugins/lfs/GetLfsProjectConfig.java
@@ -14,6 +14,7 @@ package com.googlesource.gerrit.plugins.lfs; +import com.google.gerrit.extensions.restapi.Response; import com.google.gerrit.extensions.restapi.RestApiException; import com.google.gerrit.extensions.restapi.RestReadView; import com.google.gerrit.server.project.ProjectResource; @@ -31,7 +32,7 @@ } @Override - public LfsProjectConfigInfo apply(ProjectResource resource) throws RestApiException { + public Response apply(ProjectResource resource) throws RestApiException { LfsProjectConfigInfo info = new LfsProjectConfigInfo(); LfsProjectConfigSection config = lfsConfigFactory.getProjectsConfig().getForProject(resource.getNameKey()); @@ -41,6 +42,6 @@ info.readOnly = config.isReadOnly(); info.backend = config.getBackend(); } - return info; + return Response.ok(info); } }
diff --git a/src/main/java/com/googlesource/gerrit/plugins/lfs/PutLfsGlobalConfig.java b/src/main/java/com/googlesource/gerrit/plugins/lfs/PutLfsGlobalConfig.java index ea4e44e..1d8e553 100644 --- a/src/main/java/com/googlesource/gerrit/plugins/lfs/PutLfsGlobalConfig.java +++ b/src/main/java/com/googlesource/gerrit/plugins/lfs/PutLfsGlobalConfig.java
@@ -23,6 +23,7 @@ import com.google.gerrit.extensions.annotations.PluginName; import com.google.gerrit.extensions.restapi.ResourceConflictException; import com.google.gerrit.extensions.restapi.ResourceNotFoundException; +import com.google.gerrit.extensions.restapi.Response; import com.google.gerrit.extensions.restapi.RestApiException; import com.google.gerrit.extensions.restapi.RestModifyView; import com.google.gerrit.reviewdb.client.Project; @@ -63,7 +64,7 @@ } @Override - public LfsGlobalConfigInfo apply(ProjectResource resource, LfsGlobalConfigInput input) + public Response apply(ProjectResource resource, LfsGlobalConfigInput input) throws RestApiException { adminView.validate(resource); Project.NameKey projectName = resource.getNameKey();