hgitaly 18.4.0__tar.gz → 18.4.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.4.0/hgitaly.egg-info → hgitaly-18.4.1}/PKG-INFO +2 -2
- hgitaly-18.4.1/hgitaly/VERSION +1 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/hgitaly/service/repository.py +6 -3
- {hgitaly-18.4.0 → hgitaly-18.4.1}/hgitaly/service/tests/test_repository_service.py +2 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1/hgitaly.egg-info}/PKG-INFO +2 -2
- {hgitaly-18.4.0 → hgitaly-18.4.1}/hgitaly.egg-info/requires.txt +1 -1
- {hgitaly-18.4.0 → hgitaly-18.4.1}/install-requirements.txt +1 -1
- {hgitaly-18.4.0 → hgitaly-18.4.1}/tests_with_gitaly/test_repository_service.py +51 -5
- hgitaly-18.4.0/hgitaly/VERSION +0 -1
- {hgitaly-18.4.0 → hgitaly-18.4.1}/LICENSE +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/MANIFEST.in +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/README.md +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/hgext3rd/__init__.py +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/hgext3rd/hgitaly/__init__.py +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/hgext3rd/hgitaly/revset.py +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/hgext3rd/hgitaly/tests/__init__.py +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/hgext3rd/hgitaly/tests/test_revset.py +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/hgext3rd/hgitaly/tests/test_serve.py +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/hgitaly/__init__.py +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/hgitaly/branch.py +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/hgitaly/changelog.py +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/hgitaly/diff.py +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/hgitaly/errors.py +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/hgitaly/feature.py +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/hgitaly/file_content.py +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/hgitaly/file_context.py +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/hgitaly/git.py +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/hgitaly/gitlab_ref.py +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/hgitaly/identification.py +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/hgitaly/logging.py +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/hgitaly/manifest.py +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/hgitaly/message.py +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/hgitaly/oid.py +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/hgitaly/pagination.py +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/hgitaly/path.py +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/hgitaly/peer.py +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/hgitaly/procutil.py +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/hgitaly/repository.py +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/hgitaly/revision.py +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/hgitaly/revset.py +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/hgitaly/scripts.py +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/hgitaly/server/__init__.py +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/hgitaly/server/address.py +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/hgitaly/server/mono.py +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/hgitaly/server/prefork.py +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/hgitaly/server/tests/__init__.py +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/hgitaly/server/tests/test_address.py +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/hgitaly/server/tests/test_mono.py +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/hgitaly/server/tests/test_prefork.py +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/hgitaly/server/tests/test_worker.py +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/hgitaly/server/worker.py +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/hgitaly/service/__init__.py +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/hgitaly/service/analysis.py +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/hgitaly/service/blob.py +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/hgitaly/service/commit.py +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/hgitaly/service/diff.py +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/hgitaly/service/interceptors.py +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/hgitaly/service/mercurial_changeset.py +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/hgitaly/service/mercurial_operations.py +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/hgitaly/service/mercurial_repository.py +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/hgitaly/service/operations.py +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/hgitaly/service/ref.py +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/hgitaly/service/server.py +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/hgitaly/service/tests/__init__.py +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/hgitaly/service/tests/fixture.py +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/hgitaly/service/tests/test_analysis.py +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/hgitaly/service/tests/test_blob.py +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/hgitaly/service/tests/test_commit.py +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/hgitaly/service/tests/test_default_branch.py +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/hgitaly/service/tests/test_diff.py +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/hgitaly/service/tests/test_mercurial_changeset.py +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/hgitaly/service/tests/test_mercurial_operations.py +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/hgitaly/service/tests/test_mercurial_repository.py +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/hgitaly/service/tests/test_operations.py +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/hgitaly/service/tests/test_ref.py +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/hgitaly/service/tests/test_server.py +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/hgitaly/servicer.py +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/hgitaly/ssh.py +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/hgitaly/stream.py +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/hgitaly/stub/__init__.py +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/hgitaly/stub/analysis_pb2.py +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/hgitaly/stub/analysis_pb2_grpc.py +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/hgitaly/stub/blob_pb2.py +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/hgitaly/stub/blob_pb2_grpc.py +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/hgitaly/stub/commit_pb2.py +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/hgitaly/stub/commit_pb2_grpc.py +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/hgitaly/stub/diff_pb2.py +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/hgitaly/stub/diff_pb2_grpc.py +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/hgitaly/stub/errors_pb2.py +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/hgitaly/stub/errors_pb2_grpc.py +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/hgitaly/stub/lint_pb2.py +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/hgitaly/stub/lint_pb2_grpc.py +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/hgitaly/stub/mercurial_aux_git_pb2.py +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/hgitaly/stub/mercurial_aux_git_pb2_grpc.py +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/hgitaly/stub/mercurial_changeset_pb2.py +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/hgitaly/stub/mercurial_changeset_pb2_grpc.py +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/hgitaly/stub/mercurial_operations_pb2.py +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/hgitaly/stub/mercurial_operations_pb2_grpc.py +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/hgitaly/stub/mercurial_repository_pb2.py +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/hgitaly/stub/mercurial_repository_pb2_grpc.py +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/hgitaly/stub/operations_pb2.py +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/hgitaly/stub/operations_pb2_grpc.py +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/hgitaly/stub/ref_pb2.py +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/hgitaly/stub/ref_pb2_grpc.py +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/hgitaly/stub/remote_pb2.py +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/hgitaly/stub/remote_pb2_grpc.py +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/hgitaly/stub/repository_pb2.py +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/hgitaly/stub/repository_pb2_grpc.py +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/hgitaly/stub/server_pb2.py +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/hgitaly/stub/server_pb2_grpc.py +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/hgitaly/stub/shared_pb2.py +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/hgitaly/stub/shared_pb2_grpc.py +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/hgitaly/tag.py +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/hgitaly/testing/__init__.py +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/hgitaly/testing/bundle.py +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/hgitaly/testing/context.py +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/hgitaly/testing/grpc.py +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/hgitaly/testing/multiprocessing.py +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/hgitaly/testing/repo.py +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/hgitaly/testing/ssh.py +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/hgitaly/testing/sshd.py +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/hgitaly/testing/storage.py +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/hgitaly/testing/tests/__init__.py +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/hgitaly/testing/tests/test_sshd.py +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/hgitaly/tests/__init__.py +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/hgitaly/tests/common.py +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/hgitaly/tests/test_branch.py +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/hgitaly/tests/test_diff.py +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/hgitaly/tests/test_errors.py +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/hgitaly/tests/test_feature.py +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/hgitaly/tests/test_file_context.py +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/hgitaly/tests/test_gitlab_ref.py +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/hgitaly/tests/test_identification.py +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/hgitaly/tests/test_manifest.py +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/hgitaly/tests/test_messages.py +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/hgitaly/tests/test_oid.py +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/hgitaly/tests/test_peer.py +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/hgitaly/tests/test_repository.py +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/hgitaly/tests/test_revision.py +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/hgitaly/tests/test_revset.py +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/hgitaly/tests/test_servicer.py +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/hgitaly/tests/test_stream.py +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/hgitaly/tests/test_tag.py +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/hgitaly/tests/test_workdir.py +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/hgitaly/util.py +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/hgitaly/workdir.py +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/hgitaly.egg-info/SOURCES.txt +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/hgitaly.egg-info/dependency_links.txt +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/hgitaly.egg-info/entry_points.txt +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/hgitaly.egg-info/top_level.txt +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/setup.cfg +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/setup.py +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/tests_with_gitaly/__init__.py +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/tests_with_gitaly/comparison.py +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/tests_with_gitaly/conftest.py +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/tests_with_gitaly/gitaly.py +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/tests_with_gitaly/hgitaly_rhgitaly_comparison.py +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/tests_with_gitaly/rhgitaly.py +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/tests_with_gitaly/test_blob_tree.py +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/tests_with_gitaly/test_commit.py +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/tests_with_gitaly/test_comparison.py +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/tests_with_gitaly/test_diff.py +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/tests_with_gitaly/test_gitaly_server.py +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/tests_with_gitaly/test_mercurial_aux_git.py +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/tests_with_gitaly/test_mercurial_operations.py +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/tests_with_gitaly/test_mercurial_repository.py +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/tests_with_gitaly/test_operations.py +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/tests_with_gitaly/test_ref.py +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/tests_with_gitaly/test_remote.py +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.1}/tests_with_gitaly/test_rhgitaly_server.py +0 -0
- {hgitaly-18.4.0 → hgitaly-18.4.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.4.
|
|
3
|
+
Version: 18.4.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.74.0
|
|
16
16
|
Requires-Dist: grpcio-status~=1.74.0
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
18.4.1
|
|
@@ -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
|
|
@@ -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):
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: hgitaly
|
|
3
|
-
Version: 18.4.
|
|
3
|
+
Version: 18.4.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.74.0
|
|
16
16
|
Requires-Dist: grpcio-status~=1.74.0
|
|
@@ -13,6 +13,10 @@ from mercurial import (
|
|
|
13
13
|
import pytest
|
|
14
14
|
import grpc
|
|
15
15
|
import itertools
|
|
16
|
+
|
|
17
|
+
from hgext3rd.heptapod.keep_around import (
|
|
18
|
+
iter_keep_arounds,
|
|
19
|
+
)
|
|
16
20
|
# from hgitaly.git import EMPTY_TREE_OID
|
|
17
21
|
from hgitaly.testing import license_content
|
|
18
22
|
from hgitaly.revision import ZERO_SHA
|
|
@@ -816,14 +820,17 @@ def test_find_license(gitaly_rhgitaly_comparison):
|
|
|
816
820
|
rpc_helper.assert_compare()
|
|
817
821
|
|
|
818
822
|
|
|
819
|
-
|
|
820
|
-
|
|
823
|
+
@parametrize('hg_server', ('hgitaly', 'rhgitaly'))
|
|
824
|
+
def test_write_ref(gitaly_rhgitaly_comparison, server_repos_root, hg_server):
|
|
825
|
+
fixture = gitaly_rhgitaly_comparison
|
|
821
826
|
rpc_helper = fixture.rpc_helper(
|
|
827
|
+
hg_server=hg_server,
|
|
822
828
|
stub_cls=RepositoryServiceStub,
|
|
823
829
|
method_name='WriteRef',
|
|
824
830
|
request_sha_attrs=['revision', 'old_revision'],
|
|
825
831
|
request_cls=WriteRefRequest,
|
|
826
832
|
)
|
|
833
|
+
rpc_helper.feature_flags = [('rhgitaly-write-ref', True)]
|
|
827
834
|
|
|
828
835
|
def commit_normalizer(rpc_helper, response, **kw):
|
|
829
836
|
if response.HasField('commit'):
|
|
@@ -843,11 +850,18 @@ def test_write_ref(gitaly_comparison, server_repos_root):
|
|
|
843
850
|
wrapper = fixture.hg_repo_wrapper
|
|
844
851
|
sha0 = wrapper.write_commit('afoo', message="Some foo").hex()
|
|
845
852
|
sha1 = wrapper.write_commit('afoo', message="Some foo").hex()
|
|
853
|
+
sha2 = wrapper.write_commit('afoo', message="Other foo",
|
|
854
|
+
branch='other').hex()
|
|
846
855
|
default_rev = b'branch/default'
|
|
856
|
+
default_ref = b'refs/heads/' + default_rev
|
|
857
|
+
other_rev = b'branch/other'
|
|
858
|
+
other_ref = b'refs/heads/' + other_rev
|
|
847
859
|
|
|
848
860
|
# precondition for the test: mirror worked
|
|
849
|
-
assert fixture.git_repo.branch_titles() == {default_rev: b"Some foo"
|
|
861
|
+
assert fixture.git_repo.branch_titles() == {default_rev: b"Some foo",
|
|
862
|
+
other_rev: b"Other foo"}
|
|
850
863
|
|
|
864
|
+
# a special ref, insertion then removal
|
|
851
865
|
pipeline_1 = b'refs/pipelines/1'
|
|
852
866
|
assert_compare(ref=pipeline_1, revision=default_rev)
|
|
853
867
|
find_commit_helper.assert_compare(revision=pipeline_1)
|
|
@@ -858,10 +872,42 @@ def test_write_ref(gitaly_comparison, server_repos_root):
|
|
|
858
872
|
old_revision=ZERO_SHA)
|
|
859
873
|
assert_compare_errors(ref=pipeline_1, revision=sha0, old_revision=sha1)
|
|
860
874
|
|
|
875
|
+
# removal
|
|
876
|
+
assert_compare_errors(ref=pipeline_1, revision=ZERO_SHA, old_revision=sha1)
|
|
877
|
+
find_commit_helper.assert_compare(revision=pipeline_1)
|
|
878
|
+
assert_compare(ref=pipeline_1, revision=ZERO_SHA)
|
|
879
|
+
find_commit_helper.assert_compare(revision=pipeline_1)
|
|
880
|
+
# removal of unknown is not an error
|
|
881
|
+
assert_compare(ref=b'refs/merge-requests/unknown', revision=ZERO_SHA)
|
|
882
|
+
|
|
883
|
+
# Default branch
|
|
884
|
+
assert_compare(ref=b'HEAD', revision=other_ref)
|
|
885
|
+
assert find_commit_helper.rpc('hg',
|
|
886
|
+
revision=b'HEAD').commit.id == sha2.decode()
|
|
887
|
+
find_commit_helper.assert_compare(revision=b'HEAD')
|
|
888
|
+
|
|
861
889
|
# old_revision is not honoured for symrefs by Gitaly:
|
|
862
890
|
assert_compare(ref=b'HEAD',
|
|
863
|
-
revision=
|
|
864
|
-
old_revision=b"refs/heads/
|
|
891
|
+
revision=default_ref,
|
|
892
|
+
old_revision=b"refs/heads/something")
|
|
893
|
+
assert find_commit_helper.rpc('hg',
|
|
894
|
+
revision=b'HEAD').commit.id == sha1.decode()
|
|
895
|
+
find_commit_helper.assert_compare(revision=b'HEAD')
|
|
896
|
+
|
|
897
|
+
# keep-arounds
|
|
898
|
+
ka = b'refs/keep-around/' + sha1
|
|
899
|
+
assert_compare(ref=ka, revision=sha1)
|
|
900
|
+
|
|
901
|
+
find_commit_helper.assert_compare(revision=ka)
|
|
902
|
+
assert_compare(ref=ka, revision=sha1) # no error if already there
|
|
903
|
+
|
|
904
|
+
# removal (FindCommit having a shortcut to resolve keep-arounds
|
|
905
|
+
# without reading the file, we check the content directly (Gitaly would
|
|
906
|
+
# return an empty response for this, a very very minor discrepancy that
|
|
907
|
+
# we tolerate).
|
|
908
|
+
assert_compare(ref=ka, revision=ZERO_SHA)
|
|
909
|
+
assert not find_commit_helper.rpc('git', revision=ka).commit.id
|
|
910
|
+
assert not list(iter_keep_arounds(wrapper.repo))
|
|
865
911
|
|
|
866
912
|
# HGitaly is stricter than Gitaly with this (notably keep-arounds
|
|
867
913
|
# consistency checks), and we don't want to downgrade that.
|
hgitaly-18.4.0/hgitaly/VERSION
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
18.4.0
|
|
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
|