hgitaly 18.6.1__tar.gz → 18.7.0a0__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.
Files changed (178) hide show
  1. {hgitaly-18.6.1/hgitaly.egg-info → hgitaly-18.7.0a0}/PKG-INFO +11 -6
  2. {hgitaly-18.6.1 → hgitaly-18.7.0a0}/README.md +9 -4
  3. {hgitaly-18.6.1/tests_with_gitaly → hgitaly-18.7.0a0/functional_tests}/rhgitaly.py +8 -1
  4. {hgitaly-18.6.1/tests_with_gitaly → hgitaly-18.7.0a0/functional_tests}/test_commit.py +10 -25
  5. {hgitaly-18.6.1 → hgitaly-18.7.0a0}/hgext3rd/hgitaly/__init__.py +2 -13
  6. {hgitaly-18.6.1 → hgitaly-18.7.0a0}/hgext3rd/hgitaly/tests/test_serve.py +0 -31
  7. hgitaly-18.7.0a0/hgitaly/VERSION +1 -0
  8. hgitaly-18.7.0a0/hgitaly/git.py +34 -0
  9. {hgitaly-18.6.1 → hgitaly-18.7.0a0}/hgitaly/message.py +0 -11
  10. {hgitaly-18.6.1 → hgitaly-18.7.0a0}/hgitaly/procutil.py +2 -10
  11. {hgitaly-18.6.1 → hgitaly-18.7.0a0}/hgitaly/server/__init__.py +6 -3
  12. {hgitaly-18.6.1 → hgitaly-18.7.0a0}/hgitaly/server/worker.py +1 -1
  13. {hgitaly-18.6.1 → hgitaly-18.7.0a0}/hgitaly/service/commit.py +9 -225
  14. {hgitaly-18.6.1 → hgitaly-18.7.0a0}/hgitaly/service/tests/test_commit.py +18 -292
  15. hgitaly-18.7.0a0/hgitaly/stub/commit_pb2.py +265 -0
  16. {hgitaly-18.6.1 → hgitaly-18.7.0a0}/hgitaly/stub/operations_pb2.py +52 -52
  17. {hgitaly-18.6.1 → hgitaly-18.7.0a0}/hgitaly/tests/test_workdir.py +18 -0
  18. {hgitaly-18.6.1 → hgitaly-18.7.0a0/hgitaly.egg-info}/PKG-INFO +11 -6
  19. {hgitaly-18.6.1 → hgitaly-18.7.0a0}/hgitaly.egg-info/SOURCES.txt +21 -23
  20. {hgitaly-18.6.1 → hgitaly-18.7.0a0}/hgitaly.egg-info/requires.txt +1 -1
  21. hgitaly-18.7.0a0/hgitaly.egg-info/top_level.txt +3 -0
  22. {hgitaly-18.6.1 → hgitaly-18.7.0a0}/install-requirements.txt +1 -1
  23. hgitaly-18.6.1/hgitaly/VERSION +0 -1
  24. hgitaly-18.6.1/hgitaly/git.py +0 -137
  25. hgitaly-18.6.1/hgitaly/server/prefork.py +0 -215
  26. hgitaly-18.6.1/hgitaly/server/tests/test_prefork.py +0 -288
  27. hgitaly-18.6.1/hgitaly/stub/commit_pb2.py +0 -265
  28. hgitaly-18.6.1/hgitaly.egg-info/top_level.txt +0 -3
  29. {hgitaly-18.6.1 → hgitaly-18.7.0a0}/LICENSE +0 -0
  30. {hgitaly-18.6.1 → hgitaly-18.7.0a0}/MANIFEST.in +0 -0
  31. {hgitaly-18.6.1/tests_with_gitaly → hgitaly-18.7.0a0/functional_tests}/__init__.py +0 -0
  32. {hgitaly-18.6.1/tests_with_gitaly → hgitaly-18.7.0a0/functional_tests}/comparison.py +0 -0
  33. {hgitaly-18.6.1/tests_with_gitaly → hgitaly-18.7.0a0/functional_tests}/conftest.py +0 -0
  34. {hgitaly-18.6.1/tests_with_gitaly → hgitaly-18.7.0a0/functional_tests}/gitaly.py +0 -0
  35. {hgitaly-18.6.1/tests_with_gitaly → hgitaly-18.7.0a0/functional_tests}/hgitaly_rhgitaly_comparison.py +0 -0
  36. {hgitaly-18.6.1/tests_with_gitaly → hgitaly-18.7.0a0/functional_tests}/test_blob_tree.py +0 -0
  37. {hgitaly-18.6.1/tests_with_gitaly → hgitaly-18.7.0a0/functional_tests}/test_comparison.py +0 -0
  38. {hgitaly-18.6.1/tests_with_gitaly → hgitaly-18.7.0a0/functional_tests}/test_diff.py +0 -0
  39. {hgitaly-18.6.1/tests_with_gitaly → hgitaly-18.7.0a0/functional_tests}/test_gitaly_server.py +0 -0
  40. {hgitaly-18.6.1/tests_with_gitaly → hgitaly-18.7.0a0/functional_tests}/test_mercurial_aux_git.py +0 -0
  41. {hgitaly-18.6.1/tests_with_gitaly → hgitaly-18.7.0a0/functional_tests}/test_mercurial_operations.py +0 -0
  42. {hgitaly-18.6.1/tests_with_gitaly → hgitaly-18.7.0a0/functional_tests}/test_mercurial_repository.py +0 -0
  43. {hgitaly-18.6.1/tests_with_gitaly → hgitaly-18.7.0a0/functional_tests}/test_operations.py +0 -0
  44. {hgitaly-18.6.1/tests_with_gitaly → hgitaly-18.7.0a0/functional_tests}/test_ref.py +0 -0
  45. {hgitaly-18.6.1/tests_with_gitaly → hgitaly-18.7.0a0/functional_tests}/test_remote.py +0 -0
  46. {hgitaly-18.6.1/tests_with_gitaly → hgitaly-18.7.0a0/functional_tests}/test_repository_service.py +0 -0
  47. {hgitaly-18.6.1/tests_with_gitaly → hgitaly-18.7.0a0/functional_tests}/test_rhgitaly_server.py +0 -0
  48. {hgitaly-18.6.1/tests_with_gitaly → hgitaly-18.7.0a0/functional_tests}/test_server.py +0 -0
  49. {hgitaly-18.6.1 → hgitaly-18.7.0a0}/hgext3rd/__init__.py +0 -0
  50. {hgitaly-18.6.1 → hgitaly-18.7.0a0}/hgext3rd/hgitaly/revset.py +0 -0
  51. {hgitaly-18.6.1 → hgitaly-18.7.0a0}/hgext3rd/hgitaly/tests/__init__.py +0 -0
  52. {hgitaly-18.6.1 → hgitaly-18.7.0a0}/hgext3rd/hgitaly/tests/test_revset.py +0 -0
  53. {hgitaly-18.6.1 → hgitaly-18.7.0a0}/hgitaly/__init__.py +0 -0
  54. {hgitaly-18.6.1 → hgitaly-18.7.0a0}/hgitaly/branch.py +0 -0
  55. {hgitaly-18.6.1 → hgitaly-18.7.0a0}/hgitaly/changelog.py +0 -0
  56. {hgitaly-18.6.1 → hgitaly-18.7.0a0}/hgitaly/diff.py +0 -0
  57. {hgitaly-18.6.1 → hgitaly-18.7.0a0}/hgitaly/errors.py +0 -0
  58. {hgitaly-18.6.1 → hgitaly-18.7.0a0}/hgitaly/feature.py +0 -0
  59. {hgitaly-18.6.1 → hgitaly-18.7.0a0}/hgitaly/file_content.py +0 -0
  60. {hgitaly-18.6.1 → hgitaly-18.7.0a0}/hgitaly/file_context.py +0 -0
  61. {hgitaly-18.6.1 → hgitaly-18.7.0a0}/hgitaly/gitlab_ref.py +0 -0
  62. {hgitaly-18.6.1 → hgitaly-18.7.0a0}/hgitaly/identification.py +0 -0
  63. {hgitaly-18.6.1 → hgitaly-18.7.0a0}/hgitaly/logging.py +0 -0
  64. {hgitaly-18.6.1 → hgitaly-18.7.0a0}/hgitaly/manifest.py +0 -0
  65. {hgitaly-18.6.1 → hgitaly-18.7.0a0}/hgitaly/oid.py +0 -0
  66. {hgitaly-18.6.1 → hgitaly-18.7.0a0}/hgitaly/pagination.py +0 -0
  67. {hgitaly-18.6.1 → hgitaly-18.7.0a0}/hgitaly/path.py +0 -0
  68. {hgitaly-18.6.1 → hgitaly-18.7.0a0}/hgitaly/peer.py +0 -0
  69. {hgitaly-18.6.1 → hgitaly-18.7.0a0}/hgitaly/repository.py +0 -0
  70. {hgitaly-18.6.1 → hgitaly-18.7.0a0}/hgitaly/revision.py +0 -0
  71. {hgitaly-18.6.1 → hgitaly-18.7.0a0}/hgitaly/revset.py +0 -0
  72. {hgitaly-18.6.1 → hgitaly-18.7.0a0}/hgitaly/scripts.py +0 -0
  73. {hgitaly-18.6.1 → hgitaly-18.7.0a0}/hgitaly/server/address.py +0 -0
  74. {hgitaly-18.6.1 → hgitaly-18.7.0a0}/hgitaly/server/mono.py +0 -0
  75. {hgitaly-18.6.1 → hgitaly-18.7.0a0}/hgitaly/server/tests/__init__.py +0 -0
  76. {hgitaly-18.6.1 → hgitaly-18.7.0a0}/hgitaly/server/tests/test_address.py +0 -0
  77. {hgitaly-18.6.1 → hgitaly-18.7.0a0}/hgitaly/server/tests/test_mono.py +0 -0
  78. {hgitaly-18.6.1 → hgitaly-18.7.0a0}/hgitaly/server/tests/test_worker.py +0 -0
  79. {hgitaly-18.6.1 → hgitaly-18.7.0a0}/hgitaly/service/__init__.py +0 -0
  80. {hgitaly-18.6.1 → hgitaly-18.7.0a0}/hgitaly/service/analysis.py +0 -0
  81. {hgitaly-18.6.1 → hgitaly-18.7.0a0}/hgitaly/service/blob.py +0 -0
  82. {hgitaly-18.6.1 → hgitaly-18.7.0a0}/hgitaly/service/diff.py +0 -0
  83. {hgitaly-18.6.1 → hgitaly-18.7.0a0}/hgitaly/service/interceptors.py +0 -0
  84. {hgitaly-18.6.1 → hgitaly-18.7.0a0}/hgitaly/service/mercurial_changeset.py +0 -0
  85. {hgitaly-18.6.1 → hgitaly-18.7.0a0}/hgitaly/service/mercurial_namespace.py +0 -0
  86. {hgitaly-18.6.1 → hgitaly-18.7.0a0}/hgitaly/service/mercurial_operations.py +0 -0
  87. {hgitaly-18.6.1 → hgitaly-18.7.0a0}/hgitaly/service/mercurial_repository.py +0 -0
  88. {hgitaly-18.6.1 → hgitaly-18.7.0a0}/hgitaly/service/operations.py +0 -0
  89. {hgitaly-18.6.1 → hgitaly-18.7.0a0}/hgitaly/service/ref.py +0 -0
  90. {hgitaly-18.6.1 → hgitaly-18.7.0a0}/hgitaly/service/repository.py +0 -0
  91. {hgitaly-18.6.1 → hgitaly-18.7.0a0}/hgitaly/service/server.py +0 -0
  92. {hgitaly-18.6.1 → hgitaly-18.7.0a0}/hgitaly/service/tests/__init__.py +0 -0
  93. {hgitaly-18.6.1 → hgitaly-18.7.0a0}/hgitaly/service/tests/fixture.py +0 -0
  94. {hgitaly-18.6.1 → hgitaly-18.7.0a0}/hgitaly/service/tests/test_analysis.py +0 -0
  95. {hgitaly-18.6.1 → hgitaly-18.7.0a0}/hgitaly/service/tests/test_blob.py +0 -0
  96. {hgitaly-18.6.1 → hgitaly-18.7.0a0}/hgitaly/service/tests/test_default_branch.py +0 -0
  97. {hgitaly-18.6.1 → hgitaly-18.7.0a0}/hgitaly/service/tests/test_diff.py +0 -0
  98. {hgitaly-18.6.1 → hgitaly-18.7.0a0}/hgitaly/service/tests/test_mercurial_changeset.py +0 -0
  99. {hgitaly-18.6.1 → hgitaly-18.7.0a0}/hgitaly/service/tests/test_mercurial_namespace.py +0 -0
  100. {hgitaly-18.6.1 → hgitaly-18.7.0a0}/hgitaly/service/tests/test_mercurial_operations.py +0 -0
  101. {hgitaly-18.6.1 → hgitaly-18.7.0a0}/hgitaly/service/tests/test_mercurial_repository.py +0 -0
  102. {hgitaly-18.6.1 → hgitaly-18.7.0a0}/hgitaly/service/tests/test_operations.py +0 -0
  103. {hgitaly-18.6.1 → hgitaly-18.7.0a0}/hgitaly/service/tests/test_ref.py +0 -0
  104. {hgitaly-18.6.1 → hgitaly-18.7.0a0}/hgitaly/service/tests/test_repository_service.py +0 -0
  105. {hgitaly-18.6.1 → hgitaly-18.7.0a0}/hgitaly/service/tests/test_server.py +0 -0
  106. {hgitaly-18.6.1 → hgitaly-18.7.0a0}/hgitaly/servicer.py +0 -0
  107. {hgitaly-18.6.1 → hgitaly-18.7.0a0}/hgitaly/ssh.py +0 -0
  108. {hgitaly-18.6.1 → hgitaly-18.7.0a0}/hgitaly/stream.py +0 -0
  109. {hgitaly-18.6.1 → hgitaly-18.7.0a0}/hgitaly/stub/__init__.py +0 -0
  110. {hgitaly-18.6.1 → hgitaly-18.7.0a0}/hgitaly/stub/analysis_pb2.py +0 -0
  111. {hgitaly-18.6.1 → hgitaly-18.7.0a0}/hgitaly/stub/analysis_pb2_grpc.py +0 -0
  112. {hgitaly-18.6.1 → hgitaly-18.7.0a0}/hgitaly/stub/blob_pb2.py +0 -0
  113. {hgitaly-18.6.1 → hgitaly-18.7.0a0}/hgitaly/stub/blob_pb2_grpc.py +0 -0
  114. {hgitaly-18.6.1 → hgitaly-18.7.0a0}/hgitaly/stub/commit_pb2_grpc.py +0 -0
  115. {hgitaly-18.6.1 → hgitaly-18.7.0a0}/hgitaly/stub/diff_pb2.py +0 -0
  116. {hgitaly-18.6.1 → hgitaly-18.7.0a0}/hgitaly/stub/diff_pb2_grpc.py +0 -0
  117. {hgitaly-18.6.1 → hgitaly-18.7.0a0}/hgitaly/stub/errors_pb2.py +0 -0
  118. {hgitaly-18.6.1 → hgitaly-18.7.0a0}/hgitaly/stub/errors_pb2_grpc.py +0 -0
  119. {hgitaly-18.6.1 → hgitaly-18.7.0a0}/hgitaly/stub/lint_pb2.py +0 -0
  120. {hgitaly-18.6.1 → hgitaly-18.7.0a0}/hgitaly/stub/lint_pb2_grpc.py +0 -0
  121. {hgitaly-18.6.1 → hgitaly-18.7.0a0}/hgitaly/stub/mercurial_aux_git_pb2.py +0 -0
  122. {hgitaly-18.6.1 → hgitaly-18.7.0a0}/hgitaly/stub/mercurial_aux_git_pb2_grpc.py +0 -0
  123. {hgitaly-18.6.1 → hgitaly-18.7.0a0}/hgitaly/stub/mercurial_changeset_pb2.py +0 -0
  124. {hgitaly-18.6.1 → hgitaly-18.7.0a0}/hgitaly/stub/mercurial_changeset_pb2_grpc.py +0 -0
  125. {hgitaly-18.6.1 → hgitaly-18.7.0a0}/hgitaly/stub/mercurial_namespace_pb2.py +0 -0
  126. {hgitaly-18.6.1 → hgitaly-18.7.0a0}/hgitaly/stub/mercurial_namespace_pb2_grpc.py +0 -0
  127. {hgitaly-18.6.1 → hgitaly-18.7.0a0}/hgitaly/stub/mercurial_operations_pb2.py +0 -0
  128. {hgitaly-18.6.1 → hgitaly-18.7.0a0}/hgitaly/stub/mercurial_operations_pb2_grpc.py +0 -0
  129. {hgitaly-18.6.1 → hgitaly-18.7.0a0}/hgitaly/stub/mercurial_repository_pb2.py +0 -0
  130. {hgitaly-18.6.1 → hgitaly-18.7.0a0}/hgitaly/stub/mercurial_repository_pb2_grpc.py +0 -0
  131. {hgitaly-18.6.1 → hgitaly-18.7.0a0}/hgitaly/stub/operations_pb2_grpc.py +0 -0
  132. {hgitaly-18.6.1 → hgitaly-18.7.0a0}/hgitaly/stub/ref_pb2.py +0 -0
  133. {hgitaly-18.6.1 → hgitaly-18.7.0a0}/hgitaly/stub/ref_pb2_grpc.py +0 -0
  134. {hgitaly-18.6.1 → hgitaly-18.7.0a0}/hgitaly/stub/remote_pb2.py +0 -0
  135. {hgitaly-18.6.1 → hgitaly-18.7.0a0}/hgitaly/stub/remote_pb2_grpc.py +0 -0
  136. {hgitaly-18.6.1 → hgitaly-18.7.0a0}/hgitaly/stub/repository_pb2.py +0 -0
  137. {hgitaly-18.6.1 → hgitaly-18.7.0a0}/hgitaly/stub/repository_pb2_grpc.py +0 -0
  138. {hgitaly-18.6.1 → hgitaly-18.7.0a0}/hgitaly/stub/server_pb2.py +0 -0
  139. {hgitaly-18.6.1 → hgitaly-18.7.0a0}/hgitaly/stub/server_pb2_grpc.py +0 -0
  140. {hgitaly-18.6.1 → hgitaly-18.7.0a0}/hgitaly/stub/shared_pb2.py +0 -0
  141. {hgitaly-18.6.1 → hgitaly-18.7.0a0}/hgitaly/stub/shared_pb2_grpc.py +0 -0
  142. {hgitaly-18.6.1 → hgitaly-18.7.0a0}/hgitaly/tag.py +0 -0
  143. {hgitaly-18.6.1 → hgitaly-18.7.0a0}/hgitaly/testing/__init__.py +0 -0
  144. {hgitaly-18.6.1 → hgitaly-18.7.0a0}/hgitaly/testing/bundle.py +0 -0
  145. {hgitaly-18.6.1 → hgitaly-18.7.0a0}/hgitaly/testing/context.py +0 -0
  146. {hgitaly-18.6.1 → hgitaly-18.7.0a0}/hgitaly/testing/grpc.py +0 -0
  147. {hgitaly-18.6.1 → hgitaly-18.7.0a0}/hgitaly/testing/multiprocessing.py +0 -0
  148. {hgitaly-18.6.1 → hgitaly-18.7.0a0}/hgitaly/testing/repo.py +0 -0
  149. {hgitaly-18.6.1 → hgitaly-18.7.0a0}/hgitaly/testing/ssh.py +0 -0
  150. {hgitaly-18.6.1 → hgitaly-18.7.0a0}/hgitaly/testing/sshd.py +0 -0
  151. {hgitaly-18.6.1 → hgitaly-18.7.0a0}/hgitaly/testing/storage.py +0 -0
  152. {hgitaly-18.6.1 → hgitaly-18.7.0a0}/hgitaly/testing/tests/__init__.py +0 -0
  153. {hgitaly-18.6.1 → hgitaly-18.7.0a0}/hgitaly/testing/tests/test_sshd.py +0 -0
  154. {hgitaly-18.6.1 → hgitaly-18.7.0a0}/hgitaly/tests/__init__.py +0 -0
  155. {hgitaly-18.6.1 → hgitaly-18.7.0a0}/hgitaly/tests/common.py +0 -0
  156. {hgitaly-18.6.1 → hgitaly-18.7.0a0}/hgitaly/tests/test_branch.py +0 -0
  157. {hgitaly-18.6.1 → hgitaly-18.7.0a0}/hgitaly/tests/test_diff.py +0 -0
  158. {hgitaly-18.6.1 → hgitaly-18.7.0a0}/hgitaly/tests/test_errors.py +0 -0
  159. {hgitaly-18.6.1 → hgitaly-18.7.0a0}/hgitaly/tests/test_feature.py +0 -0
  160. {hgitaly-18.6.1 → hgitaly-18.7.0a0}/hgitaly/tests/test_file_context.py +0 -0
  161. {hgitaly-18.6.1 → hgitaly-18.7.0a0}/hgitaly/tests/test_gitlab_ref.py +0 -0
  162. {hgitaly-18.6.1 → hgitaly-18.7.0a0}/hgitaly/tests/test_identification.py +0 -0
  163. {hgitaly-18.6.1 → hgitaly-18.7.0a0}/hgitaly/tests/test_manifest.py +0 -0
  164. {hgitaly-18.6.1 → hgitaly-18.7.0a0}/hgitaly/tests/test_messages.py +0 -0
  165. {hgitaly-18.6.1 → hgitaly-18.7.0a0}/hgitaly/tests/test_oid.py +0 -0
  166. {hgitaly-18.6.1 → hgitaly-18.7.0a0}/hgitaly/tests/test_peer.py +0 -0
  167. {hgitaly-18.6.1 → hgitaly-18.7.0a0}/hgitaly/tests/test_repository.py +0 -0
  168. {hgitaly-18.6.1 → hgitaly-18.7.0a0}/hgitaly/tests/test_revision.py +0 -0
  169. {hgitaly-18.6.1 → hgitaly-18.7.0a0}/hgitaly/tests/test_revset.py +0 -0
  170. {hgitaly-18.6.1 → hgitaly-18.7.0a0}/hgitaly/tests/test_servicer.py +0 -0
  171. {hgitaly-18.6.1 → hgitaly-18.7.0a0}/hgitaly/tests/test_stream.py +0 -0
  172. {hgitaly-18.6.1 → hgitaly-18.7.0a0}/hgitaly/tests/test_tag.py +0 -0
  173. {hgitaly-18.6.1 → hgitaly-18.7.0a0}/hgitaly/util.py +0 -0
  174. {hgitaly-18.6.1 → hgitaly-18.7.0a0}/hgitaly/workdir.py +0 -0
  175. {hgitaly-18.6.1 → hgitaly-18.7.0a0}/hgitaly.egg-info/dependency_links.txt +0 -0
  176. {hgitaly-18.6.1 → hgitaly-18.7.0a0}/hgitaly.egg-info/entry_points.txt +0 -0
  177. {hgitaly-18.6.1 → hgitaly-18.7.0a0}/setup.cfg +0 -0
  178. {hgitaly-18.6.1 → hgitaly-18.7.0a0}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: hgitaly
