hgitaly 18.5.1__tar.gz → 18.5.3__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 (175) hide show
  1. {hgitaly-18.5.1/hgitaly.egg-info → hgitaly-18.5.3}/PKG-INFO +3 -3
  2. {hgitaly-18.5.1 → hgitaly-18.5.3}/hgext3rd/hgitaly/__init__.py +14 -1
  3. hgitaly-18.5.3/hgitaly/VERSION +1 -0
  4. {hgitaly-18.5.1 → hgitaly-18.5.3}/hgitaly/identification.py +5 -5
  5. {hgitaly-18.5.1 → hgitaly-18.5.3}/hgitaly/message.py +2 -1
  6. {hgitaly-18.5.1 → hgitaly-18.5.3}/hgitaly/service/commit.py +15 -0
  7. {hgitaly-18.5.1 → hgitaly-18.5.3}/hgitaly/tests/test_identification.py +4 -2
  8. {hgitaly-18.5.1 → hgitaly-18.5.3}/hgitaly/tests/test_messages.py +1 -1
  9. {hgitaly-18.5.1 → hgitaly-18.5.3/hgitaly.egg-info}/PKG-INFO +3 -3
  10. {hgitaly-18.5.1 → hgitaly-18.5.3}/hgitaly.egg-info/requires.txt +2 -2
  11. {hgitaly-18.5.1 → hgitaly-18.5.3}/install-requirements.txt +2 -2
  12. {hgitaly-18.5.1 → hgitaly-18.5.3}/tests_with_gitaly/test_ref.py +1 -4
  13. {hgitaly-18.5.1 → hgitaly-18.5.3}/tests_with_gitaly/test_repository_service.py +12 -0
  14. hgitaly-18.5.1/hgitaly/VERSION +0 -1
  15. {hgitaly-18.5.1 → hgitaly-18.5.3}/LICENSE +0 -0
  16. {hgitaly-18.5.1 → hgitaly-18.5.3}/MANIFEST.in +0 -0
  17. {hgitaly-18.5.1 → hgitaly-18.5.3}/README.md +0 -0
  18. {hgitaly-18.5.1 → hgitaly-18.5.3}/hgext3rd/__init__.py +0 -0
  19. {hgitaly-18.5.1 → hgitaly-18.5.3}/hgext3rd/hgitaly/revset.py +0 -0
  20. {hgitaly-18.5.1 → hgitaly-18.5.3}/hgext3rd/hgitaly/tests/__init__.py +0 -0
  21. {hgitaly-18.5.1 → hgitaly-18.5.3}/hgext3rd/hgitaly/tests/test_revset.py +0 -0
  22. {hgitaly-18.5.1 → hgitaly-18.5.3}/hgext3rd/hgitaly/tests/test_serve.py +0 -0
  23. {hgitaly-18.5.1 → hgitaly-18.5.3}/hgitaly/__init__.py +0 -0
  24. {hgitaly-18.5.1 → hgitaly-18.5.3}/hgitaly/branch.py +0 -0
  25. {hgitaly-18.5.1 → hgitaly-18.5.3}/hgitaly/changelog.py +0 -0
  26. {hgitaly-18.5.1 → hgitaly-18.5.3}/hgitaly/diff.py +0 -0
  27. {hgitaly-18.5.1 → hgitaly-18.5.3}/hgitaly/errors.py +0 -0
  28. {hgitaly-18.5.1 → hgitaly-18.5.3}/hgitaly/feature.py +0 -0
  29. {hgitaly-18.5.1 → hgitaly-18.5.3}/hgitaly/file_content.py +0 -0
  30. {hgitaly-18.5.1 → hgitaly-18.5.3}/hgitaly/file_context.py +0 -0
  31. {hgitaly-18.5.1 → hgitaly-18.5.3}/hgitaly/git.py +0 -0
  32. {hgitaly-18.5.1 → hgitaly-18.5.3}/hgitaly/gitlab_ref.py +0 -0
  33. {hgitaly-18.5.1 → hgitaly-18.5.3}/hgitaly/logging.py +0 -0
  34. {hgitaly-18.5.1 → hgitaly-18.5.3}/hgitaly/manifest.py +0 -0
  35. {hgitaly-18.5.1 → hgitaly-18.5.3}/hgitaly/oid.py +0 -0
  36. {hgitaly-18.5.1 → hgitaly-18.5.3}/hgitaly/pagination.py +0 -0
  37. {hgitaly-18.5.1 → hgitaly-18.5.3}/hgitaly/path.py +0 -0
  38. {hgitaly-18.5.1 → hgitaly-18.5.3}/hgitaly/peer.py +0 -0
  39. {hgitaly-18.5.1 → hgitaly-18.5.3}/hgitaly/procutil.py +0 -0
  40. {hgitaly-18.5.1 → hgitaly-18.5.3}/hgitaly/repository.py +0 -0
  41. {hgitaly-18.5.1 → hgitaly-18.5.3}/hgitaly/revision.py +0 -0
  42. {hgitaly-18.5.1 → hgitaly-18.5.3}/hgitaly/revset.py +0 -0
  43. {hgitaly-18.5.1 → hgitaly-18.5.3}/hgitaly/scripts.py +0 -0
  44. {hgitaly-18.5.1 → hgitaly-18.5.3}/hgitaly/server/__init__.py +0 -0
  45. {hgitaly-18.5.1 → hgitaly-18.5.3}/hgitaly/server/address.py +0 -0
  46. {hgitaly-18.5.1 → hgitaly-18.5.3}/hgitaly/server/mono.py +0 -0
  47. {hgitaly-18.5.1 → hgitaly-18.5.3}/hgitaly/server/prefork.py +0 -0
  48. {hgitaly-18.5.1 → hgitaly-18.5.3}/hgitaly/server/tests/__init__.py +0 -0
  49. {hgitaly-18.5.1 → hgitaly-18.5.3}/hgitaly/server/tests/test_address.py +0 -0
  50. {hgitaly-18.5.1 → hgitaly-18.5.3}/hgitaly/server/tests/test_mono.py +0 -0
  51. {hgitaly-18.5.1 → hgitaly-18.5.3}/hgitaly/server/tests/test_prefork.py +0 -0
  52. {hgitaly-18.5.1 → hgitaly-18.5.3}/hgitaly/server/tests/test_worker.py +0 -0
  53. {hgitaly-18.5.1 → hgitaly-18.5.3}/hgitaly/server/worker.py +0 -0
  54. {hgitaly-18.5.1 → hgitaly-18.5.3}/hgitaly/service/__init__.py +0 -0
  55. {hgitaly-18.5.1 → hgitaly-18.5.3}/hgitaly/service/analysis.py +0 -0
  56. {hgitaly-18.5.1 → hgitaly-18.5.3}/hgitaly/service/blob.py +0 -0
  57. {hgitaly-18.5.1 → hgitaly-18.5.3}/hgitaly/service/diff.py +0 -0
  58. {hgitaly-18.5.1 → hgitaly-18.5.3}/hgitaly/service/interceptors.py +0 -0
  59. {hgitaly-18.5.1 → hgitaly-18.5.3}/hgitaly/service/mercurial_changeset.py +0 -0
  60. {hgitaly-18.5.1 → hgitaly-18.5.3}/hgitaly/service/mercurial_namespace.py +0 -0
  61. {hgitaly-18.5.1 → hgitaly-18.5.3}/hgitaly/service/mercurial_operations.py +0 -0
  62. {hgitaly-18.5.1 → hgitaly-18.5.3}/hgitaly/service/mercurial_repository.py +0 -0
  63. {hgitaly-18.5.1 → hgitaly-18.5.3}/hgitaly/service/operations.py +0 -0
  64. {hgitaly-18.5.1 → hgitaly-18.5.3}/hgitaly/service/ref.py +0 -0
  65. {hgitaly-18.5.1 → hgitaly-18.5.3}/hgitaly/service/repository.py +0 -0
  66. {hgitaly-18.5.1 → hgitaly-18.5.3}/hgitaly/service/server.py +0 -0
  67. {hgitaly-18.5.1 → hgitaly-18.5.3}/hgitaly/service/tests/__init__.py +0 -0
  68. {hgitaly-18.5.1 → hgitaly-18.5.3}/hgitaly/service/tests/fixture.py +0 -0
  69. {hgitaly-18.5.1 → hgitaly-18.5.3}/hgitaly/service/tests/test_analysis.py +0 -0
  70. {hgitaly-18.5.1 → hgitaly-18.5.3}/hgitaly/service/tests/test_blob.py +0 -0
  71. {hgitaly-18.5.1 → hgitaly-18.5.3}/hgitaly/service/tests/test_commit.py +0 -0
  72. {hgitaly-18.5.1 → hgitaly-18.5.3}/hgitaly/service/tests/test_default_branch.py +0 -0
  73. {hgitaly-18.5.1 → hgitaly-18.5.3}/hgitaly/service/tests/test_diff.py +0 -0
  74. {hgitaly-18.5.1 → hgitaly-18.5.3}/hgitaly/service/tests/test_mercurial_changeset.py +0 -0
  75. {hgitaly-18.5.1 → hgitaly-18.5.3}/hgitaly/service/tests/test_mercurial_namespace.py +0 -0
  76. {hgitaly-18.5.1 → hgitaly-18.5.3}/hgitaly/service/tests/test_mercurial_operations.py +0 -0
  77. {hgitaly-18.5.1 → hgitaly-18.5.3}/hgitaly/service/tests/test_mercurial_repository.py +0 -0
  78. {hgitaly-18.5.1 → hgitaly-18.5.3}/hgitaly/service/tests/test_operations.py +0 -0
  79. {hgitaly-18.5.1 → hgitaly-18.5.3}/hgitaly/service/tests/test_ref.py +0 -0
  80. {hgitaly-18.5.1 → hgitaly-18.5.3}/hgitaly/service/tests/test_repository_service.py +0 -0
  81. {hgitaly-18.5.1 → hgitaly-18.5.3}/hgitaly/service/tests/test_server.py +0 -0
  82. {hgitaly-18.5.1 → hgitaly-18.5.3}/hgitaly/servicer.py +0 -0
  83. {hgitaly-18.5.1 → hgitaly-18.5.3}/hgitaly/ssh.py +0 -0
  84. {hgitaly-18.5.1 → hgitaly-18.5.3}/hgitaly/stream.py +0 -0
  85. {hgitaly-18.5.1 → hgitaly-18.5.3}/hgitaly/stub/__init__.py +0 -0
  86. {hgitaly-18.5.1 → hgitaly-18.5.3}/hgitaly/stub/analysis_pb2.py +0 -0
  87. {hgitaly-18.5.1 → hgitaly-18.5.3}/hgitaly/stub/analysis_pb2_grpc.py +0 -0
  88. {hgitaly-18.5.1 → hgitaly-18.5.3}/hgitaly/stub/blob_pb2.py +0 -0
  89. {hgitaly-18.5.1 → hgitaly-18.5.3}/hgitaly/stub/blob_pb2_grpc.py +0 -0
  90. {hgitaly-18.5.1 → hgitaly-18.5.3}/hgitaly/stub/commit_pb2.py +0 -0
  91. {hgitaly-18.5.1 → hgitaly-18.5.3}/hgitaly/stub/commit_pb2_grpc.py +0 -0
  92. {hgitaly-18.5.1 → hgitaly-18.5.3}/hgitaly/stub/diff_pb2.py +0 -0
  93. {hgitaly-18.5.1 → hgitaly-18.5.3}/hgitaly/stub/diff_pb2_grpc.py +0 -0
  94. {hgitaly-18.5.1 → hgitaly-18.5.3}/hgitaly/stub/errors_pb2.py +0 -0
  95. {hgitaly-18.5.1 → hgitaly-18.5.3}/hgitaly/stub/errors_pb2_grpc.py +0 -0
  96. {hgitaly-18.5.1 → hgitaly-18.5.3}/hgitaly/stub/lint_pb2.py +0 -0
  97. {hgitaly-18.5.1 → hgitaly-18.5.3}/hgitaly/stub/lint_pb2_grpc.py +0 -0
  98. {hgitaly-18.5.1 → hgitaly-18.5.3}/hgitaly/stub/mercurial_aux_git_pb2.py +0 -0
  99. {hgitaly-18.5.1 → hgitaly-18.5.3}/hgitaly/stub/mercurial_aux_git_pb2_grpc.py +0 -0
  100. {hgitaly-18.5.1 → hgitaly-18.5.3}/hgitaly/stub/mercurial_changeset_pb2.py +0 -0
  101. {hgitaly-18.5.1 → hgitaly-18.5.3}/hgitaly/stub/mercurial_changeset_pb2_grpc.py +0 -0
  102. {hgitaly-18.5.1 → hgitaly-18.5.3}/hgitaly/stub/mercurial_namespace_pb2.py +0 -0
  103. {hgitaly-18.5.1 → hgitaly-18.5.3}/hgitaly/stub/mercurial_namespace_pb2_grpc.py +0 -0
  104. {hgitaly-18.5.1 → hgitaly-18.5.3}/hgitaly/stub/mercurial_operations_pb2.py +0 -0
  105. {hgitaly-18.5.1 → hgitaly-18.5.3}/hgitaly/stub/mercurial_operations_pb2_grpc.py +0 -0
  106. {hgitaly-18.5.1 → hgitaly-18.5.3}/hgitaly/stub/mercurial_repository_pb2.py +0 -0
  107. {hgitaly-18.5.1 → hgitaly-18.5.3}/hgitaly/stub/mercurial_repository_pb2_grpc.py +0 -0
  108. {hgitaly-18.5.1 → hgitaly-18.5.3}/hgitaly/stub/operations_pb2.py +0 -0
  109. {hgitaly-18.5.1 → hgitaly-18.5.3}/hgitaly/stub/operations_pb2_grpc.py +0 -0
  110. {hgitaly-18.5.1 → hgitaly-18.5.3}/hgitaly/stub/ref_pb2.py +0 -0
  111. {hgitaly-18.5.1 → hgitaly-18.5.3}/hgitaly/stub/ref_pb2_grpc.py +0 -0
  112. {hgitaly-18.5.1 → hgitaly-18.5.3}/hgitaly/stub/remote_pb2.py +0 -0
  113. {hgitaly-18.5.1 → hgitaly-18.5.3}/hgitaly/stub/remote_pb2_grpc.py +0 -0
  114. {hgitaly-18.5.1 → hgitaly-18.5.3}/hgitaly/stub/repository_pb2.py +0 -0
  115. {hgitaly-18.5.1 → hgitaly-18.5.3}/hgitaly/stub/repository_pb2_grpc.py +0 -0
  116. {hgitaly-18.5.1 → hgitaly-18.5.3}/hgitaly/stub/server_pb2.py +0 -0
  117. {hgitaly-18.5.1 → hgitaly-18.5.3}/hgitaly/stub/server_pb2_grpc.py +0 -0
  118. {hgitaly-18.5.1 → hgitaly-18.5.3}/hgitaly/stub/shared_pb2.py +0 -0
  119. {hgitaly-18.5.1 → hgitaly-18.5.3}/hgitaly/stub/shared_pb2_grpc.py +0 -0
  120. {hgitaly-18.5.1 → hgitaly-18.5.3}/hgitaly/tag.py +0 -0
  121. {hgitaly-18.5.1 → hgitaly-18.5.3}/hgitaly/testing/__init__.py +0 -0
  122. {hgitaly-18.5.1 → hgitaly-18.5.3}/hgitaly/testing/bundle.py +0 -0
  123. {hgitaly-18.5.1 → hgitaly-18.5.3}/hgitaly/testing/context.py +0 -0
  124. {hgitaly-18.5.1 → hgitaly-18.5.3}/hgitaly/testing/grpc.py +0 -0
  125. {hgitaly-18.5.1 → hgitaly-18.5.3}/hgitaly/testing/multiprocessing.py +0 -0
  126. {hgitaly-18.5.1 → hgitaly-18.5.3}/hgitaly/testing/repo.py +0 -0
  127. {hgitaly-18.5.1 → hgitaly-18.5.3}/hgitaly/testing/ssh.py +0 -0
  128. {hgitaly-18.5.1 → hgitaly-18.5.3}/hgitaly/testing/sshd.py +0 -0
  129. {hgitaly-18.5.1 → hgitaly-18.5.3}/hgitaly/testing/storage.py +0 -0
  130. {hgitaly-18.5.1 → hgitaly-18.5.3}/hgitaly/testing/tests/__init__.py +0 -0
  131. {hgitaly-18.5.1 → hgitaly-18.5.3}/hgitaly/testing/tests/test_sshd.py +0 -0
  132. {hgitaly-18.5.1 → hgitaly-18.5.3}/hgitaly/tests/__init__.py +0 -0
  133. {hgitaly-18.5.1 → hgitaly-18.5.3}/hgitaly/tests/common.py +0 -0
  134. {hgitaly-18.5.1 → hgitaly-18.5.3}/hgitaly/tests/test_branch.py +0 -0
  135. {hgitaly-18.5.1 → hgitaly-18.5.3}/hgitaly/tests/test_diff.py +0 -0
  136. {hgitaly-18.5.1 → hgitaly-18.5.3}/hgitaly/tests/test_errors.py +0 -0
  137. {hgitaly-18.5.1 → hgitaly-18.5.3}/hgitaly/tests/test_feature.py +0 -0
  138. {hgitaly-18.5.1 → hgitaly-18.5.3}/hgitaly/tests/test_file_context.py +0 -0
  139. {hgitaly-18.5.1 → hgitaly-18.5.3}/hgitaly/tests/test_gitlab_ref.py +0 -0
  140. {hgitaly-18.5.1 → hgitaly-18.5.3}/hgitaly/tests/test_manifest.py +0 -0
  141. {hgitaly-18.5.1 → hgitaly-18.5.3}/hgitaly/tests/test_oid.py +0 -0
  142. {hgitaly-18.5.1 → hgitaly-18.5.3}/hgitaly/tests/test_peer.py +0 -0
  143. {hgitaly-18.5.1 → hgitaly-18.5.3}/hgitaly/tests/test_repository.py +0 -0
  144. {hgitaly-18.5.1 → hgitaly-18.5.3}/hgitaly/tests/test_revision.py +0 -0
  145. {hgitaly-18.5.1 → hgitaly-18.5.3}/hgitaly/tests/test_revset.py +0 -0
  146. {hgitaly-18.5.1 → hgitaly-18.5.3}/hgitaly/tests/test_servicer.py +0 -0
  147. {hgitaly-18.5.1 → hgitaly-18.5.3}/hgitaly/tests/test_stream.py +0 -0
  148. {hgitaly-18.5.1 → hgitaly-18.5.3}/hgitaly/tests/test_tag.py +0 -0
  149. {hgitaly-18.5.1 → hgitaly-18.5.3}/hgitaly/tests/test_workdir.py +0 -0
  150. {hgitaly-18.5.1 → hgitaly-18.5.3}/hgitaly/util.py +0 -0
  151. {hgitaly-18.5.1 → hgitaly-18.5.3}/hgitaly/workdir.py +0 -0
  152. {hgitaly-18.5.1 → hgitaly-18.5.3}/hgitaly.egg-info/SOURCES.txt +0 -0
  153. {hgitaly-18.5.1 → hgitaly-18.5.3}/hgitaly.egg-info/dependency_links.txt +0 -0
  154. {hgitaly-18.5.1 → hgitaly-18.5.3}/hgitaly.egg-info/entry_points.txt +0 -0
  155. {hgitaly-18.5.1 → hgitaly-18.5.3}/hgitaly.egg-info/top_level.txt +0 -0
  156. {hgitaly-18.5.1 → hgitaly-18.5.3}/setup.cfg +0 -0
  157. {hgitaly-18.5.1 → hgitaly-18.5.3}/setup.py +0 -0
  158. {hgitaly-18.5.1 → hgitaly-18.5.3}/tests_with_gitaly/__init__.py +0 -0
  159. {hgitaly-18.5.1 → hgitaly-18.5.3}/tests_with_gitaly/comparison.py +0 -0
  160. {hgitaly-18.5.1 → hgitaly-18.5.3}/tests_with_gitaly/conftest.py +0 -0
  161. {hgitaly-18.5.1 → hgitaly-18.5.3}/tests_with_gitaly/gitaly.py +0 -0
  162. {hgitaly-18.5.1 → hgitaly-18.5.3}/tests_with_gitaly/hgitaly_rhgitaly_comparison.py +0 -0
  163. {hgitaly-18.5.1 → hgitaly-18.5.3}/tests_with_gitaly/rhgitaly.py +0 -0
  164. {hgitaly-18.5.1 → hgitaly-18.5.3}/tests_with_gitaly/test_blob_tree.py +0 -0
  165. {hgitaly-18.5.1 → hgitaly-18.5.3}/tests_with_gitaly/test_commit.py +0 -0
  166. {hgitaly-18.5.1 → hgitaly-18.5.3}/tests_with_gitaly/test_comparison.py +0 -0
  167. {hgitaly-18.5.1 → hgitaly-18.5.3}/tests_with_gitaly/test_diff.py +0 -0
  168. {hgitaly-18.5.1 → hgitaly-18.5.3}/tests_with_gitaly/test_gitaly_server.py +0 -0
  169. {hgitaly-18.5.1 → hgitaly-18.5.3}/tests_with_gitaly/test_mercurial_aux_git.py +0 -0
  170. {hgitaly-18.5.1 → hgitaly-18.5.3}/tests_with_gitaly/test_mercurial_operations.py +0 -0
  171. {hgitaly-18.5.1 → hgitaly-18.5.3}/tests_with_gitaly/test_mercurial_repository.py +0 -0
  172. {hgitaly-18.5.1 → hgitaly-18.5.3}/tests_with_gitaly/test_operations.py +0 -0
  173. {hgitaly-18.5.1 → hgitaly-18.5.3}/tests_with_gitaly/test_remote.py +0 -0
  174. {hgitaly-18.5.1 → hgitaly-18.5.3}/tests_with_gitaly/test_rhgitaly_server.py +0 -0
  175. {hgitaly-18.5.1 → hgitaly-18.5.3}/tests_with_gitaly/test_server.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: hgitaly
