hgitaly 18.5.2__tar.gz → 18.5.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {hgitaly-18.5.2/hgitaly.egg-info → hgitaly-18.5.4}/PKG-INFO +4 -4
- {hgitaly-18.5.2 → hgitaly-18.5.4}/hgext3rd/hgitaly/__init__.py +14 -1
- hgitaly-18.5.4/hgitaly/VERSION +1 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/hgitaly/identification.py +5 -5
- {hgitaly-18.5.2 → hgitaly-18.5.4}/hgitaly/message.py +2 -1
- {hgitaly-18.5.2 → hgitaly-18.5.4}/hgitaly/service/commit.py +15 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/hgitaly/tests/test_identification.py +4 -2
- {hgitaly-18.5.2 → hgitaly-18.5.4}/hgitaly/tests/test_messages.py +1 -1
- {hgitaly-18.5.2 → hgitaly-18.5.4/hgitaly.egg-info}/PKG-INFO +4 -4
- {hgitaly-18.5.2 → hgitaly-18.5.4}/hgitaly.egg-info/requires.txt +3 -3
- {hgitaly-18.5.2 → hgitaly-18.5.4}/install-requirements.txt +3 -3
- {hgitaly-18.5.2 → hgitaly-18.5.4}/tests_with_gitaly/test_ref.py +1 -4
- hgitaly-18.5.2/hgitaly/VERSION +0 -1
- {hgitaly-18.5.2 → hgitaly-18.5.4}/LICENSE +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/MANIFEST.in +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/README.md +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/hgext3rd/__init__.py +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/hgext3rd/hgitaly/revset.py +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/hgext3rd/hgitaly/tests/__init__.py +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/hgext3rd/hgitaly/tests/test_revset.py +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/hgext3rd/hgitaly/tests/test_serve.py +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/hgitaly/__init__.py +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/hgitaly/branch.py +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/hgitaly/changelog.py +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/hgitaly/diff.py +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/hgitaly/errors.py +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/hgitaly/feature.py +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/hgitaly/file_content.py +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/hgitaly/file_context.py +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/hgitaly/git.py +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/hgitaly/gitlab_ref.py +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/hgitaly/logging.py +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/hgitaly/manifest.py +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/hgitaly/oid.py +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/hgitaly/pagination.py +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/hgitaly/path.py +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/hgitaly/peer.py +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/hgitaly/procutil.py +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/hgitaly/repository.py +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/hgitaly/revision.py +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/hgitaly/revset.py +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/hgitaly/scripts.py +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/hgitaly/server/__init__.py +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/hgitaly/server/address.py +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/hgitaly/server/mono.py +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/hgitaly/server/prefork.py +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/hgitaly/server/tests/__init__.py +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/hgitaly/server/tests/test_address.py +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/hgitaly/server/tests/test_mono.py +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/hgitaly/server/tests/test_prefork.py +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/hgitaly/server/tests/test_worker.py +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/hgitaly/server/worker.py +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/hgitaly/service/__init__.py +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/hgitaly/service/analysis.py +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/hgitaly/service/blob.py +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/hgitaly/service/diff.py +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/hgitaly/service/interceptors.py +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/hgitaly/service/mercurial_changeset.py +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/hgitaly/service/mercurial_namespace.py +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/hgitaly/service/mercurial_operations.py +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/hgitaly/service/mercurial_repository.py +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/hgitaly/service/operations.py +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/hgitaly/service/ref.py +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/hgitaly/service/repository.py +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/hgitaly/service/server.py +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/hgitaly/service/tests/__init__.py +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/hgitaly/service/tests/fixture.py +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/hgitaly/service/tests/test_analysis.py +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/hgitaly/service/tests/test_blob.py +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/hgitaly/service/tests/test_commit.py +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/hgitaly/service/tests/test_default_branch.py +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/hgitaly/service/tests/test_diff.py +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/hgitaly/service/tests/test_mercurial_changeset.py +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/hgitaly/service/tests/test_mercurial_namespace.py +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/hgitaly/service/tests/test_mercurial_operations.py +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/hgitaly/service/tests/test_mercurial_repository.py +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/hgitaly/service/tests/test_operations.py +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/hgitaly/service/tests/test_ref.py +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/hgitaly/service/tests/test_repository_service.py +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/hgitaly/service/tests/test_server.py +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/hgitaly/servicer.py +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/hgitaly/ssh.py +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/hgitaly/stream.py +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/hgitaly/stub/__init__.py +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/hgitaly/stub/analysis_pb2.py +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/hgitaly/stub/analysis_pb2_grpc.py +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/hgitaly/stub/blob_pb2.py +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/hgitaly/stub/blob_pb2_grpc.py +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/hgitaly/stub/commit_pb2.py +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/hgitaly/stub/commit_pb2_grpc.py +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/hgitaly/stub/diff_pb2.py +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/hgitaly/stub/diff_pb2_grpc.py +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/hgitaly/stub/errors_pb2.py +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/hgitaly/stub/errors_pb2_grpc.py +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/hgitaly/stub/lint_pb2.py +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/hgitaly/stub/lint_pb2_grpc.py +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/hgitaly/stub/mercurial_aux_git_pb2.py +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/hgitaly/stub/mercurial_aux_git_pb2_grpc.py +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/hgitaly/stub/mercurial_changeset_pb2.py +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/hgitaly/stub/mercurial_changeset_pb2_grpc.py +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/hgitaly/stub/mercurial_namespace_pb2.py +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/hgitaly/stub/mercurial_namespace_pb2_grpc.py +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/hgitaly/stub/mercurial_operations_pb2.py +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/hgitaly/stub/mercurial_operations_pb2_grpc.py +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/hgitaly/stub/mercurial_repository_pb2.py +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/hgitaly/stub/mercurial_repository_pb2_grpc.py +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/hgitaly/stub/operations_pb2.py +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/hgitaly/stub/operations_pb2_grpc.py +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/hgitaly/stub/ref_pb2.py +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/hgitaly/stub/ref_pb2_grpc.py +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/hgitaly/stub/remote_pb2.py +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/hgitaly/stub/remote_pb2_grpc.py +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/hgitaly/stub/repository_pb2.py +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/hgitaly/stub/repository_pb2_grpc.py +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/hgitaly/stub/server_pb2.py +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/hgitaly/stub/server_pb2_grpc.py +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/hgitaly/stub/shared_pb2.py +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/hgitaly/stub/shared_pb2_grpc.py +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/hgitaly/tag.py +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/hgitaly/testing/__init__.py +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/hgitaly/testing/bundle.py +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/hgitaly/testing/context.py +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/hgitaly/testing/grpc.py +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/hgitaly/testing/multiprocessing.py +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/hgitaly/testing/repo.py +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/hgitaly/testing/ssh.py +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/hgitaly/testing/sshd.py +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/hgitaly/testing/storage.py +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/hgitaly/testing/tests/__init__.py +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/hgitaly/testing/tests/test_sshd.py +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/hgitaly/tests/__init__.py +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/hgitaly/tests/common.py +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/hgitaly/tests/test_branch.py +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/hgitaly/tests/test_diff.py +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/hgitaly/tests/test_errors.py +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/hgitaly/tests/test_feature.py +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/hgitaly/tests/test_file_context.py +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/hgitaly/tests/test_gitlab_ref.py +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/hgitaly/tests/test_manifest.py +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/hgitaly/tests/test_oid.py +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/hgitaly/tests/test_peer.py +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/hgitaly/tests/test_repository.py +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/hgitaly/tests/test_revision.py +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/hgitaly/tests/test_revset.py +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/hgitaly/tests/test_servicer.py +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/hgitaly/tests/test_stream.py +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/hgitaly/tests/test_tag.py +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/hgitaly/tests/test_workdir.py +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/hgitaly/util.py +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/hgitaly/workdir.py +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/hgitaly.egg-info/SOURCES.txt +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/hgitaly.egg-info/dependency_links.txt +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/hgitaly.egg-info/entry_points.txt +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/hgitaly.egg-info/top_level.txt +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/setup.cfg +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/setup.py +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/tests_with_gitaly/__init__.py +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/tests_with_gitaly/comparison.py +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/tests_with_gitaly/conftest.py +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/tests_with_gitaly/gitaly.py +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/tests_with_gitaly/hgitaly_rhgitaly_comparison.py +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/tests_with_gitaly/rhgitaly.py +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/tests_with_gitaly/test_blob_tree.py +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/tests_with_gitaly/test_commit.py +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/tests_with_gitaly/test_comparison.py +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/tests_with_gitaly/test_diff.py +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/tests_with_gitaly/test_gitaly_server.py +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/tests_with_gitaly/test_mercurial_aux_git.py +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/tests_with_gitaly/test_mercurial_operations.py +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/tests_with_gitaly/test_mercurial_repository.py +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/tests_with_gitaly/test_operations.py +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/tests_with_gitaly/test_remote.py +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/tests_with_gitaly/test_repository_service.py +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/tests_with_gitaly/test_rhgitaly_server.py +0 -0
- {hgitaly-18.5.2 → hgitaly-18.5.4}/tests_with_gitaly/test_server.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: hgitaly
|
|
3
|
-
Version: 18.5.
|
|
3
|
+
Version: 18.5.4
|
|
4
4
|
Summary: Server-side implementation of Gitaly protocol for Mercurial
|
|
5
5
|
Home-page: https://foss.heptapod.net/heptapod/hgitaly
|
|
6
6
|
Author: Georges Racinet
|
|
@@ -10,10 +10,10 @@ Keywords: hg mercurial heptapod gitlab
|
|
|
10
10
|
Requires-Python: >=3.8
|
|
11
11
|
Description-Content-Type: text/markdown
|
|
12
12
|
License-File: LICENSE
|
|
13
|
-
Requires-Dist: heptapod
|
|
13
|
+
Requires-Dist: heptapod~=5.4.0
|
|
14
14
|
Requires-Dist: protobuf~=6.31.1
|
|
15
|
-
Requires-Dist: grpcio~=1.
|
|
16
|
-
Requires-Dist: grpcio-status~=1.
|
|
15
|
+
Requires-Dist: grpcio~=1.76.0
|
|
16
|
+
Requires-Dist: grpcio-status~=1.76.0
|
|
17
17
|
Requires-Dist: grpc-interceptor
|
|
18
18
|
Requires-Dist: grpcio-health-checking
|
|
19
19
|
Requires-Dist: hg-loggingmod>=0.4.1
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
# flake8: noqa E402
|
|
9
9
|
import os
|
|
10
|
+
from pathlib import Path
|
|
10
11
|
import time
|
|
11
12
|
from mercurial.i18n import _
|
|
12
13
|
from mercurial import (
|
|
@@ -28,6 +29,9 @@ from hgitaly.server import (
|
|
|
28
29
|
)
|
|
29
30
|
from . import revset
|
|
30
31
|
|
|
32
|
+
DEFAULT_CLIENT_ID_SLUG = b'self-client.uuid'
|
|
33
|
+
|
|
34
|
+
|
|
31
35
|
if util.safehasattr(registrar, 'configitem'):
|
|
32
36
|
|
|
33
37
|
configtable = {}
|
|
@@ -74,6 +78,13 @@ def reraise_abort(msg, exc):
|
|
|
74
78
|
b'No forking occurs, the main process is the single worker. '
|
|
75
79
|
b'In particular the hgitaly.workers configuration item is '
|
|
76
80
|
b'ignored.')),
|
|
81
|
+
(b'', b'client-id-file-name',
|
|
82
|
+
DEFAULT_CLIENT_ID_SLUG,
|
|
83
|
+
_(b'Specify the Client ID file name. This is useful for mono workers '
|
|
84
|
+
b'in externally managed pools (RHGitaly managed sidecar), hence '
|
|
85
|
+
b'having distinct Incarnation IDs, so that they do not steal each other '
|
|
86
|
+
b'working directories.',
|
|
87
|
+
)),
|
|
77
88
|
],
|
|
78
89
|
_(b'[OPTIONS]...'),
|
|
79
90
|
norepo=True
|
|
@@ -111,7 +122,9 @@ def serve(ui, **opts):
|
|
|
111
122
|
))
|
|
112
123
|
config_root = os.fsdecode(ui.config(b'hgitaly', b'configuration-root',
|
|
113
124
|
default=repos_root))
|
|
114
|
-
|
|
125
|
+
client_id_slug = opts.get('client_id_file_name', DEFAULT_CLIENT_ID_SLUG)
|
|
126
|
+
client_id_path = Path(config_root) / '+hgitaly' / os.fsdecode(client_id_slug)
|
|
127
|
+
ensure_client_id(client_id_path)
|
|
115
128
|
nb_workers = ui.configint(b'hgitaly', b'workers')
|
|
116
129
|
run_opts = dict(nb_workers=nb_workers,
|
|
117
130
|
restart_done_workers=True,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
18.5.4
|
|
@@ -20,9 +20,8 @@ restarted since the recording, and thus that the operation is obsolete
|
|
|
20
20
|
killed).
|
|
21
21
|
|
|
22
22
|
An HGitaly server is always consider to be its own client, even if it accesses
|
|
23
|
-
the resources flagged with these IDs in-process
|
|
23
|
+
the resources flagged with these IDs in-process rather than through gRPC.
|
|
24
24
|
"""
|
|
25
|
-
from pathlib import Path
|
|
26
25
|
import time
|
|
27
26
|
import uuid
|
|
28
27
|
|
|
@@ -31,13 +30,14 @@ CLIENT_ID_SLUG = '+hgitaly/self-client.uuid'
|
|
|
31
30
|
CLIENT_ID = None # initialized at startup
|
|
32
31
|
|
|
33
32
|
|
|
34
|
-
def ensure_client_id(
|
|
33
|
+
def ensure_client_id(path):
|
|
35
34
|
"""To be used in startup sequence, before any concurrency is possible."""
|
|
36
35
|
global CLIENT_ID
|
|
37
36
|
|
|
38
|
-
path = Path(config_root) / CLIENT_ID_SLUG
|
|
39
37
|
if path.exists():
|
|
40
|
-
|
|
38
|
+
# chances that anything or anyone creates a non-utf8 Client ID are very
|
|
39
|
+
# slim (and it would be immediately noticed)
|
|
40
|
+
CLIENT_ID = path.read_text(encoding='utf-8').strip()
|
|
41
41
|
return
|
|
42
42
|
|
|
43
43
|
client_id = str(uuid.uuid4())
|
|
@@ -248,8 +248,9 @@ def tag(name, target, tagging=None, signature_type=None):
|
|
|
248
248
|
signature_type = SignatureType.NONE
|
|
249
249
|
|
|
250
250
|
if tagging is None:
|
|
251
|
-
|
|
251
|
+
message = tag_author = None
|
|
252
252
|
message_size = 0
|
|
253
|
+
tag_id = pycompat.sysstr(target.hex())
|
|
253
254
|
else:
|
|
254
255
|
# TODO SPEC comment in `shared.proto` says the message will be
|
|
255
256
|
# nullified if above a certain size and the size will be carried over,
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
# SPDX-License-Identifier: GPL-2.0-or-later
|
|
8
8
|
import itertools
|
|
9
9
|
import logging
|
|
10
|
+
import threading
|
|
10
11
|
|
|
11
12
|
from grpc import StatusCode
|
|
12
13
|
from google.protobuf.timestamp_pb2 import Timestamp
|
|
@@ -594,10 +595,16 @@ class CommitServicer(CommitServiceServicer, HGitalyServicer):
|
|
|
594
595
|
|
|
595
596
|
logger = LoggerAdapter(base_logger, context)
|
|
596
597
|
req_log = message.Logging(request)
|
|
598
|
+
stop_event = threading.Event()
|
|
597
599
|
|
|
598
600
|
if request.limit == 0:
|
|
599
601
|
return
|
|
600
602
|
|
|
603
|
+
def on_rpc_done():
|
|
604
|
+
stop_event.set()
|
|
605
|
+
|
|
606
|
+
context.add_callback(on_rpc_done)
|
|
607
|
+
|
|
601
608
|
repo = self.load_repo(request.repository, context)
|
|
602
609
|
pats = request.paths
|
|
603
610
|
# XXX: raise error if one of the path given is an empty string
|
|
@@ -621,6 +628,10 @@ class CommitServicer(CommitServiceServicer, HGitalyServicer):
|
|
|
621
628
|
walk_opts = logcmdutil.parseopts(repo.ui, pats, opts)
|
|
622
629
|
revs, _ = logcmdutil.getrevs(repo, walk_opts)
|
|
623
630
|
|
|
631
|
+
if stop_event.is_set(): # pragma no cover (hard to test)
|
|
632
|
+
logger.info("Request %r cancelled!", req_log)
|
|
633
|
+
return
|
|
634
|
+
|
|
624
635
|
if request.offset > 0:
|
|
625
636
|
revs = revs.slice(request.offset, len(revs))
|
|
626
637
|
|
|
@@ -638,6 +649,10 @@ class CommitServicer(CommitServiceServicer, HGitalyServicer):
|
|
|
638
649
|
|
|
639
650
|
with_short_stats = request.include_shortstat
|
|
640
651
|
for chunk in chunked(revs):
|
|
652
|
+
if stop_event.is_set(): # pragma no cover (hard to test)
|
|
653
|
+
logger.info("Request %r cancelled!", req_log)
|
|
654
|
+
return
|
|
655
|
+
|
|
641
656
|
yield FindCommitsResponse(
|
|
642
657
|
commits=(message.commit(repo[rev],
|
|
643
658
|
include_referenced_by=incl_ref_by,
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
#
|
|
6
6
|
# SPDX-License-Identifier: GPL-2.0-or-later
|
|
7
7
|
|
|
8
|
+
from pathlib import Path
|
|
8
9
|
from .. import identification
|
|
9
10
|
|
|
10
11
|
|
|
@@ -13,14 +14,15 @@ def test_incarnation_id():
|
|
|
13
14
|
|
|
14
15
|
|
|
15
16
|
def test_ensure_client_id(tmpdir):
|
|
17
|
+
path = Path(tmpdir / 'client-id')
|
|
16
18
|
identification.CLIENT_ID = None # can have been set by another test
|
|
17
19
|
|
|
18
|
-
identification.ensure_client_id(
|
|
20
|
+
identification.ensure_client_id(path)
|
|
19
21
|
client_id = identification.CLIENT_ID
|
|
20
22
|
|
|
21
23
|
assert len(client_id.split('-')) == 5
|
|
22
24
|
|
|
23
25
|
identification.CLIENT_ID = None
|
|
24
|
-
identification.ensure_client_id(
|
|
26
|
+
identification.ensure_client_id(path)
|
|
25
27
|
|
|
26
28
|
assert identification.CLIENT_ID == client_id
|
|
@@ -30,7 +30,7 @@ def test_tag(tmpdir):
|
|
|
30
30
|
# the factory function doesn't even need the tag to actually exist
|
|
31
31
|
tag = message.tag(b'v3.2.1', ctx)
|
|
32
32
|
assert tag.name == b'v3.2.1'
|
|
33
|
-
assert
|
|
33
|
+
assert tag.id == ctx.hex().decode()
|
|
34
34
|
assert not tag.message
|
|
35
35
|
assert not tag.message_size
|
|
36
36
|
assert tag.tagger == CommitAuthor()
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: hgitaly
|
|
3
|
-
Version: 18.5.
|
|
3
|
+
Version: 18.5.4
|
|
4
4
|
Summary: Server-side implementation of Gitaly protocol for Mercurial
|
|
5
5
|
Home-page: https://foss.heptapod.net/heptapod/hgitaly
|
|
6
6
|
Author: Georges Racinet
|
|
@@ -10,10 +10,10 @@ Keywords: hg mercurial heptapod gitlab
|
|
|
10
10
|
Requires-Python: >=3.8
|
|
11
11
|
Description-Content-Type: text/markdown
|
|
12
12
|
License-File: LICENSE
|
|
13
|
-
Requires-Dist: heptapod
|
|
13
|
+
Requires-Dist: heptapod~=5.4.0
|
|
14
14
|
Requires-Dist: protobuf~=6.31.1
|
|
15
|
-
Requires-Dist: grpcio~=1.
|
|
16
|
-
Requires-Dist: grpcio-status~=1.
|
|
15
|
+
Requires-Dist: grpcio~=1.76.0
|
|
16
|
+
Requires-Dist: grpcio-status~=1.76.0
|
|
17
17
|
Requires-Dist: grpc-interceptor
|
|
18
18
|
Requires-Dist: grpcio-health-checking
|
|
19
19
|
Requires-Dist: hg-loggingmod>=0.4.1
|
|
@@ -490,15 +490,12 @@ def test_find_tag(gitaly_rhgitaly_comparison, hg_server):
|
|
|
490
490
|
|
|
491
491
|
def normalize_response(rpc_helper, resp, **kw):
|
|
492
492
|
normalize_commit_message(resp.tag.target_commit)
|
|
493
|
-
# no tag ids in Mercurial until we can assign a tagging changeset
|
|
494
|
-
# (requires a long-term core change)
|
|
495
|
-
resp.tag.id = ''
|
|
496
493
|
|
|
497
494
|
rpc_helper = fixture.rpc_helper(
|
|
498
495
|
hg_server=hg_server,
|
|
499
496
|
stub_cls=RefServiceStub,
|
|
500
497
|
method_name='FindTag',
|
|
501
|
-
response_sha_attrs=['tag.target_commit.id'],
|
|
498
|
+
response_sha_attrs=['tag.target_commit.id', 'tag.id'],
|
|
502
499
|
request_cls=FindTagRequest,
|
|
503
500
|
normalizer=normalize_response,
|
|
504
501
|
)
|
hgitaly-18.5.2/hgitaly/VERSION
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
18.5.2
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|