3
- Version: 18.6.1
3
+ Version: 18.7.0a0
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.4.0
13
+ Requires-Dist: heptapod>=5.4.0
14
14
  Requires-Dist: protobuf~=6.31.1
15
15
  Requires-Dist: grpcio~=1.76.0
16
16
  Requires-Dist: grpcio-status~=1.76.0
@@ -278,16 +278,21 @@ actually a mix of:
278
278
  - Gitaly documentation and source code.
279
279
  - sampling of Gitaly responses.
280
280
 
281
- #### Gitaly comparison tests
281
+ #### Gitaly comparison and other functional tests
282
282
 
283
283
  If an appropriate Gitaly installation is found, `run-all-tests` will also
284
- run the tests from the `tests_with_gitaly` package. This happens automatically
284
+ run the tests from the `functional_tests` package. This happens automatically
285
285
  from within a [HDK] workspace.
286
286
 
287
287
  These are precisely meant for what the Mercurial integration tests can't do:
288
288
  check that HGitaly responses take the form expected by the various Gitaly
289
289
  clients, by comparing directly with the reference Gitaly implementation.
290
290
 
291
+ Some of the included tests also compare the output of RHGitaly and HGitaly,
292
+ when both implementations exist or just test RHGitaly standalone (when
293
+ comparison with Gitaly makes no sense, e.g. because the method is defined
294
+ in the HGitaly protocol, and there is no Python implementation).
295
+
291
296
  The comparisons work by using the conversions to Git provided by