3
- Version: 18.5.1
3
+ Version: 18.5.3
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
@@ -12,8 +12,8 @@ Description-Content-Type: text/markdown
12
12
  License-File: LICENSE
13
13
  Requires-Dist: heptapod>=5.4.0
14
14
  Requires-Dist: protobuf~=6.31.1
15
- Requires-Dist: grpcio~=1.75.0
16
- Requires-Dist: grpcio-status~=1.75.0
15
+ Requires-Dist: grpcio~=1.76.0
16
+ Requires-Dist: grpcio-status~=1.76.0
17
17
  Requires-Dist: grpc-interceptor
18
18
  Requires-Dist: grpcio-health-checking
19
19
  Requires-Dist: hg-loggingmod>=0.4.1
@@ -7,6 +7,7 @@
7
7
 
8
8
  # flake8: noqa E402
9
9
  import os
10
+ from pathlib import Path
10
11
  import time
11
12
  from mercurial.i18n import _
12
13
  from mercurial import (
@@ -28,6 +29,9 @@ from hgitaly.server import (
28
29
  )
29
30
  from . import revset
30
31
 
32
+ DEFAULT_CLIENT_ID_SLUG = b'self-client.uuid'
33
+
34
+
31
35
  if util.safehasattr(registrar, 'configitem'):
32
36
 
33
37
  configtable = {}
@@ -74,6 +78,13 @@ def reraise_abort(msg, exc):
74
78
  b'No forking occurs, the main process is the single worker. '
75
79
  b'In particular the hgitaly.workers configuration item is '
76
80
  b'ignored.')),
