hgitaly 18.5.0.dev0__tar.gz → 18.5.1__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.0.dev0/hgitaly.egg-info → hgitaly-18.5.1}/PKG-INFO +2 -2
- hgitaly-18.5.1/hgitaly/VERSION +1 -0
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/hgitaly/scripts.py +5 -1
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/hgitaly/server/mono.py +6 -0
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/hgitaly/service/commit.py +2 -2
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/hgitaly/service/diff.py +2 -1
- hgitaly-18.5.1/hgitaly/service/mercurial_namespace.py +101 -0
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/hgitaly/service/ref.py +3 -0
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/hgitaly/service/repository.py +6 -3
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/hgitaly/service/tests/test_commit.py +3 -2
- hgitaly-18.5.1/hgitaly/service/tests/test_mercurial_namespace.py +93 -0
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/hgitaly/service/tests/test_repository_service.py +2 -0
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/hgitaly/stub/analysis_pb2_grpc.py +1 -1
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/hgitaly/stub/blob_pb2_grpc.py +1 -1
- hgitaly-18.5.1/hgitaly/stub/commit_pb2.py +265 -0
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/hgitaly/stub/commit_pb2_grpc.py +1 -1
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/hgitaly/stub/diff_pb2_grpc.py +1 -1
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/hgitaly/stub/errors_pb2_grpc.py +1 -1
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/hgitaly/stub/lint_pb2_grpc.py +1 -1
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/hgitaly/stub/mercurial_aux_git_pb2_grpc.py +1 -1
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/hgitaly/stub/mercurial_changeset_pb2_grpc.py +1 -1
- hgitaly-18.5.1/hgitaly/stub/mercurial_namespace_pb2.py +42 -0
- hgitaly-18.5.1/hgitaly/stub/mercurial_namespace_pb2_grpc.py +143 -0
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/hgitaly/stub/mercurial_operations_pb2_grpc.py +1 -1
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/hgitaly/stub/mercurial_repository_pb2_grpc.py +1 -1
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/hgitaly/stub/operations_pb2_grpc.py +1 -1
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/hgitaly/stub/ref_pb2_grpc.py +1 -1
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/hgitaly/stub/remote_pb2_grpc.py +1 -1
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/hgitaly/stub/repository_pb2_grpc.py +1 -1
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/hgitaly/stub/server_pb2_grpc.py +1 -1
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/hgitaly/stub/shared_pb2_grpc.py +1 -1
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1/hgitaly.egg-info}/PKG-INFO +2 -2
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/hgitaly.egg-info/SOURCES.txt +4 -0
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/hgitaly.egg-info/requires.txt +1 -1
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/install-requirements.txt +1 -1
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/tests_with_gitaly/test_commit.py +11 -0
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/tests_with_gitaly/test_ref.py +4 -0
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/tests_with_gitaly/test_repository_service.py +51 -5
- hgitaly-18.5.0.dev0/hgitaly/VERSION +0 -1
- hgitaly-18.5.0.dev0/hgitaly/stub/commit_pb2.py +0 -265
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/LICENSE +0 -0
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/MANIFEST.in +0 -0
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/README.md +0 -0
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/hgext3rd/__init__.py +0 -0
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/hgext3rd/hgitaly/__init__.py +0 -0
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/hgext3rd/hgitaly/revset.py +0 -0
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/hgext3rd/hgitaly/tests/__init__.py +0 -0
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/hgext3rd/hgitaly/tests/test_revset.py +0 -0
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/hgext3rd/hgitaly/tests/test_serve.py +0 -0
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/hgitaly/__init__.py +0 -0
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/hgitaly/branch.py +0 -0
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/hgitaly/changelog.py +0 -0
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/hgitaly/diff.py +0 -0
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/hgitaly/errors.py +0 -0
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/hgitaly/feature.py +0 -0
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/hgitaly/file_content.py +0 -0
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/hgitaly/file_context.py +0 -0
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/hgitaly/git.py +0 -0
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/hgitaly/gitlab_ref.py +0 -0
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/hgitaly/identification.py +0 -0
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/hgitaly/logging.py +0 -0
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/hgitaly/manifest.py +0 -0
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/hgitaly/message.py +0 -0
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/hgitaly/oid.py +0 -0
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/hgitaly/pagination.py +0 -0
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/hgitaly/path.py +0 -0
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/hgitaly/peer.py +0 -0
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/hgitaly/procutil.py +0 -0
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/hgitaly/repository.py +0 -0
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/hgitaly/revision.py +0 -0
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/hgitaly/revset.py +0 -0
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/hgitaly/server/__init__.py +0 -0
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/hgitaly/server/address.py +0 -0
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/hgitaly/server/prefork.py +0 -0
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/hgitaly/server/tests/__init__.py +0 -0
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/hgitaly/server/tests/test_address.py +0 -0
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/hgitaly/server/tests/test_mono.py +0 -0
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/hgitaly/server/tests/test_prefork.py +0 -0
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/hgitaly/server/tests/test_worker.py +0 -0
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/hgitaly/server/worker.py +0 -0
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/hgitaly/service/__init__.py +0 -0
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/hgitaly/service/analysis.py +0 -0
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/hgitaly/service/blob.py +0 -0
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/hgitaly/service/interceptors.py +0 -0
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/hgitaly/service/mercurial_changeset.py +0 -0
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/hgitaly/service/mercurial_operations.py +0 -0
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/hgitaly/service/mercurial_repository.py +0 -0
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/hgitaly/service/operations.py +0 -0
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/hgitaly/service/server.py +0 -0
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/hgitaly/service/tests/__init__.py +0 -0
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/hgitaly/service/tests/fixture.py +0 -0
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/hgitaly/service/tests/test_analysis.py +0 -0
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/hgitaly/service/tests/test_blob.py +0 -0
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/hgitaly/service/tests/test_default_branch.py +0 -0
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/hgitaly/service/tests/test_diff.py +0 -0
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/hgitaly/service/tests/test_mercurial_changeset.py +0 -0
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/hgitaly/service/tests/test_mercurial_operations.py +0 -0
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/hgitaly/service/tests/test_mercurial_repository.py +0 -0
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/hgitaly/service/tests/test_operations.py +0 -0
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/hgitaly/service/tests/test_ref.py +0 -0
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/hgitaly/service/tests/test_server.py +0 -0
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/hgitaly/servicer.py +0 -0
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/hgitaly/ssh.py +0 -0
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/hgitaly/stream.py +0 -0
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/hgitaly/stub/__init__.py +0 -0
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/hgitaly/stub/analysis_pb2.py +0 -0
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/hgitaly/stub/blob_pb2.py +0 -0
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/hgitaly/stub/diff_pb2.py +0 -0
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/hgitaly/stub/errors_pb2.py +0 -0
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/hgitaly/stub/lint_pb2.py +0 -0
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/hgitaly/stub/mercurial_aux_git_pb2.py +0 -0
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/hgitaly/stub/mercurial_changeset_pb2.py +0 -0
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/hgitaly/stub/mercurial_operations_pb2.py +0 -0
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/hgitaly/stub/mercurial_repository_pb2.py +0 -0
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/hgitaly/stub/operations_pb2.py +0 -0
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/hgitaly/stub/ref_pb2.py +0 -0
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/hgitaly/stub/remote_pb2.py +0 -0
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/hgitaly/stub/repository_pb2.py +0 -0
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/hgitaly/stub/server_pb2.py +0 -0
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/hgitaly/stub/shared_pb2.py +0 -0
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/hgitaly/tag.py +0 -0
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/hgitaly/testing/__init__.py +0 -0
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/hgitaly/testing/bundle.py +0 -0
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/hgitaly/testing/context.py +0 -0
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/hgitaly/testing/grpc.py +0 -0
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/hgitaly/testing/multiprocessing.py +0 -0
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/hgitaly/testing/repo.py +0 -0
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/hgitaly/testing/ssh.py +0 -0
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/hgitaly/testing/sshd.py +0 -0
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/hgitaly/testing/storage.py +0 -0
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/hgitaly/testing/tests/__init__.py +0 -0
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/hgitaly/testing/tests/test_sshd.py +0 -0
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/hgitaly/tests/__init__.py +0 -0
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/hgitaly/tests/common.py +0 -0
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/hgitaly/tests/test_branch.py +0 -0
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/hgitaly/tests/test_diff.py +0 -0
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/hgitaly/tests/test_errors.py +0 -0
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/hgitaly/tests/test_feature.py +0 -0
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/hgitaly/tests/test_file_context.py +0 -0
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/hgitaly/tests/test_gitlab_ref.py +0 -0
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/hgitaly/tests/test_identification.py +0 -0
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/hgitaly/tests/test_manifest.py +0 -0
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/hgitaly/tests/test_messages.py +0 -0
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/hgitaly/tests/test_oid.py +0 -0
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/hgitaly/tests/test_peer.py +0 -0
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/hgitaly/tests/test_repository.py +0 -0
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/hgitaly/tests/test_revision.py +0 -0
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/hgitaly/tests/test_revset.py +0 -0
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/hgitaly/tests/test_servicer.py +0 -0
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/hgitaly/tests/test_stream.py +0 -0
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/hgitaly/tests/test_tag.py +0 -0
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/hgitaly/tests/test_workdir.py +0 -0
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/hgitaly/util.py +0 -0
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/hgitaly/workdir.py +0 -0
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/hgitaly.egg-info/dependency_links.txt +0 -0
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/hgitaly.egg-info/entry_points.txt +0 -0
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/hgitaly.egg-info/top_level.txt +0 -0
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/setup.cfg +0 -0
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/setup.py +0 -0
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/tests_with_gitaly/__init__.py +0 -0
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/tests_with_gitaly/comparison.py +0 -0
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/tests_with_gitaly/conftest.py +0 -0
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/tests_with_gitaly/gitaly.py +0 -0
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/tests_with_gitaly/hgitaly_rhgitaly_comparison.py +0 -0
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/tests_with_gitaly/rhgitaly.py +0 -0
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/tests_with_gitaly/test_blob_tree.py +0 -0
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/tests_with_gitaly/test_comparison.py +0 -0
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/tests_with_gitaly/test_diff.py +0 -0
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/tests_with_gitaly/test_gitaly_server.py +0 -0
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/tests_with_gitaly/test_mercurial_aux_git.py +0 -0
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/tests_with_gitaly/test_mercurial_operations.py +0 -0
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/tests_with_gitaly/test_mercurial_repository.py +0 -0
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/tests_with_gitaly/test_operations.py +0 -0
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/tests_with_gitaly/test_remote.py +0 -0
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/tests_with_gitaly/test_rhgitaly_server.py +0 -0
- {hgitaly-18.5.0.dev0 → hgitaly-18.5.1}/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.1
|
|
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,7 +10,7 @@ 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>=5.
|
|
13
|
+
Requires-Dist: heptapod>=5.4.0
|
|
14
14
|
Requires-Dist: protobuf~=6.31.1
|
|
15
15
|
Requires-Dist: grpcio~=1.75.0
|
|
16
16
|
Requires-Dist: grpcio-status~=1.75.0
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
18.5.1
|
|
@@ -197,6 +197,7 @@ def stats(): # pragma no cover
|
|
|
197
197
|
incomplete = total_requests - sum(len(succ) for succ in succeeded.values())
|
|
198
198
|
|
|
199
199
|
stats = []
|
|
200
|
+
all_total_ms = 0
|
|
200
201
|
for req, count in called.items():
|
|
201
202
|
percent = round(count * 100 / total_requests)
|
|
202
203
|
succ = succeeded[req]
|
|
@@ -208,10 +209,12 @@ def stats(): # pragma no cover
|
|
|
208
209
|
)
|
|
209
210
|
stats.append((req, req_stats))
|
|
210
211
|
if nb_succ > 0:
|
|
212
|
+
req_total = sum(s for s in succ)
|
|
213
|
+
all_total_ms += req_total
|
|
211
214
|
timing = req_stats['completion_stats_ms'] = dict(
|
|
212
215
|
mean=statistics.mean(succ),
|
|
213
216
|
median=statistics.median(succ),
|
|
214
|
-
total=
|
|
217
|
+
total=req_total,
|
|
215
218
|
)
|
|
216
219
|
if nb_succ > 1:
|
|
217
220
|
timing['standard_deviation'] = statistics.pstdev(succ)
|
|
@@ -246,6 +249,7 @@ def stats(): # pragma no cover
|
|
|
246
249
|
|
|
247
250
|
print(f"TOTAL Requests since {first_timestamp}: {total_requests} \n"
|
|
248
251
|
f" {incomplete} incomplete (cancelled or failed)")
|
|
252
|
+
print("Total wall time: %d seconds" % int(all_total_ms / 1000))
|
|
249
253
|
print("Breakdown:")
|
|
250
254
|
for req, details in stats.items():
|
|
251
255
|
percent = '%4.1f' % details['percent']
|
|
@@ -36,6 +36,7 @@ from ..service.commit import CommitServicer
|
|
|
36
36
|
from ..service.ref import RefServicer
|
|
37
37
|
from ..service.diff import DiffServicer
|
|
38
38
|
from ..service.mercurial_changeset import MercurialChangesetServicer
|
|
39
|
+
from ..service.mercurial_namespace import MercurialNamespaceServicer
|
|
39
40
|
from ..service.mercurial_operations import MercurialOperationsServicer
|
|
40
41
|
from ..service.mercurial_repository import MercurialRepositoryServicer
|
|
41
42
|
from ..service.operations import OperationServicer
|
|
@@ -56,6 +57,9 @@ from ..stub.operations_pb2_grpc import (
|
|
|
56
57
|
from ..stub.mercurial_changeset_pb2_grpc import (
|
|
57
58
|
add_MercurialChangesetServiceServicer_to_server
|
|
58
59
|
)
|
|
60
|
+
from ..stub.mercurial_namespace_pb2_grpc import (
|
|
61
|
+
add_MercurialNamespaceServiceServicer_to_server
|
|
62
|
+
)
|
|
59
63
|
from ..stub.mercurial_operations_pb2_grpc import (
|
|
60
64
|
add_MercurialOperationsServiceServicer_to_server
|
|
61
65
|
)
|
|
@@ -105,6 +109,8 @@ def init(listen_urls, storages):
|
|
|
105
109
|
add_DiffServiceServicer_to_server(DiffServicer(storages), server)
|
|
106
110
|
add_MercurialChangesetServiceServicer_to_server(
|
|
107
111
|
MercurialChangesetServicer(storages), server)
|
|
112
|
+
add_MercurialNamespaceServiceServicer_to_server(
|
|
113
|
+
MercurialNamespaceServicer(storages), server)
|
|
108
114
|
add_MercurialOperationsServiceServicer_to_server(
|
|
109
115
|
MercurialOperationsServicer(storages), server)
|
|
110
116
|
add_MercurialRepositoryServiceServicer_to_server(
|
|
@@ -148,7 +148,7 @@ class CommitServicer(CommitServiceServicer, HGitalyServicer):
|
|
|
148
148
|
try:
|
|
149
149
|
ancestor = repo[request.ancestor_id.encode()]
|
|
150
150
|
child = repo[request.child_id.encode()]
|
|
151
|
-
except error.RepoLookupError as exc:
|
|
151
|
+
except (error.RepoLookupError, error.ProgrammingError) as exc:
|
|
152
152
|
# Gitaly just returns False. This is probably an inconsistency
|
|
153
153
|
# in the client, so let's log it to help.
|
|
154
154
|
logger.warning(
|
|
@@ -925,7 +925,7 @@ class CommitServicer(CommitServiceServicer, HGitalyServicer):
|
|
|
925
925
|
sort_key = b'-topo' if reverse else b'topo'
|
|
926
926
|
elif request.order == Order.DATE:
|
|
927
927
|
# See docstring about this approximative choice
|
|
928
|
-
sort_key = b'
|
|
928
|
+
sort_key = b'date' if reverse else b'-date'
|
|
929
929
|
|
|
930
930
|
revset = b'sort(%s, %s)' % (revset, sort_key)
|
|
931
931
|
|
|
@@ -279,7 +279,8 @@ class DiffServicer(DiffServiceServicer, HGitalyServicer):
|
|
|
279
279
|
parsed_request = parse_diff_request(self, request, context)
|
|
280
280
|
parsed, repo, ctx_from, ctx_to = parsed_request
|
|
281
281
|
if not parsed:
|
|
282
|
-
context.abort(StatusCode.FAILED_PRECONDITION,
|
|
282
|
+
context.abort(StatusCode.FAILED_PRECONDITION,
|
|
283
|
+
"eachDiff: exit status 128")
|
|
283
284
|
|
|
284
285
|
m = None
|
|
285
286
|
if request.paths:
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
# Copyright 2025 Georges Racinet <georges.racinet@cloudcrane.io>
|
|
2
|
+
#
|
|
3
|
+
# This software may be used and distributed according to the terms of the
|
|
4
|
+
# GNU General Public License version 2 or any later version.
|
|
5
|
+
#
|
|
6
|
+
# SPDX-License-Identifier: GPL-2.0-or-later
|
|
7
|
+
import logging
|
|
8
|
+
import os
|
|
9
|
+
import tarfile
|
|
10
|
+
import tempfile
|
|
11
|
+
|
|
12
|
+
from grpc import StatusCode
|
|
13
|
+
|
|
14
|
+
from ..logging import LoggerAdapter
|
|
15
|
+
from ..stream import (
|
|
16
|
+
WRITE_BUFFER_SIZE,
|
|
17
|
+
streaming_request_tempfile_extract,
|
|
18
|
+
)
|
|
19
|
+
from ..stub.mercurial_namespace_pb2 import (
|
|
20
|
+
MercurialNamespacesConfigArchive,
|
|
21
|
+
RestoreMercurialNamespacesConfigResponse,
|
|
22
|
+
)
|
|
23
|
+
from ..stub.mercurial_namespace_pb2_grpc import (
|
|
24
|
+
MercurialNamespaceServiceServicer,
|
|
25
|
+
)
|
|
26
|
+
from ..servicer import HGitalyServicer
|
|
27
|
+
|
|
28
|
+
base_logger = logging.getLogger(__name__)
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
class MercurialNamespaceServicer(MercurialNamespaceServiceServicer,
|
|
32
|
+
HGitalyServicer):
|
|
33
|
+
"""MercurialNamespaceService implementation.
|
|
34
|
+
|
|
35
|
+
The ordering of methods in this source file is the same as in the proto
|
|
36
|
+
file.
|
|
37
|
+
"""
|
|
38
|
+
|
|
39
|
+
def unique_storage_root(self, context):
|
|
40
|
+
if len(self.storages) > 1: # pragma no cover
|
|
41
|
+
# we will need something to accomodate the case where
|
|
42
|
+
# several storages are in a common root directory
|
|
43
|
+
# or just have HGitaly (like RHGitaly) handle only one storage,
|
|
44
|
+
# but it is not the GitLab standard.
|
|
45
|
+
# another option (quite premature) is to accept the fact that
|
|
46
|
+
# this will be duplicated for each storage, not only each
|
|
47
|
+
# server.
|
|
48
|
+
context.abort(
|
|
49
|
+
StatusCode.FAILED_PRECONDITION,
|
|
50
|
+
"cannot efficiently backup namespaces configurations "
|
|
51
|
+
"when handling several storages"
|
|
52
|
+
)
|
|
53
|
+
return next(iter(self.storages.values()))
|
|
54
|
+
|
|
55
|
+
def BackupMercurialNamespacesConfig(self, request, context):
|
|
56
|
+
logger = LoggerAdapter(base_logger, context)
|
|
57
|
+
root = self.unique_storage_root(context)
|
|
58
|
+
with tempfile.TemporaryFile() as tmpf:
|
|
59
|
+
with tarfile.open(fileobj=tmpf, mode='w:gz') as tarf:
|
|
60
|
+
for tld in os.listdir(root):
|
|
61
|
+
if tld in (b'+gitaly', b'+hgitaly', b'@hashed'):
|
|
62
|
+
continue
|
|
63
|
+
tld_abs = os.path.join(root, tld)
|
|
64
|
+
if not os.path.isdir(tld_abs):
|
|
65
|
+
continue
|
|
66
|
+
if b'.hg' in os.listdir(tld_abs):
|
|
67
|
+
# This is a Mercurial repository, should not
|
|
68
|
+
# happen in normal operation, but it does in tests
|
|
69
|
+
# let's bail
|
|
70
|
+
continue
|
|
71
|
+
|
|
72
|
+
logger.debug("Dumping namespace hgrc files for "
|
|
73
|
+
"top-level dir %r", tld)
|
|
74
|
+
for (dir_abspath, subdirs, files) in os.walk(tld_abs):
|
|
75
|
+
if b'hgrc' in files:
|
|
76
|
+
file_abspath = os.path.join(dir_abspath, b'hgrc')
|
|
77
|
+
file_relpath = os.path.relpath(file_abspath,
|
|
78
|
+
root)
|
|
79
|
+
# tarfile wants to operate on str, not bytes
|
|
80
|
+
tarf.add(file_abspath,
|
|
81
|
+
arcname=os.fsdecode(file_relpath))
|
|
82
|
+
tmpf.seek(0)
|
|
83
|
+
first = True
|
|
84
|
+
while True:
|
|
85
|
+
chunk = tmpf.read(WRITE_BUFFER_SIZE)
|
|
86
|
+
if not chunk and not first:
|
|
87
|
+
break
|
|
88
|
+
first = False
|
|
89
|
+
yield MercurialNamespacesConfigArchive(data=chunk)
|
|
90
|
+
|
|
91
|
+
def RestoreMercurialNamespacesConfig(self, request, context):
|
|
92
|
+
logger = LoggerAdapter(base_logger, context)
|
|
93
|
+
with streaming_request_tempfile_extract(
|
|
94
|
+
request, context) as (_options, tmpf):
|
|
95
|
+
tmpf.flush()
|
|
96
|
+
logger.info("Extracting tarball for Namespaces hgrc files")
|
|
97
|
+
with tarfile.open(fileobj=tmpf, mode='r:gz') as tarf:
|
|
98
|
+
# The client being the Rails app, it is deeply trusted
|
|
99
|
+
tarf.extractall(
|
|
100
|
+
path=os.fsdecode(self.unique_storage_root(context)))
|
|
101
|
+
return RestoreMercurialNamespacesConfigResponse()
|
|
@@ -647,6 +647,9 @@ class RefServicer(RefServiceServicer, HGitalyServicer):
|
|
|
647
647
|
),
|
|
648
648
|
context), limit):
|
|
649
649
|
refs.extend(name for name, _tgt in chunk)
|
|
650
|
+
|
|
651
|
+
# This is implicitely decoding as UTF-8, and raising if it fails
|
|
652
|
+
# (checked with the debugger)
|
|
650
653
|
return FindRefsByOIDResponse(refs=refs)
|
|
651
654
|
|
|
652
655
|
|
|
@@ -36,6 +36,7 @@ from hgext3rd.heptapod.branch import set_default_gitlab_branch
|
|
|
36
36
|
from hgext3rd.heptapod.special_ref import write_gitlab_special_ref
|
|
37
37
|
from hgext3rd.heptapod.keep_around import (
|
|
38
38
|
create_keep_around,
|
|
39
|
+
delete_keep_around,
|
|
39
40
|
parse_keep_around_ref,
|
|
40
41
|
)
|
|
41
42
|
|
|
@@ -337,7 +338,9 @@ class RepositoryServicer(RepositoryServiceServicer, HGitalyServicer):
|
|
|
337
338
|
|
|
338
339
|
keep_around = parse_keep_around_ref(ref)
|
|
339
340
|
if keep_around is not None:
|
|
340
|
-
if
|
|
341
|
+
if target == ZERO_SHA:
|
|
342
|
+
delete_keep_around(repo, keep_around)
|
|
343
|
+
elif (CHANGESET_HASH_BYTES_REGEXP.match(keep_around) is None
|
|
341
344
|
or target != keep_around):
|
|
342
345
|
context.abort(
|
|
343
346
|
StatusCode.INVALID_ARGUMENT,
|
|
@@ -346,8 +349,8 @@ class RepositoryServicer(RepositoryServiceServicer, HGitalyServicer):
|
|
|
346
349
|
"target must "
|
|
347
350
|
"match the ref name" % (target, ref)
|
|
348
351
|
)
|
|
349
|
-
|
|
350
|
-
|
|
352
|
+
else:
|
|
353
|
+
create_keep_around(repo, target)
|
|
351
354
|
return WriteRefResponse()
|
|
352
355
|
except Exception:
|
|
353
356
|
# TODO this is a stop-gap measure to prevent repository breakage
|
|
@@ -1362,8 +1362,9 @@ def test_list_commits(commit_fixture_empty_repo):
|
|
|
1362
1362
|
# orderings
|
|
1363
1363
|
Order = ListCommitsRequest.Order
|
|
1364
1364
|
assert list_commits(sha4, order=Order.TOPO) == [sha4, sha3, sha2, sha0]
|
|
1365
|
-
#
|
|
1366
|
-
|
|
1365
|
+
# being the only one with no explicit date, ctx0 looks to be
|
|
1366
|
+
# the most recent one.
|
|
1367
|
+
assert list_commits(sha4, order=Order.DATE) == [sha0, sha4, sha3, sha2]
|
|
1367
1368
|
|
|
1368
1369
|
# no result
|
|
1369
1370
|
assert list_commits(sha4, caret(ctx4)) == []
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
# Copyright 2025 Georges Racinet <georges.racinet@cloudcrane.io>
|
|
2
|
+
#
|
|
3
|
+
# This software may be used and distributed according to the terms of the
|
|
4
|
+
# GNU General Public License version 2 or any later version.
|
|
5
|
+
#
|
|
6
|
+
# SPDX-License-Identifier: GPL-2.0-or-later
|
|
7
|
+
import tarfile
|
|
8
|
+
import os
|
|
9
|
+
import shutil
|
|
10
|
+
|
|
11
|
+
import pytest
|
|
12
|
+
|
|
13
|
+
from hgitaly.stub.mercurial_namespace_pb2 import (
|
|
14
|
+
MercurialNamespacesConfigArchive,
|
|
15
|
+
BackupMercurialNamespacesConfigRequest,
|
|
16
|
+
)
|
|
17
|
+
from hgitaly.stub.mercurial_namespace_pb2_grpc import (
|
|
18
|
+
MercurialNamespaceServiceStub,
|
|
19
|
+
)
|
|
20
|
+
|
|
21
|
+
from .fixture import ServiceFixture
|
|
22
|
+
|
|
23
|
+
parametrize = pytest.mark.parametrize
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
class NamespaceFixture(ServiceFixture):
|
|
27
|
+
stub_cls = MercurialNamespaceServiceStub
|
|
28
|
+
|
|
29
|
+
def backup(self, target, **kw):
|
|
30
|
+
with open(target, 'wb') as targetf:
|
|
31
|
+
for resp in self.stub.BackupMercurialNamespacesConfig(
|
|
32
|
+
BackupMercurialNamespacesConfigRequest(**kw)):
|
|
33
|
+
targetf.write(resp.data)
|
|
34
|
+
|
|
35
|
+
def restore(self, tarball, **kw):
|
|
36
|
+
with open(tarball, 'rb') as fobj:
|
|
37
|
+
def gen():
|
|
38
|
+
while True:
|
|
39
|
+
r = fobj.read(100)
|
|
40
|
+
yield MercurialNamespacesConfigArchive(data=r)
|
|
41
|
+
if not r:
|
|
42
|
+
break
|
|
43
|
+
|
|
44
|
+
return self.stub.RestoreMercurialNamespacesConfig(gen())
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
@pytest.fixture
|
|
48
|
+
def namespace_fixture(grpc_channel, server_repos_root):
|
|
49
|
+
with NamespaceFixture(grpc_channel, server_repos_root) as fixture:
|
|
50
|
+
yield fixture
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
def test_backup_restore(namespace_fixture, server_repos_root, tmpdir):
|
|
54
|
+
fixture = namespace_fixture
|
|
55
|
+
|
|
56
|
+
group1 = server_repos_root / 'default/group1'
|
|
57
|
+
group2 = server_repos_root / 'default/group2'
|
|
58
|
+
group3 = server_repos_root / 'default/group3'
|
|
59
|
+
subgroup = group2 / 'sub'
|
|
60
|
+
os.makedirs(group1)
|
|
61
|
+
os.makedirs(subgroup)
|
|
62
|
+
os.makedirs(group3)
|
|
63
|
+
(group1 / 'hgrc').write_text("something\n")
|
|
64
|
+
(group2 / 'hgrc').write_text("some for two\n")
|
|
65
|
+
include = "%include ../hgrc\n"
|
|
66
|
+
(subgroup / 'hgrc').write_text(include)
|
|
67
|
+
# there is a repo at storage root (part of standard fixture),
|
|
68
|
+
# let's add some more stuff that we do not want
|
|
69
|
+
hashed = server_repos_root / 'default/@hashed'
|
|
70
|
+
os.makedirs(hashed)
|
|
71
|
+
(hashed / 'hgrc').write_text("unwnated\n")
|
|
72
|
+
(server_repos_root / 'default/stray-file').write_text(
|
|
73
|
+
"ignore top-level files")
|
|
74
|
+
|
|
75
|
+
tarball = tmpdir / 'testbak1.tgz'
|
|
76
|
+
fixture.backup(tmpdir / 'testbak1.tgz')
|
|
77
|
+
|
|
78
|
+
with tarfile.open(tarball) as tarf:
|
|
79
|
+
assert set(tarf.getnames()) == {
|
|
80
|
+
'group1/hgrc',
|
|
81
|
+
'group2/hgrc',
|
|
82
|
+
'group2/sub/hgrc',
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
shutil.rmtree(group1)
|
|
86
|
+
shutil.rmtree(group2)
|
|
87
|
+
shutil.rmtree(group3)
|
|
88
|
+
fixture.restore(tarball)
|
|
89
|
+
|
|
90
|
+
assert (group1 / 'hgrc').read_text() == "something\n"
|
|
91
|
+
assert (group2 / 'hgrc').read_text() == "some for two\n"
|
|
92
|
+
assert (subgroup / 'hgrc').read_text() == include
|
|
93
|
+
assert not group3.exists()
|
|
@@ -456,6 +456,8 @@ def test_write_ref(fixture_with_repo):
|
|
|
456
456
|
create_keep_around(repo, existing_ka)
|
|
457
457
|
fixture.write_ref(b'refs/keep-around/' + sha, sha)
|
|
458
458
|
assert set(iter_keep_arounds(repo)) == {sha, existing_ka}
|
|
459
|
+
fixture.write_ref(b'refs/keep-around/' + existing_ka, ZERO_SHA)
|
|
460
|
+
assert set(iter_keep_arounds(repo)) == {sha}
|
|
459
461
|
|
|
460
462
|
|
|
461
463
|
def test_write_special_refs_exceptions(fixture_with_repo):
|