292
297
  `py-heptapod`, which are precisely what HGitaly aims to replace as a mean
293
298
  to expose Mercurial content to GitLab.
@@ -368,10 +373,10 @@ In some rare cases, the drop in coverage could be due to an actual change
368
373
  between Mercurial versions. If that happens, there are good chances that an
369
374
  actual bug is lurking around.
370
375
 
371
- #### How to run the tests with coverage of the Gitaly comparison tests
376
+ #### How to run the tests with coverage of the functional tests
372
377
 
373
378
  ```
374
- ./run-all-tests --cov tests_with_gitaly --cov-report html
379
+ ./run-all-tests --cov functional_tests --cov-report html
375
380
  ```
376
381
 
377
382
  The HTML report will be nice if you don't have 100% coverage. To display it,
@@ -255,16 +255,21 @@ actually a mix of:
255
255
  - Gitaly documentation and source code.
256
256
  - sampling of Gitaly responses.
257
257
 
258
- #### Gitaly comparison tests
258
+ #### Gitaly comparison and other functional tests
259
259
 
260
260
  If an appropriate Gitaly installation is found, `run-all-tests` will also
261
- run the tests from the `tests_with_gitaly` package. This happens automatically
261
+ run the tests from the `functional_tests` package. This happens automatically
262
262
  from within a [HDK] workspace.