81
+ (b'', b'client-id-file-name',
82
+ DEFAULT_CLIENT_ID_SLUG,
83
+ _(b'Specify the Client ID file name. This is useful for mono workers '
84
+ b'in externally managed pools (RHGitaly managed sidecar), hence '
85
+ b'having distinct Incarnation IDs, so that they do not steal each other '
86
+ b'working directories.',
87
+ )),
77
88
  ],
78
89
  _(b'[OPTIONS]...'),
79
90
  norepo=True
@@ -111,7 +122,9 @@ def serve(ui, **opts):
111
122
  ))
112
123
  config_root = os.fsdecode(ui.config(b'hgitaly', b'configuration-root',
113
124
  default=repos_root))
114
- ensure_client_id(config_root)
125
+ client_id_slug = opts.get('client_id_file_name', DEFAULT_CLIENT_ID_SLUG)
126
+ client_id_path = Path(config_root) / '+hgitaly' / os.fsdecode(client_id_slug)
127
+ ensure_client_id(client_id_path)
115
128
  nb_workers = ui.configint(b'hgitaly', b'workers')
116
129
  run_opts = dict(nb_workers=nb_workers,
117
130
  restart_done_workers=True,
@@ -0,0 +1 @@
1
+ 18.5.3
@@ -20,9 +20,8 @@ restarted since the recording, and thus that the operation is obsolete
20
20
  killed).
