hgitaly 2.5.4__tar.gz → 2.6.0__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-2.5.4 → hgitaly-2.6.0}/.hgtags +0 -1
- {hgitaly-2.5.4 → hgitaly-2.6.0}/PKG-INFO +1 -1
- hgitaly-2.6.0/hgitaly/VERSION +1 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/hgitaly/diff.py +20 -47
- {hgitaly-2.5.4 → hgitaly-2.6.0}/hgitaly/message.py +0 -4
- {hgitaly-2.5.4 → hgitaly-2.6.0}/hgitaly/service/diff.py +1 -4
- {hgitaly-2.5.4 → hgitaly-2.6.0}/hgitaly/service/mercurial_operations.py +11 -12
- {hgitaly-2.5.4 → hgitaly-2.6.0}/hgitaly/service/ref.py +3 -95
- {hgitaly-2.5.4 → hgitaly-2.6.0}/hgitaly/service/tests/test_diff.py +1 -46
- {hgitaly-2.5.4 → hgitaly-2.6.0}/hgitaly/service/tests/test_mercurial_operations.py +0 -51
- {hgitaly-2.5.4 → hgitaly-2.6.0}/hgitaly/service/tests/test_ref.py +0 -77
- {hgitaly-2.5.4 → hgitaly-2.6.0}/hgitaly/stub/commit_pb2.py +16 -16
- {hgitaly-2.5.4 → hgitaly-2.6.0}/hgitaly/stub/commit_pb2_grpc.py +2 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/hgitaly/stub/lint_pb2.py +4 -3
- {hgitaly-2.5.4 → hgitaly-2.6.0}/hgitaly/stub/operations_pb2.py +61 -59
- {hgitaly-2.5.4 → hgitaly-2.6.0}/hgitaly/stub/shared_pb2.py +11 -9
- {hgitaly-2.5.4 → hgitaly-2.6.0}/hgitaly/tests/test_messages.py +0 -5
- {hgitaly-2.5.4 → hgitaly-2.6.0}/hgitaly.egg-info/PKG-INFO +1 -1
- {hgitaly-2.5.4 → hgitaly-2.6.0}/hgitaly.egg-info/SOURCES.txt +1 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/protos/commit.proto +4 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/protos/lint.proto +5 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/protos/operations.proto +13 -0
- hgitaly-2.6.0/protos/partition.proto +62 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/protos/shared.proto +6 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/ruby/lib/hgitaly/version.rb +1 -1
- {hgitaly-2.5.4 → hgitaly-2.6.0}/tests_with_gitaly/comparison.py +22 -88
- {hgitaly-2.5.4 → hgitaly-2.6.0}/tests_with_gitaly/test_commit.py +1 -1
- {hgitaly-2.5.4 → hgitaly-2.6.0}/tests_with_gitaly/test_diff.py +2 -26
- {hgitaly-2.5.4 → hgitaly-2.6.0}/tests_with_gitaly/test_operations.py +27 -17
- {hgitaly-2.5.4 → hgitaly-2.6.0}/tests_with_gitaly/test_ref.py +1 -127
- hgitaly-2.5.4/hgitaly/VERSION +0 -1
- {hgitaly-2.5.4 → hgitaly-2.6.0}/.coveragerc +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/.gitlab-ci.yml +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/.hgignore +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/LICENSE +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/MANIFEST.in +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/README.md +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/ci/heptapod-sftp-push +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/ci/heptapod-sign-package +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/ci/heptapod_known_hosts.ssh +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/ci/upload-rhgitaly +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/conftest.py +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/dev-requirements.txt +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/examples/client.py +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/examples/client_list_lcft.py +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/generate-stubs +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/hgext3rd/__init__.py +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/hgext3rd/hgitaly/__init__.py +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/hgext3rd/hgitaly/revset.py +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/hgext3rd/hgitaly/tests/__init__.py +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/hgext3rd/hgitaly/tests/test_revset.py +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/hgext3rd/hgitaly/tests/test_serve.py +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/hgitaly/__init__.py +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/hgitaly/branch.py +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/hgitaly/changelog.py +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/hgitaly/errors.py +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/hgitaly/feature.py +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/hgitaly/file_content.py +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/hgitaly/file_context.py +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/hgitaly/git.py +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/hgitaly/gitlab_ref.py +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/hgitaly/license_detector/GPL-2.sample +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/hgitaly/license_detector/__init__.py +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/hgitaly/license_detector/spdx-licenses.json +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/hgitaly/linguist/__init__.py +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/hgitaly/linguist/languages.json +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/hgitaly/logging.py +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/hgitaly/manifest.py +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/hgitaly/oid.py +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/hgitaly/pagination.py +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/hgitaly/path.py +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/hgitaly/peer.py +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/hgitaly/procutil.py +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/hgitaly/repository.py +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/hgitaly/revision.py +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/hgitaly/revset.py +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/hgitaly/scripts.py +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/hgitaly/server/__init__.py +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/hgitaly/server/address.py +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/hgitaly/server/mono.py +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/hgitaly/server/prefork.py +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/hgitaly/server/tests/__init__.py +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/hgitaly/server/tests/test_address.py +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/hgitaly/server/tests/test_mono.py +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/hgitaly/server/tests/test_prefork.py +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/hgitaly/server/tests/test_worker.py +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/hgitaly/server/worker.py +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/hgitaly/service/__init__.py +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/hgitaly/service/analysis.py +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/hgitaly/service/blob.py +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/hgitaly/service/commit.py +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/hgitaly/service/interceptors.py +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/hgitaly/service/mercurial_changeset.py +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/hgitaly/service/mercurial_repository.py +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/hgitaly/service/operations.py +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/hgitaly/service/repository.py +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/hgitaly/service/server.py +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/hgitaly/service/tests/__init__.py +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/hgitaly/service/tests/fixture.py +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/hgitaly/service/tests/test_analysis.py +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/hgitaly/service/tests/test_blob.py +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/hgitaly/service/tests/test_commit.py +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/hgitaly/service/tests/test_default_branch.py +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/hgitaly/service/tests/test_mercurial_changeset.py +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/hgitaly/service/tests/test_mercurial_repository.py +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/hgitaly/service/tests/test_operations.py +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/hgitaly/service/tests/test_repository_service.py +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/hgitaly/service/tests/test_server.py +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/hgitaly/servicer.py +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/hgitaly/ssh.py +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/hgitaly/stream.py +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/hgitaly/stub/__init__.py +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/hgitaly/stub/analysis_pb2.py +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/hgitaly/stub/analysis_pb2_grpc.py +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/hgitaly/stub/blob_pb2.py +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/hgitaly/stub/blob_pb2_grpc.py +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/hgitaly/stub/diff_pb2.py +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/hgitaly/stub/diff_pb2_grpc.py +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/hgitaly/stub/errors_pb2.py +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/hgitaly/stub/errors_pb2_grpc.py +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/hgitaly/stub/lint_pb2_grpc.py +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/hgitaly/stub/mercurial_changeset_pb2.py +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/hgitaly/stub/mercurial_changeset_pb2_grpc.py +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/hgitaly/stub/mercurial_operations_pb2.py +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/hgitaly/stub/mercurial_operations_pb2_grpc.py +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/hgitaly/stub/mercurial_repository_pb2.py +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/hgitaly/stub/mercurial_repository_pb2_grpc.py +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/hgitaly/stub/operations_pb2_grpc.py +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/hgitaly/stub/ref_pb2.py +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/hgitaly/stub/ref_pb2_grpc.py +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/hgitaly/stub/repository_pb2.py +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/hgitaly/stub/repository_pb2_grpc.py +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/hgitaly/stub/server_pb2.py +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/hgitaly/stub/server_pb2_grpc.py +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/hgitaly/stub/shared_pb2_grpc.py +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/hgitaly/tag.py +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/hgitaly/testing/__init__.py +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/hgitaly/testing/bundle.py +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/hgitaly/testing/context.py +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/hgitaly/testing/data/authorized_keys +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/hgitaly/testing/data/backup_additional_no_git.tar +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/hgitaly/testing/data/id_ecdsa_user +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/hgitaly/testing/data/known_hosts +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/hgitaly/testing/data/ssh_host_ecdsa_key +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/hgitaly/testing/data/ssh_host_ecdsa_key.pub +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/hgitaly/testing/data/sshd_config +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/hgitaly/testing/grpc.py +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/hgitaly/testing/ssh.py +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/hgitaly/testing/sshd.py +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/hgitaly/testing/tests/__init__.py +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/hgitaly/testing/tests/test_sshd.py +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/hgitaly/tests/__init__.py +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/hgitaly/tests/common.py +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/hgitaly/tests/test_branch.py +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/hgitaly/tests/test_diff.py +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/hgitaly/tests/test_errors.py +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/hgitaly/tests/test_feature.py +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/hgitaly/tests/test_file_context.py +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/hgitaly/tests/test_gitlab_ref.py +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/hgitaly/tests/test_license_detector.py +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/hgitaly/tests/test_linguist.py +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/hgitaly/tests/test_manifest.py +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/hgitaly/tests/test_oid.py +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/hgitaly/tests/test_peer.py +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/hgitaly/tests/test_repository.py +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/hgitaly/tests/test_revision.py +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/hgitaly/tests/test_revset.py +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/hgitaly/tests/test_servicer.py +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/hgitaly/tests/test_stream.py +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/hgitaly/tests/test_tag.py +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/hgitaly/tests/test_workdir.py +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/hgitaly/util.py +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/hgitaly/workdir.py +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/hgitaly.egg-info/dependency_links.txt +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/hgitaly.egg-info/entry_points.txt +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/hgitaly.egg-info/requires.txt +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/hgitaly.egg-info/top_level.txt +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/install-requirements.txt +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/lint +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/protos/analysis.proto +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/protos/blob.proto +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/protos/cleanup.proto +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/protos/cluster.proto +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/protos/conflicts.proto +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/protos/diff.proto +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/protos/errors.proto +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/protos/hook.proto +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/protos/internal.proto +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/protos/log.proto +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/protos/mercurial-changeset.proto +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/protos/mercurial-operations.proto +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/protos/mercurial-repository.proto +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/protos/namespace.proto +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/protos/objectpool.proto +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/protos/packfile.proto +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/protos/praefect.proto +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/protos/ref.proto +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/protos/remote.proto +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/protos/repository.proto +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/protos/server.proto +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/protos/service_config.proto +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/protos/smarthttp.proto +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/protos/ssh.proto +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/protos/transaction.proto +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/protos/wiki.proto +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/ruby/.ruby-version +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/ruby/Gemfile +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/ruby/README.md +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/ruby/generate-grpc-lib +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/ruby/hgitaly.gemspec +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/ruby/lib/hgitaly/mercurial-changeset_pb.rb +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/ruby/lib/hgitaly/mercurial-changeset_services_pb.rb +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/ruby/lib/hgitaly/mercurial-operations_pb.rb +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/ruby/lib/hgitaly/mercurial-operations_services_pb.rb +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/ruby/lib/hgitaly/mercurial-repository_pb.rb +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/ruby/lib/hgitaly/mercurial-repository_services_pb.rb +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/ruby/lib/hgitaly.rb +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/ruby/run.rb +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/run-all-tests +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/rust/Cargo.lock +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/rust/Cargo.toml +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/rust/Makefile +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/rust/build-from-tarball.sh +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/rust/check-line-width +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/rust/dependencies/README.md +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/rust/dependencies/mercurial.patch +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/rust/dependencies/proto/google/protobuf/any.proto +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/rust/dependencies/proto/google/protobuf/api.proto +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/rust/dependencies/proto/google/protobuf/compiler/plugin.proto +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/rust/dependencies/proto/google/protobuf/descriptor.proto +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/rust/dependencies/proto/google/protobuf/duration.proto +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/rust/dependencies/proto/google/protobuf/empty.proto +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/rust/dependencies/proto/google/protobuf/field_mask.proto +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/rust/dependencies/proto/google/protobuf/source_context.proto +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/rust/dependencies/proto/google/protobuf/struct.proto +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/rust/dependencies/proto/google/protobuf/timestamp.proto +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/rust/dependencies/proto/google/protobuf/type.proto +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/rust/dependencies/proto/google/protobuf/wrappers.proto +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/rust/go-enry.rev +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/rust/lint +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/rust/mercurial.rev +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/rust/rhgitaly/Cargo.toml +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/rust/rhgitaly/build.rs +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/rust/rhgitaly/clippy.toml +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/rust/rhgitaly/src/config.rs +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/rust/rhgitaly/src/errors.rs +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/rust/rhgitaly/src/generated/README.md +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/rust/rhgitaly/src/git.rs +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/rust/rhgitaly/src/gitlab/mod.rs +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/rust/rhgitaly/src/gitlab/reference.rs +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/rust/rhgitaly/src/gitlab/revision.rs +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/rust/rhgitaly/src/gitlab/state.rs +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/rust/rhgitaly/src/glob.rs +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/rust/rhgitaly/src/lib.rs +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/rust/rhgitaly/src/main.rs +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/rust/rhgitaly/src/mercurial.rs +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/rust/rhgitaly/src/message.rs +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/rust/rhgitaly/src/metadata.rs +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/rust/rhgitaly/src/oid.rs +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/rust/rhgitaly/src/process.rs +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/rust/rhgitaly/src/repository.rs +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/rust/rhgitaly/src/service/analysis.rs +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/rust/rhgitaly/src/service/blob.rs +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/rust/rhgitaly/src/service/commit/find_commits.rs +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/rust/rhgitaly/src/service/commit/get_tree_entries.rs +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/rust/rhgitaly/src/service/commit/last_commits.rs +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/rust/rhgitaly/src/service/commit/mod.rs +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/rust/rhgitaly/src/service/commit/tree_entry.rs +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/rust/rhgitaly/src/service/diff.rs +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/rust/rhgitaly/src/service/mercurial_repository.rs +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/rust/rhgitaly/src/service/mod.rs +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/rust/rhgitaly/src/service/ref.rs +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/rust/rhgitaly/src/service/repository.rs +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/rust/rhgitaly/src/service/server.rs +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/rust/rhgitaly/src/sidecar.rs +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/rust/rhgitaly/src/streaming.rs +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/rust/rhgitaly/src/util.rs +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/rust/rs-enry.rev +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/rust/src-tarball.sh +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/setup.cfg +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/setup.py +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/test-requirements.txt +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/tests_with_gitaly/__init__.py +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/tests_with_gitaly/conftest.py +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/tests_with_gitaly/gitaly.py +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/tests_with_gitaly/hgitaly_rhgitaly_comparison.py +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/tests_with_gitaly/rhgitaly.py +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/tests_with_gitaly/test_blob_tree.py +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/tests_with_gitaly/test_comparison.py +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/tests_with_gitaly/test_gitaly_server.py +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/tests_with_gitaly/test_mercurial_repository.py +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/tests_with_gitaly/test_repository_service.py +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/tests_with_gitaly/test_rhgitaly_server.py +0 -0
- {hgitaly-2.5.4 → hgitaly-2.6.0}/tests_with_gitaly/test_server.py +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
2.6.0
|
|
@@ -46,19 +46,17 @@ Status_Type_Map = dict(
|
|
|
46
46
|
added=ChangedPaths.Status.ADDED,
|
|
47
47
|
modified=ChangedPaths.Status.MODIFIED,
|
|
48
48
|
removed=ChangedPaths.Status.DELETED,
|
|
49
|
-
renamed=ChangedPaths.Status.RENAMED,
|
|
50
49
|
# Note: Mercurial includes TYPE_CHANGE
|
|
51
50
|
# (symlink, regular file, submodule...etc) in MODIFIED status
|
|
52
51
|
)
|
|
53
52
|
"""Mapping status object attributes to ChangedPaths enum."""
|
|
54
53
|
|
|
55
54
|
COPIED = ChangedPaths.Status.COPIED
|
|
56
|
-
RENAMED = ChangedPaths.Status.RENAMED
|
|
57
55
|
DIFF_HUNKS_START_RX = re.compile(rb'^(--- )|^(Binary file)')
|
|
58
56
|
"""To match the header line right before hunks start getting dumped."""
|
|
59
57
|
|
|
60
58
|
|
|
61
|
-
def changed_paths(repo, from_ctx, to_ctx, base_path
|
|
59
|
+
def changed_paths(repo, from_ctx, to_ctx, base_path):
|
|
62
60
|
if base_path is None:
|
|
63
61
|
matcher = None
|
|
64
62
|
path_trim_at = 0
|
|
@@ -76,33 +74,26 @@ def changed_paths(repo, from_ctx, to_ctx, base_path, find_renames=False):
|
|
|
76
74
|
patterns=[b'path:' + base_path])
|
|
77
75
|
path_trim_at = len(base_path) + 1
|
|
78
76
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
77
|
+
copied = list(copy_changed_paths(
|
|
78
|
+
from_ctx,
|
|
79
|
+
to_ctx,
|
|
80
|
+
copies.pathcopies(from_ctx, to_ctx, match=matcher),
|
|
81
|
+
trim_at=path_trim_at))
|
|
82
|
+
copied_paths = set(cp.path for cp in copied)
|
|
82
83
|
|
|
83
84
|
status = from_ctx.status(to_ctx, match=matcher)
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
def status_changed_paths(from_ctx, to_ctx, status, copy_info,
|
|
95
|
-
find_renames=False, trim_at=0):
|
|
96
|
-
rcopy_info = {v: k for k, v in copy_info.items()}
|
|
85
|
+
for path in status_changed_paths(from_ctx, to_ctx, status,
|
|
86
|
+
trim_at=path_trim_at):
|
|
87
|
+
if path.path not in copied_paths:
|
|
88
|
+
yield path
|
|
89
|
+
|
|
90
|
+
yield from iter(copied)
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
def status_changed_paths(from_ctx, to_ctx, status, trim_at=0):
|
|
97
94
|
"""Return ChangedPaths from Mercurial status object"""
|
|
98
95
|
for stype in ['added', 'modified', 'removed']:
|
|
99
96
|
for path in status.__getattribute__(stype):
|
|
100
|
-
copied_from = copy_info.get(path)
|
|
101
|
-
if copied_from is not None:
|
|
102
|
-
if copied_from not in status.removed or find_renames:
|
|
103
|
-
continue
|
|
104
|
-
|
|
105
|
-
old_path = b''
|
|
106
97
|
if stype == 'added':
|
|
107
98
|
old_mode = OBJECT_MODE_DOES_NOT_EXIST
|
|
108
99
|
old_blob_id = NULL_BLOB_OID
|
|
@@ -111,21 +102,8 @@ def status_changed_paths(from_ctx, to_ctx, status, copy_info,
|
|
|
111
102
|
old_blob_id = ctx_blob_oid(from_ctx, path)
|
|
112
103
|
|
|
113
104
|
if stype == 'removed':
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
new_mode = OBJECT_MODE_DOES_NOT_EXIST
|
|
117
|
-
new_blob_id = NULL_BLOB_OID
|
|
118
|
-
else:
|
|
119
|
-
del copy_info[new_path]
|
|
120
|
-
if find_renames:
|
|
121
|
-
stype = 'renamed'
|
|
122
|
-
old_path = path
|
|
123
|
-
path = new_path
|
|
124
|
-
new_mode = git_perms(to_ctx.filectx(new_path))
|
|
125
|
-
new_blob_id = ctx_blob_oid(to_ctx, new_path)
|
|
126
|
-
else:
|
|
127
|
-
new_mode = OBJECT_MODE_DOES_NOT_EXIST
|
|
128
|
-
new_blob_id = NULL_BLOB_OID
|
|
105
|
+
new_mode = OBJECT_MODE_DOES_NOT_EXIST
|
|
106
|
+
new_blob_id = NULL_BLOB_OID
|
|
129
107
|
else:
|
|
130
108
|
new_mode = git_perms(to_ctx.filectx(path))
|
|
131
109
|
new_blob_id = ctx_blob_oid(to_ctx, path)
|
|
@@ -136,13 +114,11 @@ def status_changed_paths(from_ctx, to_ctx, status, copy_info,
|
|
|
136
114
|
new_mode=new_mode,
|
|
137
115
|
old_blob_id=old_blob_id,
|
|
138
116
|
new_blob_id=new_blob_id,
|
|
139
|
-
old_path=old_path,
|
|
140
117
|
status=Status_Type_Map[stype]
|
|
141
118
|
)
|
|
142
119
|
|
|
143
120
|
|
|
144
|
-
def copy_changed_paths(from_ctx, to_ctx, path_copies,
|
|
145
|
-
trim_at=0, find_renames=False):
|
|
121
|
+
def copy_changed_paths(from_ctx, to_ctx, path_copies, trim_at=0):
|
|
146
122
|
"""Return ChangedPaths for the given paths, relative to base_path.
|
|
147
123
|
|
|
148
124
|
Given that Gitaly currently (gitaly@c54d613d0) does not pass
|
|
@@ -153,11 +129,8 @@ def copy_changed_paths(from_ctx, to_ctx, path_copies,
|
|
|
153
129
|
for target, source in path_copies.items():
|
|
154
130
|
yield ChangedPaths(path=target[trim_at:],
|
|
155
131
|
status=COPIED,
|
|
156
|
-
old_mode=git_perms(
|
|
157
|
-
old_blob_id=ctx_blob_oid(from_ctx, source),
|
|
132
|
+
old_mode=git_perms(to_ctx.filectx(source)),
|
|
158
133
|
new_mode=git_perms(to_ctx.filectx(target)),
|
|
159
|
-
new_blob_id=ctx_blob_oid(to_ctx, target),
|
|
160
|
-
old_path=source[trim_at:],
|
|
161
134
|
)
|
|
162
135
|
|
|
163
136
|
|
|
@@ -521,11 +521,8 @@ class DiffServicer(DiffServiceServicer, HGitalyServicer):
|
|
|
521
521
|
for cp in cids_paths]
|
|
522
522
|
extracted.append((left_ctx, right_ctx, path))
|
|
523
523
|
|
|
524
|
-
find_renames = request.find_renames
|
|
525
524
|
for paths in chunked(path for extr in extracted
|
|
526
|
-
for path in changed_paths(
|
|
527
|
-
repo, *extr,
|
|
528
|
-
find_renames=find_renames)):
|
|
525
|
+
for path in changed_paths(repo, *extr)):
|
|
529
526
|
yield FindChangedPathsResponse(paths=paths)
|
|
530
527
|
|
|
531
528
|
def GetPatchID(self, request: GetPatchIDRequest,
|
|
@@ -285,19 +285,18 @@ class MercurialOperationsServicer(MercurialOperationsServiceServicer,
|
|
|
285
285
|
new_oid=current_head_id,
|
|
286
286
|
)))
|
|
287
287
|
|
|
288
|
-
|
|
289
|
-
linear = ancestor(to_merge, current_head) == current_head.rev()
|
|
290
|
-
if same_branch and linear and not request.semi_linear:
|
|
288
|
+
if ancestor(to_merge, current_head) == current_head.rev():
|
|
291
289
|
# fast-forwardable!
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
290
|
+
if not request.semi_linear:
|
|
291
|
+
logger.info("This is actually a fast-forward, all checks "
|
|
292
|
+
"passed, now publishing %r, mirroring to Git=%r",
|
|
293
|
+
to_merge, with_hg_git)
|
|
294
|
+
self.publish(to_merge, context)
|
|
295
|
+
return MergeBranchResponse(
|
|
296
|
+
branch_update=OperationBranchUpdate(
|
|
297
|
+
commit_id=to_merge.hex().decode('ascii'),
|
|
298
|
+
))
|
|
299
|
+
elif request.semi_linear:
|
|
301
300
|
structured_abort(
|
|
302
301
|
context, StatusCode.FAILED_PRECONDITION,
|
|
303
302
|
"Not fast-forwardable",
|
|
@@ -28,8 +28,6 @@ from hgext3rd.heptapod.special_ref import (
|
|
|
28
28
|
)
|
|
29
29
|
from hgext3rd.heptapod.keep_around import (
|
|
30
30
|
parse_keep_around_ref,
|
|
31
|
-
iter_keep_arounds,
|
|
32
|
-
init_keep_arounds,
|
|
33
31
|
)
|
|
34
32
|
|
|
35
33
|
from ..errors import (
|
|
@@ -42,8 +40,6 @@ from ..pagination import (
|
|
|
42
40
|
)
|
|
43
41
|
from ..revision import (
|
|
44
42
|
CHANGESET_HASH_BYTES_REGEXP,
|
|
45
|
-
ZERO_SHA,
|
|
46
|
-
ZERO_SHA_STR,
|
|
47
43
|
gitlab_revision_hash,
|
|
48
44
|
)
|
|
49
45
|
from ..stream import (
|
|
@@ -55,7 +51,6 @@ from ..stub.shared_pb2 import (
|
|
|
55
51
|
)
|
|
56
52
|
from ..stub.errors_pb2 import (
|
|
57
53
|
ReferenceNotFoundError,
|
|
58
|
-
ReferenceStateMismatchError,
|
|
59
54
|
)
|
|
60
55
|
from ..stub.ref_pb2 import (
|
|
61
56
|
FindDefaultBranchNameRequest,
|
|
@@ -79,9 +74,6 @@ from ..stub.ref_pb2 import (
|
|
|
79
74
|
FindBranchResponse,
|
|
80
75
|
DeleteRefsRequest,
|
|
81
76
|
DeleteRefsResponse,
|
|
82
|
-
UpdateReferencesError,
|
|
83
|
-
UpdateReferencesRequest,
|
|
84
|
-
UpdateReferencesResponse,
|
|
85
77
|
ListBranchNamesContainingCommitRequest,
|
|
86
78
|
ListBranchNamesContainingCommitResponse,
|
|
87
79
|
ListTagNamesContainingCommitRequest,
|
|
@@ -95,6 +87,9 @@ from ..stub.ref_pb2 import (
|
|
|
95
87
|
)
|
|
96
88
|
from ..stub.ref_pb2_grpc import RefServiceServicer
|
|
97
89
|
|
|
90
|
+
from ..revision import (
|
|
91
|
+
ZERO_SHA_STR,
|
|
92
|
+
)
|
|
98
93
|
from ..branch import (
|
|
99
94
|
BranchSortBy,
|
|
100
95
|
gitlab_branch_head,
|
|
@@ -278,93 +273,6 @@ class RefServicer(RefServiceServicer, HGitalyServicer):
|
|
|
278
273
|
return FindBranchResponse(
|
|
279
274
|
branch=Branch(name=name, target_commit=message.commit(head)))
|
|
280
275
|
|
|
281
|
-
def UpdateReferences(self,
|
|
282
|
-
request: UpdateReferencesRequest,
|
|
283
|
-
context) -> UpdateReferencesResponse:
|
|
284
|
-
self.STATUS_CODE_STORAGE_NOT_FOUND = StatusCode.INVALID_ARGUMENT
|
|
285
|
-
first = True
|
|
286
|
-
special_changes = []
|
|
287
|
-
ka_changes = []
|
|
288
|
-
for req in request:
|
|
289
|
-
if first:
|
|
290
|
-
# blobs are given by oid, hence as in direct changeset Node
|
|
291
|
-
# IDs, the unfiltered repo is the right one for the task
|
|
292
|
-
repo = self.load_repo(req.repository, context).unfiltered()
|
|
293
|
-
first = False
|
|
294
|
-
|
|
295
|
-
for upd in req.updates:
|
|
296
|
-
if len(upd.new_object_id) != 40:
|
|
297
|
-
oid = upd.new_object_id.decode('ascii', 'replace')
|
|
298
|
-
context.abort(StatusCode.INVALID_ARGUMENT,
|
|
299
|
-
"validating new object ID: "
|
|
300
|
-
f'invalid object ID: "{oid}", '
|
|
301
|
-
f"expected length 40, got {len(oid)}")
|
|
302
|
-
|
|
303
|
-
ref_path = upd.reference
|
|
304
|
-
change = (upd.old_object_id, upd.new_object_id)
|
|
305
|
-
if change[0] == change[1]:
|
|
306
|
-
# let's not waste resources for this
|
|
307
|
-
continue
|
|
308
|
-
|
|
309
|
-
# consider only special refs and keep-arounds, as other refs
|
|
310
|
-
# (branches and tags) are only reflecting changesets content,
|
|
311
|
-
# setting them independently makes no sense with Mercurial
|
|
312
|
-
special_ref = parse_special_ref(ref_path)
|
|
313
|
-
if special_ref is not None:
|
|
314
|
-
special_changes.append((special_ref, change))
|
|
315
|
-
continue
|
|
316
|
-
|
|
317
|
-
ka = parse_keep_around_ref(upd.reference)
|
|
318
|
-
if ka is not None:
|
|
319
|
-
if (
|
|
320
|
-
upd.new_object_id != ZERO_SHA
|
|
321
|
-
and ka != upd.new_object_id
|
|
322
|
-
):
|
|
323
|
-
context.abort(StatusCode.INVALID_ARGUMENT,
|
|
324
|
-
"Inconsistent keep-around.")
|
|
325
|
-
ka_changes.append(change)
|
|
326
|
-
|
|
327
|
-
with repo.lock():
|
|
328
|
-
# keeping promise of atomicity of this method
|
|
329
|
-
special_existing = special_refs(repo)
|
|
330
|
-
if special_existing is GITLAB_TYPED_REFS_MISSING:
|
|
331
|
-
special_existing = {}
|
|
332
|
-
for name, (old_id, new_id) in special_changes:
|
|
333
|
-
existing = special_existing.get(name)
|
|
334
|
-
if old_id == ZERO_SHA and existing is not None:
|
|
335
|
-
context.abort(StatusCode.INTERNAL,
|
|
336
|
-
"committing update: "
|
|
337
|
-
"reference already exists")
|
|
338
|
-
elif old_id and old_id != ZERO_SHA and existing != old_id:
|
|
339
|
-
Mismatch = ReferenceStateMismatchError # just too long!
|
|
340
|
-
structured_abort(
|
|
341
|
-
context, StatusCode.ABORTED,
|
|
342
|
-
"reference does not point to expected object",
|
|
343
|
-
UpdateReferencesError(
|
|
344
|
-
reference_state_mismatch=Mismatch(
|
|
345
|
-
reference_name=b'refs/' + name,
|
|
346
|
-
expected_object_id=old_id,
|
|
347
|
-
actual_object_id=existing)))
|
|
348
|
-
elif new_id == ZERO_SHA:
|
|
349
|
-
del special_existing[name]
|
|
350
|
-
else:
|
|
351
|
-
special_existing[name] = new_id
|
|
352
|
-
|
|
353
|
-
# TODO make a collect_keep_arounds() or keep_arounds_set()
|
|
354
|
-
ka_existing = set(iter_keep_arounds(repo))
|
|
355
|
-
ka_existing.discard(GITLAB_TYPED_REFS_MISSING)
|
|
356
|
-
for old_id, new_id in ka_changes:
|
|
357
|
-
# bogus requests have already been prohibited
|
|
358
|
-
if new_id == ZERO_SHA:
|
|
359
|
-
ka_existing.discard(old_id)
|
|
360
|
-
else:
|
|
361
|
-
ka_existing.add(new_id)
|
|
362
|
-
|
|
363
|
-
write_special_refs(repo, special_existing)
|
|
364
|
-
init_keep_arounds(repo, ka_existing)
|
|
365
|
-
|
|
366
|
-
return UpdateReferencesResponse()
|
|
367
|
-
|
|
368
276
|
def DeleteRefs(self,
|
|
369
277
|
request: DeleteRefsRequest,
|
|
370
278
|
context) -> DeleteRefsResponse:
|
|
@@ -127,7 +127,7 @@ class DiffFixture(ServiceFixture):
|
|
|
127
127
|
(changed.status, perm_change))
|
|
128
128
|
return by_file
|
|
129
129
|
|
|
130
|
-
def find_changed_paths_commits(self, commits, compare_to=()
|
|
130
|
+
def find_changed_paths_commits(self, commits, compare_to=()):
|
|
131
131
|
"""Wrap FindChangedPaths used with CommitRequest.
|
|
132
132
|
|
|
133
133
|
:param compare_to: if given, will be used in all requests, hoping
|
|
@@ -141,7 +141,6 @@ class DiffFixture(ServiceFixture):
|
|
|
141
141
|
commit_revision=c,
|
|
142
142
|
parent_commit_revisions=compare_to))
|
|
143
143
|
for c in commits],
|
|
144
|
-
**kw
|
|
145
144
|
)
|
|
146
145
|
|
|
147
146
|
def find_changed_paths_tree(self, left_oid, right_oid):
|
|
@@ -687,50 +686,6 @@ def test_find_changed_paths_copy_in_tree(diff_fixture):
|
|
|
687
686
|
}
|
|
688
687
|
|
|
689
688
|
|
|
690
|
-
def test_find_changed_paths_rename(diff_fixture):
|
|
691
|
-
wrapper = diff_fixture.repo_wrapper
|
|
692
|
-
|
|
693
|
-
(wrapper.path / 'subdir').mkdir() # avoid all lengths to be 3
|
|
694
|
-
(wrapper.path / 'subdir/bar').write_text('some bar')
|
|
695
|
-
ctx0 = wrapper.commit(rel_paths=['subdir'], add_remove=True)
|
|
696
|
-
|
|
697
|
-
wrapper.command(b'mv', wrapper.repo.root + b'/subdir/bar',
|
|
698
|
-
wrapper.repo.root + b'/subdir/baz')
|
|
699
|
-
ctx1 = wrapper.commit(rel_paths=['subdir'])
|
|
700
|
-
|
|
701
|
-
repo = wrapper.repo
|
|
702
|
-
|
|
703
|
-
sub0_oid, sub1_oid = [tree_oid(repo, ctx.hex().decode('ascii'), b'subdir')
|
|
704
|
-
for ctx in (ctx0, ctx1)]
|
|
705
|
-
ret = diff_fixture.find_changed_paths_commits(
|
|
706
|
-
[ctx1.hex()],
|
|
707
|
-
compare_to=[ctx0.hex()],
|
|
708
|
-
find_renames=False,
|
|
709
|
-
)
|
|
710
|
-
assert ret == {
|
|
711
|
-
b'subdir/baz': [(ChangedPaths.Status.ADDED,
|
|
712
|
-
(OBJECT_MODE_DOES_NOT_EXIST,
|
|
713
|
-
OBJECT_MODE_NON_EXECUTABLE),
|
|
714
|
-
)],
|
|
715
|
-
b'subdir/bar': [(ChangedPaths.Status.DELETED,
|
|
716
|
-
(OBJECT_MODE_NON_EXECUTABLE,
|
|
717
|
-
OBJECT_MODE_DOES_NOT_EXIST)
|
|
718
|
-
)],
|
|
719
|
-
}
|
|
720
|
-
|
|
721
|
-
ret = diff_fixture.find_changed_paths_commits(
|
|
722
|
-
[ctx1.hex()],
|
|
723
|
-
compare_to=[ctx0.hex()],
|
|
724
|
-
find_renames=True,
|
|
725
|
-
)
|
|
726
|
-
assert ret == {
|
|
727
|
-
b'subdir/baz': [(ChangedPaths.Status.RENAMED, None)],
|
|
728
|
-
}
|
|
729
|
-
|
|
730
|
-
# TODO test the case of rename with duplication:
|
|
731
|
-
# hg cp foo bar; hg mv foo bar2
|
|
732
|
-
|
|
733
|
-
|
|
734
689
|
def test_get_patch_id(diff_fixture):
|
|
735
690
|
wrapper = diff_fixture.repo_wrapper
|
|
736
691
|
patch_id = diff_fixture.get_patch_id
|
|
@@ -22,7 +22,6 @@ from hgext3rd.heptapod.branch import (
|
|
|
22
22
|
)
|
|
23
23
|
from heptapod.testhelpers.git import GitRepo
|
|
24
24
|
|
|
25
|
-
from hgitaly.changelog import ancestor
|
|
26
25
|
from hgitaly.errors import (
|
|
27
26
|
parse_assert_structured_error,
|
|
28
27
|
)
|
|
@@ -460,56 +459,6 @@ def test_merge_branch(operations_fixture, project_mode):
|
|
|
460
459
|
assert conflict_error.conflicting_files == [b'foo']
|
|
461
460
|
|
|
462
461
|
|
|
463
|
-
@parametrize('project_mode', ('hg-git-project',
|
|
464
|
-
'native-project-without-git',
|
|
465
|
-
'native-project-with-git',
|
|
466
|
-
))
|
|
467
|
-
@parametrize('semi_lin_req', ('semi_linear_req', 'classical_req'))
|
|
468
|
-
def test_merge_linear_named_branch(operations_fixture,
|
|
469
|
-
project_mode,
|
|
470
|
-
semi_lin_req):
|
|
471
|
-
fixture = operations_fixture
|
|
472
|
-
merge = fixture.merge_branch
|
|
473
|
-
|
|
474
|
-
fixture.hg_native = project_mode != 'hg-git-project'
|
|
475
|
-
if fixture.hg_native:
|
|
476
|
-
fixture.with_hg_git_mirroring = (
|
|
477
|
-
project_mode == 'native-project-with-git'
|
|
478
|
-
)
|
|
479
|
-
wrapper = fixture.repo_wrapper
|
|
480
|
-
|
|
481
|
-
gl_branch = b'branch/default'
|
|
482
|
-
|
|
483
|
-
# because of the config set by fixture, this leads in all cases to
|
|
484
|
-
# creation of a Git repo and its `branch/default` Git branch
|
|
485
|
-
ctx0 = wrapper.commit_file('foo')
|
|
486
|
-
|
|
487
|
-
linear_branch = b'linear'
|
|
488
|
-
linear_branch_ctx = wrapper.commit_file('foolin',
|
|
489
|
-
branch=linear_branch,
|
|
490
|
-
parent=ctx0)
|
|
491
|
-
# just checking what we just did
|
|
492
|
-
assert ancestor(linear_branch_ctx, ctx0) == ctx0.rev()
|
|
493
|
-
|
|
494
|
-
merge_msg = b"Actual merge for a named branch that makes linear history"
|
|
495
|
-
resp = merge(branch=gl_branch,
|
|
496
|
-
commit_id=linear_branch_ctx.hex().decode('ascii'),
|
|
497
|
-
semi_linear=semi_lin_req == 'semi_linear_req',
|
|
498
|
-
hg_perms=PUBLISH_PERM,
|
|
499
|
-
message=merge_msg)
|
|
500
|
-
wrapper.reload()
|
|
501
|
-
|
|
502
|
-
merge_sha = resp.branch_update.commit_id
|
|
503
|
-
assert merge_sha
|
|
504
|
-
merge_changeset = wrapper.repo[merge_sha.encode()]
|
|
505
|
-
assert merge_changeset.branch() == b'default'
|
|
506
|
-
assert merge_changeset.phase() == phases.public
|
|
507
|
-
assert gitlab_branches(wrapper.repo)[gl_branch] == merge_changeset.hex()
|
|
508
|
-
assert merge_changeset.p1().hex() == ctx0.hex()
|
|
509
|
-
assert merge_changeset.p2().hex() == linear_branch_ctx.hex()
|
|
510
|
-
assert merge_changeset.description() == merge_msg
|
|
511
|
-
|
|
512
|
-
|
|
513
462
|
@parametrize('project_mode', ('hg-git-project',
|
|
514
463
|
'native-project-without-git',
|
|
515
464
|
'native-project-with-git',
|
|
@@ -30,7 +30,6 @@ from hgext3rd.heptapod.keep_around import (
|
|
|
30
30
|
from hgitaly import feature
|
|
31
31
|
from hgitaly.errors import parse_assert_structured_error
|
|
32
32
|
from hgitaly.revision import (
|
|
33
|
-
ZERO_SHA,
|
|
34
33
|
ZERO_SHA_STR,
|
|
35
34
|
)
|
|
36
35
|
from hgitaly.tests.common import (
|
|
@@ -57,7 +56,6 @@ from hgitaly.stub.ref_pb2 import (
|
|
|
57
56
|
FindRefsByOIDRequest,
|
|
58
57
|
FindTagError,
|
|
59
58
|
FindTagRequest,
|
|
60
|
-
UpdateReferencesRequest,
|
|
61
59
|
)
|
|
62
60
|
from hgitaly.stub.ref_pb2_grpc import RefServiceStub
|
|
63
61
|
|
|
@@ -87,10 +85,6 @@ class RefFixture(ServiceFixture):
|
|
|
87
85
|
metadata=feature.as_grpc_metadata(self.feature_flags),
|
|
88
86
|
)
|
|
89
87
|
|
|
90
|
-
def ref_exists(self, ref, **kw):
|
|
91
|
-
kw.setdefault('repository', self.grpc_repo)
|
|
92
|
-
return self.stub.RefExists(RefExistsRequest(ref=ref, **kw)).value
|
|
93
|
-
|
|
94
88
|
def list_refs(self, patterns=(b"refs/", ), **kw):
|
|
95
89
|
return [(ref.name, ref.target)
|
|
96
90
|
for resp in self.stub.ListRefs(
|
|
@@ -103,22 +97,6 @@ class RefFixture(ServiceFixture):
|
|
|
103
97
|
kw.setdefault('repository', self.grpc_repo)
|
|
104
98
|
return self.stub.FindRefsByOID(FindRefsByOIDRequest(**kw)).refs
|
|
105
99
|
|
|
106
|
-
def update_refs(self, updates, **kw):
|
|
107
|
-
Update = UpdateReferencesRequest.Update
|
|
108
|
-
kw.setdefault('repository', self.grpc_repo)
|
|
109
|
-
|
|
110
|
-
update_messages = []
|
|
111
|
-
for ref_path, old_id, new_id in updates:
|
|
112
|
-
upd_kw = dict(reference=ref_path, new_object_id=new_id)
|
|
113
|
-
if old_id is not None:
|
|
114
|
-
upd_kw['old_object_id'] = old_id
|
|
115
|
-
update_messages.append(Update(**upd_kw))
|
|
116
|
-
|
|
117
|
-
return self.stub.UpdateReferences(
|
|
118
|
-
iter([UpdateReferencesRequest(updates=[upd], **kw)
|
|
119
|
-
for upd in update_messages])
|
|
120
|
-
)
|
|
121
|
-
|
|
122
100
|
|
|
123
101
|
@pytest.fixture
|
|
124
102
|
def ref_fixture(grpc_channel, server_repos_root):
|
|
@@ -655,58 +633,3 @@ def test_list_refs(ref_fixture):
|
|
|
655
633
|
assert fixture.find_refs_by_oid(
|
|
656
634
|
oid=sha1, sort_field='refname', limit=1
|
|
657
635
|
) == ['refs/heads/branch/default']
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
def test_update_references(ref_fixture):
|
|
661
|
-
fixture = ref_fixture
|
|
662
|
-
wrapper = fixture.repo_wrapper
|
|
663
|
-
|
|
664
|
-
sha0 = wrapper.write_commit('afoo', message="Some foo").hex()
|
|
665
|
-
sha1 = wrapper.write_commit('afoo', message="Some foo").hex()
|
|
666
|
-
|
|
667
|
-
pipeline_1 = b'refs/pipelines/1'
|
|
668
|
-
ka_0 = b'refs/keep-around/' + sha0
|
|
669
|
-
fixture.update_refs([(pipeline_1, ZERO_SHA, sha1),
|
|
670
|
-
(ka_0, ZERO_SHA, sha0),
|
|
671
|
-
])
|
|
672
|
-
assert fixture.ref_exists(ka_0)
|
|
673
|
-
assert fixture.ref_exists(pipeline_1)
|
|
674
|
-
assert fixture.list_refs(patterns=[b'refs/pipelines/']) == [
|
|
675
|
-
(pipeline_1, sha1.decode())
|
|
676
|
-
]
|
|
677
|
-
|
|
678
|
-
fixture.update_refs([(pipeline_1, sha1, sha0),
|
|
679
|
-
(ka_0, sha0, ZERO_SHA),
|
|
680
|
-
])
|
|
681
|
-
assert not fixture.ref_exists(ka_0)
|
|
682
|
-
assert fixture.list_refs(patterns=[b'refs/pipelines/']) == [
|
|
683
|
-
(pipeline_1, sha0.decode())
|
|
684
|
-
]
|
|
685
|
-
|
|
686
|
-
# edge case equivalent to no-op
|
|
687
|
-
fixture.update_refs([(pipeline_1, sha0, sha0)])
|
|
688
|
-
assert fixture.list_refs(patterns=[b'refs/pipelines/']) == [
|
|
689
|
-
(pipeline_1, sha0.decode())
|
|
690
|
-
]
|
|
691
|
-
|
|
692
|
-
# error cases
|
|
693
|
-
with pytest.raises(grpc.RpcError) as exc_info:
|
|
694
|
-
fixture.update_refs([(pipeline_1, None, b'branch/default')])
|
|
695
|
-
assert exc_info.value.code() == grpc.StatusCode.INVALID_ARGUMENT
|
|
696
|
-
|
|
697
|
-
with pytest.raises(grpc.RpcError) as exc_info:
|
|
698
|
-
fixture.update_refs([(ka_0, None, sha1)])
|
|
699
|
-
assert exc_info.value.code() == grpc.StatusCode.INVALID_ARGUMENT
|
|
700
|
-
|
|
701
|
-
with pytest.raises(grpc.RpcError) as exc_info:
|
|
702
|
-
fixture.update_refs([(pipeline_1, ZERO_SHA, sha1)])
|
|
703
|
-
assert exc_info.value.code() == grpc.StatusCode.INTERNAL
|
|
704
|
-
assert 'reference already exists' in exc_info.value.details()
|
|
705
|
-
|
|
706
|
-
with pytest.raises(grpc.RpcError) as exc_info:
|
|
707
|
-
fixture.update_refs([(pipeline_1, sha1, sha0)])
|
|
708
|
-
assert exc_info.value.code() == grpc.StatusCode.ABORTED
|
|
709
|
-
|
|
710
|
-
# deletions
|
|
711
|
-
fixture.update_refs([(pipeline_1, sha0, ZERO_SHA)])
|
|
712
|
-
assert not fixture.ref_exists(pipeline_1)
|