Merge branch 'stable-3.0' into stable-3.1

* stable-3.0:
  Update codemirror-editor
  Update git submodules
  Bazel: Fix plugin api javadoc generation
  Update git submodules
  Update git submodules
  Update git submodules
  Update git submodules
  ElasticContainer: Upgrade V6_8 to elasticsearch 6.8.7
  Add new prolog fact to documentation
  Add prolog predicate to determine number of parents

Change-Id: Ic8b28c079a74483242f9880839f6062ee02cabfa
This commit is contained in:
David Pursehouse 2020-03-16 09:44:23 +09:00
commit fbdf9c1ae9
9 changed files with 61 additions and 7 deletions

View File

@ -48,6 +48,9 @@ of them we must use a qualified name like `gerrit:change_branch(X)`.
|`commit_message/1` |`commit_message('Fix bug X').`
|Commit message as string atom
|`commit_parent_count/1` |`commit_parent_count(1).`
|Number of parent commits of a commit. Can be used to detect merge commits
|`commit_stats/3` |`commit_stats(5,20,50).`
|Number of files modified, number of insertions and the number of deletions.

View File

@ -0,0 +1,51 @@
// Copyright (C) 2020 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 gerrit;
import com.google.gerrit.server.rules.StoredValues;
import com.googlecode.prolog_cafe.exceptions.PrologException;
import com.googlecode.prolog_cafe.lang.IntegerTerm;
import com.googlecode.prolog_cafe.lang.Operation;
import com.googlecode.prolog_cafe.lang.Predicate;
import com.googlecode.prolog_cafe.lang.Prolog;
import com.googlecode.prolog_cafe.lang.Term;
import org.eclipse.jgit.revwalk.RevCommit;
/**
* Prolog fact for the number of parents of a given commit
*
* <pre>
* 'commit_parent_count'(-Count)
* </pre>
*/
public class PRED_commit_parent_count_1 extends Predicate.P1 {
public PRED_commit_parent_count_1(Term a1, Operation n) {
arg1 = a1;
cont = n;
}
@Override
public Operation exec(Prolog engine) throws PrologException {
engine.setB0();
Term a1 = arg1.dereference();
RevCommit commit = StoredValues.COMMIT.get(engine);
if (!a1.unify(new IntegerTerm(commit.getParentCount()), engine.trail)) {
return engine.fail();
}
return cont;
}
}

View File

@ -53,7 +53,7 @@ public class ElasticContainer extends ElasticsearchContainer {
case V6_7:
return "blacktop/elasticsearch:6.7.2";
case V6_8:
return "blacktop/elasticsearch:6.8.6";
return "blacktop/elasticsearch:6.8.7";
case V7_0:
return "blacktop/elasticsearch:7.0.1";
case V7_1:

@ -1 +1 @@
Subproject commit 92ce310ecf717133601b9e824c38bc5e5eafecba
Subproject commit 59942b1adf1c949f3633f60ac42f67fae03b3255

@ -1 +1 @@
Subproject commit 0ae632098fec9d60932e53a8816ae434f28bc59f
Subproject commit 4e74ff291292ea3416802c532a1b9a3c54026ae9

@ -1 +1 @@
Subproject commit 0912a48d51981d86e7912c8d682ce75d62afb81d
Subproject commit 676a6cbb5f43b66d1d8d618a0f32aba09ac827cb

@ -1 +1 @@
Subproject commit 8c28ecec73a4017588ebddb2e869d88fa571fc64
Subproject commit 9d1d158c0f4b48581183b878aebc4bfb61450af3

@ -1 +1 @@
Subproject commit 377fec17d2c0fc71cdfb1d12f502cfa1eba1fbd7
Subproject commit 33eeeb697d6a7bb03eed1b776bea40e26d5df31c

View File

@ -32,7 +32,7 @@ def _impl(ctx):
"export TZ",
"rm -rf %s" % source,
"mkdir %s" % source,
" && ".join(["unzip -qud %s %s" % (source, j.path) for j in source_jars.to_list()]),
" && ".join(["unzip -qoud %s %s" % (source, j.path) for j in source_jars.to_list()]),
"rm -rf %s" % dir,
"mkdir %s" % dir,
" ".join([