263
263
 
264
264
  These are precisely meant for what the Mercurial integration tests can't do:
265
265
  check that HGitaly responses take the form expected by the various Gitaly
266
266
  clients, by comparing directly with the reference Gitaly implementation.
267
267
 
268
+ Some of the included tests also compare the output of RHGitaly and HGitaly,
269
+ when both implementations exist or just test RHGitaly standalone (when
270
+ comparison with Gitaly makes no sense, e.g. because the method is defined
271
+ in the HGitaly protocol, and there is no Python implementation).
272
+
268
273
  The comparisons work by using the conversions to Git provided by
269
274
  `py-heptapod`, which are precisely what HGitaly aims to replace as a mean
270
275
  to expose Mercurial content to GitLab.
@@ -345,10 +350,10 @@ In some rare cases, the drop in coverage could be due to an actual change
345
350
  between Mercurial versions. If that happens, there are good chances that an
346
351
  actual bug is lurking around.
347
352
 
348
- #### How to run the tests with coverage of the Gitaly comparison tests
353
+ #### How to run the tests with coverage of the functional tests
349
354
 
350
355
  ```
351
- ./run-all-tests --cov tests_with_gitaly --cov-report html
356
+ ./run-all-tests --cov functional_tests --cov-report html
352
357
  ```
