
Computing if a change is a pure revert of another change or commit is an expensive operation as it requires a Git merge. This is especially true for large Git repositories. However, this information is easy to cache in a persistent cache as it can be keyed by the SHA1s of the commits that we want to diff. Given that this computation runs many times if the Prolog fact is used because we freshly compute the submit rules often, this commit builds a persisted cache for it. There are many existing tests that cover the behavior in ChangeIT. This commit adds a serializer for Protobuf to ensure we are not using the default Java serialization as well as a test. Change-Id: Id79e2fb2f6646d8e48fdfc3a3b0bcf03f51b1400
27 lines
868 B
Protocol Buffer
27 lines
868 B
Protocol Buffer
// Copyright (C) 2019 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.
|
|
|
|
syntax = "proto2";
|
|
|
|
package devtools.gerritcodereview.testing;
|
|
|
|
option java_package = "com.google.gerrit.proto.testing";
|
|
|
|
// Test type for ProtobufSerializerTest
|
|
// Next ID: 3
|
|
message SerializableProto {
|
|
required int32 id = 1;
|
|
optional string text = 2;
|
|
}
|