Merge branch 'stable-2.14' into stable-2.15
* stable-2.14: setup_gjf.sh: Add support for multiple version Set 2.13.12-SNAPSHOT in pom.xml and plugin documentation Clarify behavior of ownerin: and reviewerin: predicates AbstractElasticIndex: Open XContentBuilder in try-with-resource Docs: Clarify that for external groups the name in GroupInfo can be missing AccountGroupAuditLogScreen: Display group UUID if group name is missing GetAuditLog: Fix NPE if group UUID cannot be resolved Add ProjectCache.remove(Project.NameKey name) method Set version to 2.13.12-SNAPSHOT Change-Id: I0f88a469f021abec24125cbb5c56415a26acb383
This commit is contained in:
@@ -108,7 +108,9 @@ Changes originally submitted by 'USER'. The special case of
|
||||
[[ownerin]]
|
||||
ownerin:'GROUP'::
|
||||
+
|
||||
Changes originally submitted by a user in 'GROUP'.
|
||||
Changes originally submitted by a user in 'GROUP'. When no other index
|
||||
predicate is explicitly added in the query, defaults to only include
|
||||
changes in status 'OPEN'.
|
||||
|
||||
[[query]]
|
||||
query:'NAME'::
|
||||
@@ -137,7 +139,9 @@ Changes that revert the change specified by the numeric 'ID'.
|
||||
[[reviewerin]]
|
||||
reviewerin:'GROUP'::
|
||||
+
|
||||
Changes that have been, or need to be, reviewed by a user in 'GROUP'.
|
||||
Changes that have been, or need to be, reviewed by a user in 'GROUP'. When
|
||||
no other index predicate is explicitly added in the query, defaults to only
|
||||
include changes in status 'OPEN'.
|
||||
|
||||
[[commit]]
|
||||
commit:'SHA1'::
|
||||
|
||||
@@ -157,13 +157,15 @@ abstract class AbstractElasticIndex<K, V> implements Index<K, V> {
|
||||
}
|
||||
|
||||
private String toDoc(V v) throws IOException {
|
||||
XContentBuilder builder = jsonBuilder().startObject();
|
||||
try (XContentBuilder builder = jsonBuilder().startObject()) {
|
||||
for (Values<V> values : schema.buildFields(v)) {
|
||||
String name = values.getField().getName();
|
||||
if (values.getField().isRepeatable()) {
|
||||
builder.field(
|
||||
name,
|
||||
Streams.stream(values.getValues()).filter(e -> shouldAddElement(e)).collect(toList()));
|
||||
Streams.stream(values.getValues())
|
||||
.filter(e -> shouldAddElement(e))
|
||||
.collect(toList()));
|
||||
} else {
|
||||
Object element = Iterables.getOnlyElement(values.getValues(), "");
|
||||
if (shouldAddElement(element)) {
|
||||
@@ -173,4 +175,5 @@ abstract class AbstractElasticIndex<K, V> implements Index<K, V> {
|
||||
}
|
||||
return builder.endObject().string();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -748,6 +748,7 @@ public abstract class AbstractQueryChangesTest extends GerritServerTests {
|
||||
|
||||
assertQuery("ownerin:Administrators", change1);
|
||||
assertQuery("ownerin:\"Registered Users\"", change2, change1);
|
||||
assertQuery("ownerin:\"Registered Users\" project:repo", change3, change2, change1);
|
||||
assertQuery("ownerin:\"Registered Users\" status:merged", change3);
|
||||
}
|
||||
|
||||
@@ -1989,6 +1990,7 @@ public abstract class AbstractQueryChangesTest extends GerritServerTests {
|
||||
gApi.changes().id(change2.getId().get()).current().submit();
|
||||
|
||||
assertQuery("reviewerin:" + group);
|
||||
assertQuery("project:repo reviewerin:" + group, change2);
|
||||
assertQuery("status:merged reviewerin:" + group, change2);
|
||||
}
|
||||
|
||||
|
||||
@@ -17,8 +17,20 @@
|
||||
set -eu
|
||||
|
||||
# Keep this version in sync with dev-contributing.txt.
|
||||
VERSION="1.3"
|
||||
SHA1="a73cfe6f9af01bd6ff150c0b50c9d620400f784c"
|
||||
VERSION=${1:-1.3}
|
||||
|
||||
case "$VERSION" in
|
||||
1.3)
|
||||
SHA1="a73cfe6f9af01bd6ff150c0b50c9d620400f784c"
|
||||
;;
|
||||
1.5)
|
||||
SHA1="b1f79e4d39a3c501f07c0ce7e8b03ac6964ed1f1"
|
||||
;;
|
||||
*)
|
||||
echo "unknown google-java-format version: $VERSION"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
root="$(git rev-parse --show-toplevel)"
|
||||
if [[ -z "$root" ]]; then
|
||||
@@ -33,7 +45,7 @@ name="google-java-format-$VERSION-all-deps.jar"
|
||||
url="https://github.com/google/google-java-format/releases/download/google-java-format-$VERSION/$name"
|
||||
"$root/tools/download_file.py" -o "$dir/$name" -u "$url" -v "$SHA1"
|
||||
|
||||
launcher="$dir/google-java-format"
|
||||
launcher="$dir/google-java-format-$VERSION"
|
||||
cat > "$launcher" <<EOF
|
||||
#!/bin/bash
|
||||
#
|
||||
|
||||
Reference in New Issue
Block a user