353
358
 
354
359
  The HTML report will be nice if you don't have 100% coverage. To display it,
@@ -69,11 +69,18 @@ class RHGitalyServer:
69
69
  if rhgitaly_exe is None: # pragma no cover
70
70
  subprocess.check_call(('cargo', 'build', '--locked'),
71
71
  cwd=rhgitaly_dir)
72
- run_cmd = ('cargo', 'run')
72
+ run_cmd = ['cargo', 'run', '--']
73
73
  else: # pragma no cover
74
74
  # Popen would not run a relative binary so easily
75
75
  run_cmd = [Path(rhgitaly_exe).resolve()]
76
76
 
77
+ conf = self.home_dir / 'rhgitaly.toml'
78
+ conf.write_text('\n'.join((
79
+ "[sidecar]",
80
+ "managed = false",
81
+ )))
82
+ run_cmd.extend(("--config", conf))
83
+
77
84
  with open(self.home_dir / 'rhgitaly.log', 'w') as logf:
78
85
  rhgitaly = subprocess.Popen(
79
86
  run_cmd,
@@ -41,8 +41,7 @@ if skip_comparison_tests(): # pragma no cover
41
41
  parametrize = pytest.mark.parametrize
42
42
 
43
43
 
44
- @parametrize('hg_server', ('hgitaly', 'rhgitaly'))
45
- def test_compare_last_commit_for(gitaly_rhgitaly_comparison, hg_server):
44
+ def test_compare_last_commit_for(gitaly_rhgitaly_comparison):
46
45
  fixture = gitaly_rhgitaly_comparison
47
46
  git_repo = fixture.git_repo
48
47
 
@@ -80,7 +79,7 @@ def test_compare_last_commit_for(gitaly_rhgitaly_comparison, hg_server):
80
79
  normalize_commit_message(commit_for_tree.commit)
81
80
 
82
81
  rpc_helper = fixture.rpc_helper(stub_cls=CommitServiceStub,
83
- hg_server=hg_server,
82
+ hg_server='rhgitaly',
84
83
  method_name='ListLastCommitsForTree',
85
84
  streaming=True,
86
85
  request_cls=ListLastCommitsForTreeRequest,
@@ -131,7 +130,7 @@ def test_compare_last_commit_for(gitaly_rhgitaly_comparison, hg_server):
131
130
  normalize_commit_message(response.commit)
132
131
 
133
132
  rpc_helper = fixture.rpc_helper(stub_cls=CommitServiceStub,
134
- hg_server=hg_server,
133
+ hg_server='rhgitaly',
135
134
  method_name='LastCommitForPath',
136
135
  request_cls=LastCommitForPathRequest,
137
136
  request_sha_attrs=['revision'],
@@ -722,7 +721,7 @@ def test_compare_list_commits(gitaly_comparison):
722
721
  #
723
722
  # @ 4 (branch/default) merge with stable
724
723
  # |\
725
- # | o 3 creates 'animals' (branch/stable)
724
+ # | o 3 creates 'animal' (branch/stable)
726
725
  # | |
727
726
  # o | 2 rename 'foo' to 'zoo' (user: testuser)
728
727
  # |/
@@ -763,7 +762,8 @@ def test_compare_list_commits(gitaly_comparison):
763
762
  request_defaults=dict(
764
763
  pagination_params=PaginationParameter(limit=10)),
765
764
  request_sha_attrs=['revision'],
766
- response_sha_attrs=['commits[].id', 'commits[].parent_ids[]'],
765
+ response_sha_attrs=['commits[].id', 'commits[].parent_ids[]',
766
+ 'pagination_cursor.next_cursor'],
767
767
  normalizer=normalizer,
768
768
  )
769
769
  rpc_helper.sorted = False
@@ -812,18 +812,6 @@ def test_compare_list_commits(gitaly_comparison):
812
812
  # no result
813
813
  assert_compare(revisions=[ctx4.hex(), caret(ctx4)])
814
814
 
815
- # with paths
816
- assert_compare(revisions=[ctx4.hex()], paths=[b'animals'])
817
- assert_compare(revisions=[ctx4.hex()], paths=[b'foo'])
818
- assert_compare(revisions=[ctx4.hex()], paths=[b'zoo'])
819
- assert_compare(revisions=[ctx3.hex(), ctx2.hex()],
820
- paths=[b'animals', b'zoo'])
821
- assert_compare(revisions=[ctx4.hex()], paths=[b'anim*'])
822
- # with two paths, Git starts returning the merge
823
- # but Mercurial does not. This seems more consistent on the Mercurial
824
- # side, so we won't compare. It would be:
825
- # assert_compare(revisions=[ctx4.hex()], paths=[b'anim*', b'foo'])
826
-
827
815
  # orderings
828
816
  #
829
817
  # Comparison is limited because Mercurial orderings don't exactly
@@ -922,8 +910,7 @@ def test_compare_list_commits(gitaly_comparison):
922
910
  same_details=False)
923
911
 
924
912
 
925
- @parametrize('hg_server', ('hgitaly', 'rhgitaly'))
926
- def test_compare_list_commits_by_oid(gitaly_rhgitaly_comparison, hg_server):
913
+ def test_compare_list_commits_by_oid(gitaly_rhgitaly_comparison):
927
914
  fixture = gitaly_rhgitaly_comparison
928
915
  wrapper = fixture.hg_repo_wrapper
929
916
 
@@ -944,7 +931,7 @@ def test_compare_list_commits_by_oid(gitaly_rhgitaly_comparison, hg_server):
944
931
  del response.commits[:]
945
932
 
946
933
  rpc_helper = fixture.rpc_helper(
947
- hg_server=hg_server,
934
+ hg_server='rhgitaly',
948
935
  stub_cls=CommitServiceStub,
949
936
  method_name='ListCommitsByOid',
950
937
  request_cls=ListCommitsByOidRequest,
@@ -980,9 +967,7 @@ def test_compare_list_commits_by_oid(gitaly_rhgitaly_comparison, hg_server):
980
967
  rpc_helper.assert_compare(oid=[NULL_HEX, hexes[0]])
981
968
 
982
969
 
983
- @parametrize('hg_server', ('hgitaly', 'rhgitaly'))
984
- def test_compare_list_commits_by_ref_name(gitaly_rhgitaly_comparison,
985
- hg_server):
970
+ def test_compare_list_commits_by_ref_name(gitaly_rhgitaly_comparison):
986
971
  fixture = gitaly_rhgitaly_comparison
987
972
  wrapper = fixture.hg_repo_wrapper
988
973
 
@@ -996,7 +981,7 @@ def test_compare_list_commits_by_ref_name(gitaly_rhgitaly_comparison,
996
981
  )
997
982
 
998
983
  rpc_helper = fixture.rpc_helper(
999
- hg_server=hg_server,
984
+ hg_server='rhgitaly',
1000
985
  stub_cls=CommitServiceStub,
1001
986
  method_name='ListCommitsByRefName',
1002
987
  request_cls=ListCommitsByRefNameRequest,
@@ -73,7 +73,7 @@ def reraise_abort(msg, exc):
73
73
  b'repeated to listen on several addresses' % DEFAULT_LISTEN_URL),
74
74
  _(b'ADDRESS')),
75
75
  (b'', b'mono-process',
76
- False,
76
+ True,
77
77
  _(b'Mono process mode (useful for debugging, notably with pdb).'
78
78
  b'No forking occurs, the main process is the single worker. '
79
79
  b'In particular the hgitaly.workers configuration item is '
@@ -125,18 +125,7 @@ def serve(ui, **opts):
125
125
  client_id_slug = opts.get('client_id_file_name', DEFAULT_CLIENT_ID_SLUG)
126
126
  client_id_path = Path(config_root) / '+hgitaly' / os.fsdecode(client_id_slug)
127
127
  ensure_client_id(client_id_path)
128
- nb_workers = ui.configint(b'hgitaly', b'workers')
129
- run_opts = dict(nb_workers=nb_workers,
130
- restart_done_workers=True,
131
- mono_process=opts.get('mono_process'))
132
- max_rss_mib = ui.configint(b'hgitaly', b'worker.max-rss-mib')
133
- if max_rss_mib is not None:
134
- run_opts['max_rss_mib'] = max_rss_mib
135
- monitoring_interval = ui.configint(b'hgitaly',
136
- b'worker.monitoring-interval-seconds')
137
- if monitoring_interval is not None:
138
- run_opts['monitoring_interval'] = monitoring_interval
139
-
128
+ run_opts = {}
140
129
  shutdown_timeout = ui.configint(
141
130
  b'hgitaly',
142
131
  b'worker.graceful-shutdown-timeout-seconds')
@@ -69,37 +69,6 @@ def test_serve_default_url(tmpdir, monkeypatch):
69
69
  assert kwargs.get('nb_workers') is None
70
70
 
71
71
 
72
- def test_serve_workers_config(tmpdir, monkeypatch):
73
- ui, records = mock_run_forever(
74
- tmpdir, monkeypatch,
75
- config=dict(hgitaly={'workers': '47',
76
- 'configuration-root': str(tmpdir / 'config')}),
77
- )
78
- hgitaly_ext.serve(ui, listen=[], repositories_root=b'/some/path')
79
- kwargs = records[0][1]
80
- assert kwargs.get('nb_workers') == 47
81
-
82
-
83
- def test_serve_max_rss_mb(tmpdir, monkeypatch):
84
- ui, records = mock_run_forever(
85
- tmpdir, monkeypatch,
86
- config=dict(hgitaly={'worker.max-rss-mib': '128'}))
87
- repositories_root = repos_root(tmpdir)
88
- hgitaly_ext.serve(ui, listen=[], repositories_root=repositories_root)
89
- kwargs = records[0][1]
90
- assert kwargs.get('max_rss_mib') == 128
91
-
92
-
93
- def test_serve_monitoring_interval(tmpdir, monkeypatch):
94
- ui, records = mock_run_forever(
95
- tmpdir, monkeypatch,
96
- config=dict(hgitaly={'worker.monitoring-interval-seconds': '13'}))
97
- repositories_root = repos_root(tmpdir)
98
- hgitaly_ext.serve(ui, listen=[], repositories_root=repositories_root)
99
- kwargs = records[0][1]
100
- assert kwargs.get('monitoring_interval') == 13
101
-
102
-
103
72
  def test_serve_graceful_shutdown(tmpdir, monkeypatch):
104
73
  ui, records = mock_run_forever(
105
74
  tmpdir, monkeypatch,
@@ -0,0 +1 @@
1
+ 18.7.0a0
@@ -0,0 +1,34 @@
1
+ # Copyright 2020 Georges Racinet <georges.racinet@octobus.net>
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
+ """Git specific things, mostly constants."""
8
+
9
+ ZERO_SHA_1 = '0' * 40
10
+
11
+ NULL_COMMIT_ID = ZERO_SHA_1
12
+ NULL_BLOB_OID = ZERO_SHA_1
13
+
14
+ # from `sha1-file.c` in Git 2.28 sources
15
+ # we're not dealing for now with the fact that there will be
16
+ # two kinds of OIDs with SHA-1 and SHA-256 soon.
17
+
18
+ # The Git tree object hash that corresponds to an empty tree (directory)
19
+ EMPTY_TREE_OID = '4b825dc642cb6eb9a060e54bf8d69288fbee4904'
20
+
21
+ # The Git blob object hash that corresponds to an empty blob (file)
22
+ EMPTY_BLOB_OID = 'e69de29bb2d1d6434b8b29ae775ad8c2e48c5391'
23
+
24
+ OBJECT_MODE_DOES_NOT_EXIST = 0 # see, e.g, ChangedPaths in diff.proto
25
+ OBJECT_MODE_LINK = 0o120000 # symlink to file or directory
26
+ OBJECT_MODE_EXECUTABLE = 0o100755 # for blobs only
27
+ OBJECT_MODE_NON_EXECUTABLE = 0o100644 # for blobs only
28
+ OBJECT_MODE_TREE = 0o40000
29
+
30
+ FILECTX_FLAGS_TO_GIT_MODE_BYTES = {
31
+ b'l': b'%o' % OBJECT_MODE_LINK,
32
+ b'x': b'%o' % OBJECT_MODE_EXECUTABLE,
33
+ b'': b'%o' % OBJECT_MODE_NON_EXECUTABLE,
34
+ }
@@ -21,9 +21,6 @@ from .stub.shared_pb2 import (
21
21
  Tag,
22
22
  User,
23
23
  )
24
- from .stub.commit_pb2 import (
25
- ListLastCommitsForTreeResponse,
26
- )
27
24
  from .stub.mercurial_changeset_pb2 import (
28
25
  MercurialChangeset,
29
26
  MercurialChangesetField,
@@ -272,14 +269,6 @@ def tag(name, target, tagging=None, signature_type=None):
272
269
  )
273
270
 
274
271
 
275
- CommitForTree = ListLastCommitsForTreeResponse.CommitForTree
276
-
277
-
278
- def commit_for_tree(changeset, path):
279
- """Message indicating the last changeset having modified a path"""
280
- return CommitForTree(commit=commit(changeset), path_bytes=path)
281
-
282
-
283
272
  def mercurial_changeset(changeset, fields=None) -> MercurialChangeset:
284
273
  """Serialize changeset information.
285
274
 
@@ -1,25 +1,17 @@
1
1
  import os
2
2
  import psutil
3
3
 
4
- IS_CHILD_PROCESS = False
5
-
6
4
 
7
5
  def is_current_service_process(pid):
8
6
  """Determine whether the given pid is part of the current HGitaly service.
9
7
 
10
8
  For now, the logic is that other processes from the same HGitaly service
11
9
  are expected to be siblings of the current process, unless in the special
12
- case where HGitaly is not started as a prefork server, which should happen
13
- with the `--mono-process` option (debuging sessions) and tests only.
10
+ case where HGitaly is started direcly (not from RHGitaly's sidecar),
11
+ hence for debugging purposes or from tests.
14
12
  """
15
- this_pid = os.getpid()
16
-
17
- if not IS_CHILD_PROCESS:
18
- return pid == this_pid
19
-
20
13
  try:
21
14
  proc = psutil.Process(pid)
22
15
  except psutil.NoSuchProcess:
23
16
  return False
24
-
25
17
  return proc.ppid() == os.getppid()
@@ -11,7 +11,10 @@ from .address import (
11
11
  )
12
12
  from .mono import (
13
13
  BindError,
14
+ server_process,
14
15
  )
15
- from .prefork import (
16
- run_forever,
17
- )
16
+
17
+ def run_forever(listen_urls, storages, **process_kwargs):
18
+ return server_process(0, listen_urls, storages,
19
+ mono_process=True,
20
+ **process_kwargs)
@@ -61,7 +61,7 @@ class WorkerProcess:
61
61
  return self.process.pid
62
62
 
63
63
  def __str__(self):
64
- pid = 'no process' if self.process is None else self.process.pid
64
+ pid = 'no process' if self.process is None else self.pid
65
65
  return f"Worker {self.process_args[0]} (pid: {pid})"
66
66
 
67
67
  def init_process(self):