| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix tests failing on Windows because Repository instance is created but
not closed on tear down.
Fix repositories closed twice, except in tests that test this behavior
explicitly.
Name the temporary directories the tests run in after the test method;
that makes it easier to figure out in which tests repositories are
closed twice if it should occur again in the future.
Bug: 550111
Change-Id: I9398b58f0f36d2c29236d2a9a8599117d9083980
Signed-off-by: Nail Samatov <sanail@yandex.ru>
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
|
|
|
|
|
|
|
|
|
| |
With eol=native, we expect LF on Unixes, and CR-LF on Windows. One test
didn't account for this and always expected LF, and thus failed on
Windows.
Bug: 550111
Change-Id: I69354ac691c464d1b6003812ddb4510c5ab5e77a
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
|
|
|
|
|
|
|
|
|
|
| |
If the walk is created via ObjectWalk(Repository), it creates a new
ObjectReader. This reader was closed only on dispose(). If such an
ObjectWalk was used in a try-with-resource statement the reader might
not get closed.
Bug: 578458
Change-Id: I1be31829dc466530f23006a53c29b657fd5fb410
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
|
|
|
|
|
|
|
|
| |
Test.txt should not be in the "removed" list if it can't be deleted
but only in the "not deleted" list. The test was wrong.
Bug: 550111
Change-Id: I3ecede4278014c15015c8c24089647fa3db3742f
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
|
|
|
|
|
|
|
|
|
|
|
| |
Some tests checked whether or not a file is executable via
java.io.File.canExecute(). But that always returns true on Windows.
Use FS.DETECTED.canExecute() instead, and guard all such assertions to
run only of file systems that do support the "execute" flag.
Bug: 550111
Change-Id: Iacb9e414b612359fcecb61312c3dfb830801cd36
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The tests assumed that a path like "/tmp" was an absolute path, and
also compared against strings with forward slashes. On Windows, "/tmp"
is not an absolute path and thus resolved against the current directory,
and the separator is a backslash.
Change the tests to use ~/ notation, and test paths resolved against
the (mocked) user home directory. That way, the tests are independent
of the file system used.
Bug: 550111
Change-Id: I1c31608ca83c8d8586256d1586a792e4a33cfaa4
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
|
|
|
|
|
|
|
|
| |
Let's be lenient and accept hunk lines terminated by CR-LF, too, not
just lines terminated by LF.
Bug: 550111
Change-Id: I7f796df666300ab56cc6c07f22eda45fbf4c941e
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
|
|
|
|
|
|
|
|
| |
Explain SSH agent protocols, what transports are available and how to
choose them in ~/.ssh/config. For Windows, add some information on
which commonly used SSH agents can be used.
Change-Id: I0b08a95654fd76643512606edb1ed74d9980aa85
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
|
|
|
|
|
|
| |
Parse the value from the ssh config and if set use it when connecting.
Change-Id: I85b44c9468a5027602375706612c46ea7a99b2bd
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
|
|
|
|
|
|
|
|
|
|
|
|
| |
An SSH agent might contain keys that Apache MINA sshd cannot handle.
Pageant for instance can contain ed448 keys, which are not implemented
in OpenSSH or in Apache MINA sshd.
When an agent delivers such keys, simply skip (and log) them. That way,
we can work with the remaining keys. Otherwise a single unknown key in
the agent would break pubkey authentication.
Change-Id: I3945d932c7e64b628465004cfbaf10f4dc05f3e4
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
|
|
|
|
|
|
|
|
|
|
| |
Add parsing of the config. Implement the SSH agent protocol for adding
a key. In the pubkey authentication, add keys to the agent as soon as
they've been loaded successfully, before even attempting to use them
for authentication. OpenSSH does the same.
Bug: 577052
Change-Id: Id1c08d9676a74652256b22281c2f8fa0b6508fa6
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
|
|
|
|
|
|
|
|
|
| |
OpenSSH has (for legacy reasons?) the option of specifying the default
environment variable directly, instead of using ${SSH_AUTH_SOCK}. Make
sure the plain variable name is not taken as a relative path name.
Bug: 577053
Change-Id: If8f550dffc43887254f71aa0b487c50fa14d0627
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
|
|
|
|
|
|
|
|
|
| |
Win32-OpenSSH uses a named Windows pipe for communication. Implement
a connector for this mechanism using JNA. Choose the appropriate
connector based on the setting of the 'identityAgent' parameter.
Bug: 577053
Change-Id: I205f07fb33654aa18ca5db92706e65544ce38641
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If an SSH agent is used but "IdentitiesOnly yes" is set, only those
keys from the agent that correspond to one of the keys explicitly given
via an IdentityFile directive are to be used.
Implement this by filtering the list of keys obtained from the agent
against the list of IdentityFiles, each entry suffixed with ".pub".
Load the public keys from these files, and ignore all other keys from
the agent. Keys without ".pub" file are also ignored.
Apache MINA sshd has no operation to load only the public key from a
private key file, so we have to rely on *.pub files.
Bug: 577053
Change-Id: I75c2c0b3ce35781c933ec2944bd6da1b94f4caf9
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
|
|
|
|
|
|
|
|
|
| |
Handle the 'none' value, and change the value to select Pageant to
something that looks like an absolute UNC path name to avoid it's
handled as an relative path name.
Bug: 577053
Change-Id: I4ccf047abbc1def50e2782319e4fa7c744069401
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix TransportException occurring when deleting
a branch and push that change to remote repository
if BuiltinLFS is used to work with repository.
When finding LFS pointers in RemoteRepUpdate,
LfsPrePushHook fails to open ObjectReader
with new object id equal to ObjectId.zeroId().
If update is a deleting update (new object id is zero id),
we can assume that this update doesn't contain LFS Pointer
and we can skip step with extracting LFS pointer for that
RemoteRefUpdate.
Bug: 578313
Change-Id: Ic4367978338b8234d39d9af0d9674490f79fc22d
Signed-off-by: Nail Samatov <sanail@yandex.ru>
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Checking the cancelled status and keeping a digest of the written data
is useful for other output streams. e.g. to write commit-graphs.
Pull up that functionality to a superclass, so it can be reused.
Change-Id: I177b50be09c4ea631e7a144cc6127085ec2ca411
Signed-off-by: kylezhao <kylezhao@tencent.com>
|
| |
| |
| |
| |
| |
| |
| | |
In I988f61e34 tools/remote-bazelrc was added, but this resource file
wasn't imported from main resource file workspace/.bazelrc.
Change-Id: Ie0c2f128fbccaa6f9e99ad29a3a76ac294f3cd29
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Enhance cache performance monitoring for large data such as pack and
bitmap indexes. Provide details about what is loaded and evicted from
cache like total number of cache hits, time in cache before eviction.
Add a custom consumer to report loading events and eviction events when
enabled.
Signed-off-by: Alina Djamankulova <adjama@google.com>
Change-Id: I5739325db7ff7ec370e4defd8f7e46f1c3f5d2dd
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The Bazel build can be used with Google's Remote Build Execution.
This needs the following setup steps:
$ gcloud auth application-default login
$ gcloud services enable remotebuildexecution.googleapis.com --project=${PROJECT}
Create a worker pool. The instances should have at least 4 CPUs each
for adequate performance.
$ gcloud alpha remote-build-execution worker-pools create default \
--project=${PROJECT} \
--instance=default_instance \
--worker-count=50 \
--machine-type=e2-standard-4 \
--disk-size=200
To use RBE, execute
$ bazel test --config=remote \
--remote_instance_name=projects/${PROJECT}/instances/default_instance \
//...
Change-Id: I988f61e342dab2136d8752ace945a4ed91a4189a
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Bump Bazel version to release 5.0.0. In this new Bazel release,
--incompatible_use_toolchain_resolution_for_java_rules is flipped, that
means that the build must be adapted to toolchain resolution.
Specification toolchain resolution for java rules is here: [1]. Main
tracking Bazel issue is here: [2].
Given that new Bazel release also added support for remote JDK 17, add
experimental support for building with remote JDK 17 to produce major
byte code version 61.
Test Plan:
To build with remote JDK 11 run:
$ bazel build :all
To build with remote JDK 17 run:
$ bazel build --config java17 :all
[1] https://docs.google.com/document/d/1MVbBxbKVKRJJY7DnkptHpvz7ROhyAYy4a-TZ-n7Q0r4/edit?usp=sharing
[2] https://github.com/bazelbuild/bazel/issues/7849
Change-Id: I8d26dff722c6677ea7642913b61e416b23ea9041
|
| | |
| | |
| | |
| | |
| | |
| | | |
Also remove unused JDK9_JVM_OPTS constant.
Change-Id: I0f45ca8312a2a8c3aee3855e3ef3afa95808b4ad
|
| | |
| | |
| | |
| | | |
Change-Id: I1ff38237058d11a3f61acc881c504382ff4b7e08
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Java 15 is outdated and the recent Bazel releases added support to
JDK 17.
Change-Id: I68c1f5b5132d844f07bfefc22f81ecf0a19df910
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Recent Bazel releases perform Bazel version check, based on
.bazelversion file.
Change-Id: I92d5daaef8ecbd011517d314564c0f5492c8ea75
|
| | |
| | |
| | |
| | | |
Change-Id: I00e4a5e73f530b7ac671d09b9b447bb24d6419fa
|
| | |
| | |
| | |
| | | |
Change-Id: I709a3cd2639e9209b2c92c700e04ab4c90ed0524
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
In upcoming Bazel release 5.0 resource_jars attribute was removed: [1].
Replace resource_jars with runtime_deps as recommended in the release
notes.
[1] https://github.com/bazelbuild/bazel/issues/13221
Change-Id: Iab834d647cf63259ca182adc1f862b6001db0cce
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
and update
- com.google.gson to 2.8.9.v20220111-1409
- org.bouncycastle.bcpg to 1.70.0.v20220105-1522
- org.bouncycastle.bcpkix to 1.70.0.v20220105-1522
- org.bouncycastle.bcprov to 1.70.0.v20220105-1522
- org.bouncycastle.bcutil to 1.70.0.v20220105-1522
Change-Id: I7d9159e0e8524459a11da84cb2db709cb1f0823d
|
| | |
| | |
| | |
| | | |
Change-Id: I90807ef1ae065a8a8559e445c0aa7e2abdd2b9a8
|
| | |
| | |
| | |
| | | |
Change-Id: I7573d8cfd07038bca4a7ed9e122e5dcf666632f8
|
| | |
| | |
| | |
| | | |
Change-Id: If93e0e8769fcbb92befa1f159f48b0ac6b6f3d24
|
| | |
| | |
| | |
| | | |
Change-Id: I42f893c4248d8b00bf4aaf59cd528c43940f99e2
|
| | |
| | |
| | |
| | | |
Change-Id: Ida4721142f49c86aa3f05aeffc6ca0aef40939f9
|
| | |
| | |
| | |
| | | |
Change-Id: I575cd5e1ecd326514a8bb4c36a86a2dc71ba5457
|
|\ \ \
| |_|/
|/| |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
* stable-6.0:
[bazel] Skip ConfigTest#testCommitTemplatePathInHomeDirecory
[errorprone] Fix InfiniteRecursion error in RecordingLogger
[errorprone] Suppress Finally error in ObjectDownloadListener
[errorprone] Fix implicit use of default charset in FileBasedConfigTest
[errorprone] Suppress FutureReturnValueIgnored in FileRepository#autoGc
Change-Id: I08d58c8f3f04e3a920da43b5fb252b1654c2b33c
|
| |\ \
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
* changes:
[bazel] Skip ConfigTest#testCommitTemplatePathInHomeDirecory
[errorprone] Fix InfiniteRecursion error in RecordingLogger
[errorprone] Suppress Finally error in ObjectDownloadListener
[errorprone] Fix implicit use of default charset in FileBasedConfigTest
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Move this test to another class and skip it when running tests with
bazel since the bazel test runner does not allow to create files in the
home directory.
FS#userHome retrieves the home directory on the first call and caches it
for subsequent calls to avoid overhead in case path translation is
required (currently on cygwin). This prevents that the test can mock the
home directory using MockSystemReader like SshTestHarness does.
Change-Id: I6a22f37f4a19eb4b4935509eae508a23e56db7aa
|
| | | |
| | | |
| | | |
| | | | |
Change-Id: I092389e428232a4fe7613d846c288d285ae9102c
|
| | | |
| | | |
| | | |
| | | | |
Change-Id: I20af1d8d931608e93fbc52e127f1b7bafd2f917c
|
| | | |
| | | |
| | | |
| | | | |
Change-Id: I83332efc498a5bce242915a1eec2346e6e1f58fd
|
| |\| |
| | | |
| | | |
| | | | |
FileRepository#autoGc" into stable-6.0
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Ignore the FutureReturnValueIgnored warning for the unused return value
of #gc.
Change-Id: I4e7a2f85d404962c01726f9a1d079fe4a6430a1b
|
|\| | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
* stable-6.0:
UploadPack v2 protocol: Stop negotiation for orphan refs
Complete update to servlet api 4.0.0
Change-Id: I55ab6e8fd4a76e4313e37b12f9fc5d5e4b84a681
|
| |\ \ \
| | |/ /
| |/| |
| | | |
| | | |
| | | |
| | | | |
* stable-5.13:
UploadPack v2 protocol: Stop negotiation for orphan refs
Change-Id: I6a9ed8338ffbf5363e48d640a2c4209e4e503549
|
| | |\ \
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
* stable-5.12:
UploadPack v2 protocol: Stop negotiation for orphan refs
Change-Id: Ib43068c32d9cb8effe4b873396391dc3c9197a6e
|
| | | |\ \
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
* stable-5.11:
UploadPack v2 protocol: Stop negotiation for orphan refs
Change-Id: I5db432bd416cfa8d3dd295bdce63e31d5f160a8a
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
The fetch of a single orphan ref (for example Gerrit meta ref:
refs/changes/21/21/meta) did not stop the negotiation so client
had to advertise all refs. This impacts the fetch performance
on repositories with a large number of refs (for example on
Gerrit repository it takes 20 seconds to fetch meta ref
comparing to 1.2 second to fetch ref with parent).
To avoid this issue UploadPack, used on the server side,
now checks if all `want` refs have parents, if not this
means that client doesn't need any extra objects, hence
the server responds with `ready` and finishes the
negotiation phase.
Bug: 577937
Change-Id: Ia3001b400b415d5cf6aae45e72345ca08d3af058
|