diff --git a/Documentation/dev-crafting-changes.txt b/Documentation/dev-crafting-changes.txt index 5a54c5f2c8..9bc7f0bf40 100644 --- a/Documentation/dev-crafting-changes.txt +++ b/Documentation/dev-crafting-changes.txt @@ -116,7 +116,7 @@ To format Java source code, Gerrit uses the link:https://github.com/google/google-java-format[`google-java-format`,role=external,window=_blank] tool (version 1.7), and to format Bazel BUILD, WORKSPACE and .bzl files the link:https://github.com/bazelbuild/buildtools/tree/master/buildifier[`buildifier`,role=external,window=_blank] -tool (version 3.0.0). Unused dependencies are found and removed using the +tool (version 3.2.1). Unused dependencies are found and removed using the link:https://github.com/bazelbuild/buildtools/tree/master/unused_deps[`unused_deps`,role=external,window=_blank] build tool, a sibling of `buildifier`. diff --git a/java/com/google/gerrit/entities/Patch.java b/java/com/google/gerrit/entities/Patch.java index 3926d4787a..e6b2167cc8 100644 --- a/java/com/google/gerrit/entities/Patch.java +++ b/java/com/google/gerrit/entities/Patch.java @@ -19,6 +19,7 @@ import static com.google.common.base.Preconditions.checkArgument; import com.google.auto.value.AutoValue; import com.google.common.base.Splitter; import com.google.common.primitives.Ints; +import com.google.gerrit.common.UsedAt; import java.util.List; /** @@ -107,6 +108,16 @@ public final class Patch { public char getCode() { return code; } + + @UsedAt(UsedAt.Project.COLLABNET) + public static ChangeType forCode(char c) { + for (ChangeType s : ChangeType.values()) { + if (s.code == c) { + return s; + } + } + return null; + } } /** Type of formatting for this patch. */ diff --git a/java/com/google/gerrit/server/submit/MergeOp.java b/java/com/google/gerrit/server/submit/MergeOp.java index 9018d9db2c..f96b0c5518 100644 --- a/java/com/google/gerrit/server/submit/MergeOp.java +++ b/java/com/google/gerrit/server/submit/MergeOp.java @@ -635,13 +635,13 @@ public class MergeOp implements AutoCloseable { throw e; } - // BatchUpdate may have inadvertently wrapped an IntegrationException + // BatchUpdate may have inadvertently wrapped an IntegrationConflictException // thrown by some legacy SubmitStrategyOp code that intended the error // message to be user-visible. Copy the message from the wrapped // exception. // // If you happen across one of these, the correct fix is to convert the - // inner IntegrationException to a ResourceConflictException. + // inner IntegrationConflictException to a ResourceConflictException. if (e.getCause() instanceof IntegrationConflictException) { throw (IntegrationConflictException) e.getCause(); } diff --git a/tools/bzl/maven_jar.bzl b/tools/bzl/maven_jar.bzl index 2f5447b11e..9908ee8136 100644 --- a/tools/bzl/maven_jar.bzl +++ b/tools/bzl/maven_jar.bzl @@ -189,7 +189,6 @@ maven_jar = repository_rule( "repository": attr.string(default = MAVEN_CENTRAL), "sha1": attr.string(), "src_sha1": attr.string(), - "unsign": attr.bool(default = False), "exports": attr.string_list(), "deps": attr.string_list(), "_download_script": attr.label(default = Label("//tools:download_file.py")),