21
21
 
22
22
  An HGitaly server is always consider to be its own client, even if it accesses
23
- the resources flagged with these IDs in-process rathere than through gRPC.
23
+ the resources flagged with these IDs in-process rather than through gRPC.
24
24
  """
25
- from pathlib import Path
26
25
  import time
27
26
  import uuid
28
27
 
@@ -31,13 +30,14 @@ CLIENT_ID_SLUG = '+hgitaly/self-client.uuid'
31
30
  CLIENT_ID = None # initialized at startup
32
31
 
33
32
 
34
- def ensure_client_id(config_root):
33
+ def ensure_client_id(path):
35
34
  """To be used in startup sequence, before any concurrency is possible."""
36
35
  global CLIENT_ID
37
36
 
38
- path = Path(config_root) / CLIENT_ID_SLUG
39
37
  if path.exists():
40
- CLIENT_ID = path.read_text().strip()
38
+ # chances that anything or anyone creates a non-utf8 Client ID are very
39
+ # slim (and it would be immediately noticed)
40
+ CLIENT_ID = path.read_text(encoding='utf-8').strip()
41
41
  return
42
42
 
43
43
  client_id = str(uuid.uuid4())
@@ -248,8 +248,9 @@ def tag(name, target, tagging=None, signature_type=None):
248
248
  signature_type = SignatureType.NONE
249
249
 
250
250
  if tagging is None:
251
- tag_id = message = tag_author = None
251
+ message = tag_author = None
252
252
  message_size = 0
253
+ tag_id = pycompat.sysstr(target.hex())
253
254
  else:
254
255
  # TODO SPEC comment in `shared.proto` says the message will be
255
256
  # nullified if above a certain size and the size will be carried over,
@@ -7,6 +7,7 @@
7
7
  # SPDX-License-Identifier: GPL-2.0-or-later
8
8
  import itertools
9
9
  import logging
10
+ import threading
10
11
 
11
12
  from grpc import StatusCode
12
13
  from google.protobuf.timestamp_pb2 import Timestamp
@@ -594,10 +595,16 @@ class CommitServicer(CommitServiceServicer, HGitalyServicer):
594
595
 
595
596
  logger = LoggerAdapter(base_logger, context)
596
597
  req_log = message.Logging(request)
598
+ stop_event = threading.Event()
597
599
 
598
600
  if request.limit == 0:
599
601
  return
600
602
 
603
+ def on_rpc_done():
604
+ stop_event.set()
605
+
606
+ context.add_callback(on_rpc_done)
607
+
601
608
  repo = self.load_repo(request.repository, context)
602
609
  pats = request.paths
603
610
  # XXX: raise error if one of the path given is an empty string
@@ -621,6 +628,10 @@ class CommitServicer(CommitServiceServicer, HGitalyServicer):
621
628
  walk_opts = logcmdutil.parseopts(repo.ui, pats, opts)
622
629
  revs, _ = logcmdutil.getrevs(repo, walk_opts)
623
630
 
631
+ if stop_event.is_set(): # pragma no cover (hard to test)
632
+ logger.info("Request %r cancelled!", req_log)
633
+ return
634
+
624
635
  if request.offset > 0:
625
636
  revs = revs.slice(request.offset, len(revs))
626
637
 
@@ -638,6 +649,10 @@ class CommitServicer(CommitServiceServicer, HGitalyServicer):
638
649
 
639
650
  with_short_stats = request.include_shortstat
640
651
  for chunk in chunked(revs):
652
+ if stop_event.is_set(): # pragma no cover (hard to test)
653
+ logger.info("Request %r cancelled!", req_log)
654
+ return
655
+
641
656
  yield FindCommitsResponse(
642
657
  commits=(message.commit(repo[rev],
643
658
  include_referenced_by=incl_ref_by,
@@ -5,6 +5,7 @@
5
5
  #
6
6
  # SPDX-License-Identifier: GPL-2.0-or-later
7
7
 
8
+ from pathlib import Path
8
9
  from .. import identification
9
10
 
10
11
 
@@ -13,14 +14,15 @@ def test_incarnation_id():
13
14
 
14
15
 
15
16
  def test_ensure_client_id(tmpdir):
17
+ path = Path(tmpdir / 'client-id')
16
18
  identification.CLIENT_ID = None # can have been set by another test
17
19
 
18
- identification.ensure_client_id(tmpdir)
20
+ identification.ensure_client_id(path)
19
21
  client_id = identification.CLIENT_ID
20
22
 
21
23
  assert len(client_id.split('-')) == 5
22
24
 
23
25
  identification.CLIENT_ID = None
24
- identification.ensure_client_id(tmpdir)
26
+ identification.ensure_client_id(path)
25
27
 
26
28
  assert identification.CLIENT_ID == client_id
@@ -30,7 +30,7 @@ def test_tag(tmpdir):
30
30
  # the factory function doesn't even need the tag to actually exist
31
31
  tag = message.tag(b'v3.2.1', ctx)
32
32
  assert tag.name == b'v3.2.1'
33
- assert not tag.id
33
+ assert tag.id == ctx.hex().decode()
34
34
  assert not tag.message
35
35
  assert not tag.message_size
36
36
  assert tag.tagger == CommitAuthor()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: hgitaly
3
- Version: 18.5.1
3
+ Version: 18.5.3
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
@@ -12,8 +12,8 @@ Description-Content-Type: text/markdown
12
12
  License-File: LICENSE
13
13
  Requires-Dist: heptapod>=5.4.0
14
14
  Requires-Dist: protobuf~=6.31.1
15
- Requires-Dist: grpcio~=1.75.0
16
- Requires-Dist: grpcio-status~=1.75.0
15
+ Requires-Dist: grpcio~=1.76.0
16
+ Requires-Dist: grpcio-status~=1.76.0
17
17
  Requires-Dist: grpc-interceptor
18
18
  Requires-Dist: grpcio-health-checking
19
19
  Requires-Dist: hg-loggingmod>=0.4.1
@@ -1,7 +1,7 @@
1
1
  heptapod>=5.4.0
2
2
  protobuf~=6.31.1
3
- grpcio~=1.75.0
4
- grpcio-status~=1.75.0
3
+ grpcio~=1.76.0
4
+ grpcio-status~=1.76.0
5
5
  grpc-interceptor
6
6
  grpcio-health-checking
7
7
  hg-loggingmod>=0.4.1
@@ -1,7 +1,7 @@
1
1
  heptapod>=5.4.0
2
2
  protobuf~=6.31.1
3
- grpcio~=1.75.0
4
- grpcio-status~=1.75.0
3
+ grpcio~=1.76.0
4
+ grpcio-status~=1.76.0
5
5
  grpc-interceptor
6
6
  grpcio-health-checking
7
7
  hg-loggingmod>=0.4.1
@@ -490,15 +490,12 @@ def test_find_tag(gitaly_rhgitaly_comparison, hg_server):
490
490
 
491
491
  def normalize_response(rpc_helper, resp, **kw):
492
492
  normalize_commit_message(resp.tag.target_commit)
493
- # no tag ids in Mercurial until we can assign a tagging changeset
494
- # (requires a long-term core change)
495
- resp.tag.id = ''
496
493
 
497
494
  rpc_helper = fixture.rpc_helper(
498
495
  hg_server=hg_server,
499
496
  stub_cls=RefServiceStub,
500
497
  method_name='FindTag',
501
- response_sha_attrs=['tag.target_commit.id'],
498
+ response_sha_attrs=['tag.target_commit.id', 'tag.id'],
502
499
  request_cls=FindTagRequest,
503
500
  normalizer=normalize_response,
504
501
  )
@@ -25,6 +25,9 @@ from hgitaly import stream
25
25
  from hgitaly.stub.commit_pb2 import (
26
26
  FindCommitRequest,
27
27
  )
28
+ from hgitaly.stub.ref_pb2 import (
29
+ FindDefaultBranchNameRequest,
30
+ )
28
31
  from hgitaly.stub.repository_pb2 import (
29
32
  CreateRepositoryRequest,
30
33
  CreateBundleRequest,
@@ -47,6 +50,7 @@ from hgitaly.stub.shared_pb2 import (
47
50
  ObjectFormat,
48
51
  )
49
52
  from hgitaly.stub.commit_pb2_grpc import CommitServiceStub
53
+ from hgitaly.stub.ref_pb2_grpc import RefServiceStub
50
54
  from hgitaly.stub.repository_pb2_grpc import RepositoryServiceStub
51
55
  from hgitaly.workdir import wd_path
52
56
 
@@ -886,6 +890,14 @@ def test_write_ref(gitaly_rhgitaly_comparison, server_repos_root, hg_server):
886
890
  revision=b'HEAD').commit.id == sha2.decode()
887
891
  find_commit_helper.assert_compare(revision=b'HEAD')
888
892
 
893
+ default_branch_helper = fixture.rpc_helper(
894
+ hg_server=hg_server,
895
+ stub_cls=RefServiceStub,
896
+ method_name='FindDefaultBranchName',
897
+ request_cls=FindDefaultBranchNameRequest,
898
+ )
899
+ default_branch_helper.assert_compare()
900
+
889
901
  # old_revision is not honoured for symrefs by Gitaly:
890
902
  assert_compare(ref=b'HEAD',
891
903
  revision=default_ref,
@@ -1 +0,0 @@
1
- 18.5.1
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes