hgitaly 18.7.0a1__tar.gz → 18.7.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (173) hide show
  1. {hgitaly-18.7.0a1/hgitaly.egg-info → hgitaly-18.7.1}/PKG-INFO +2 -2
  2. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/functional_tests/test_commit.py +48 -6
  3. hgitaly-18.7.1/hgitaly/VERSION +1 -0
  4. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/hgitaly/revset.py +9 -0
  5. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/hgitaly/service/commit.py +8 -0
  6. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/hgitaly/service/tests/test_commit.py +12 -0
  7. {hgitaly-18.7.0a1 → hgitaly-18.7.1/hgitaly.egg-info}/PKG-INFO +2 -2
  8. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/hgitaly.egg-info/requires.txt +1 -1
  9. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/install-requirements.txt +1 -1
  10. hgitaly-18.7.0a1/hgitaly/VERSION +0 -1
  11. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/LICENSE +0 -0
  12. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/MANIFEST.in +0 -0
  13. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/README.md +0 -0
  14. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/functional_tests/__init__.py +0 -0
  15. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/functional_tests/comparison.py +0 -0
  16. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/functional_tests/conftest.py +0 -0
  17. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/functional_tests/gitaly.py +0 -0
  18. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/functional_tests/hgitaly_rhgitaly_comparison.py +0 -0
  19. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/functional_tests/rhgitaly.py +0 -0
  20. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/functional_tests/test_blob_tree.py +0 -0
  21. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/functional_tests/test_comparison.py +0 -0
  22. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/functional_tests/test_diff.py +0 -0
  23. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/functional_tests/test_gitaly_server.py +0 -0
  24. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/functional_tests/test_mercurial_aux_git.py +0 -0
  25. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/functional_tests/test_mercurial_operations.py +0 -0
  26. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/functional_tests/test_mercurial_repository.py +0 -0
  27. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/functional_tests/test_operations.py +0 -0
  28. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/functional_tests/test_ref.py +0 -0
  29. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/functional_tests/test_remote.py +0 -0
  30. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/functional_tests/test_repository_service.py +0 -0
  31. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/functional_tests/test_rhgitaly_server.py +0 -0
  32. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/functional_tests/test_server.py +0 -0
  33. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/hgext3rd/__init__.py +0 -0
  34. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/hgext3rd/hgitaly/__init__.py +0 -0
  35. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/hgext3rd/hgitaly/revset.py +0 -0
  36. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/hgext3rd/hgitaly/tests/__init__.py +0 -0
  37. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/hgext3rd/hgitaly/tests/test_revset.py +0 -0
  38. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/hgext3rd/hgitaly/tests/test_serve.py +0 -0
  39. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/hgitaly/__init__.py +0 -0
  40. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/hgitaly/branch.py +0 -0
  41. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/hgitaly/changelog.py +0 -0
  42. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/hgitaly/diff.py +0 -0
  43. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/hgitaly/errors.py +0 -0
  44. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/hgitaly/feature.py +0 -0
  45. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/hgitaly/file_content.py +0 -0
  46. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/hgitaly/file_context.py +0 -0
  47. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/hgitaly/git.py +0 -0
  48. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/hgitaly/gitlab_ref.py +0 -0
  49. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/hgitaly/identification.py +0 -0
  50. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/hgitaly/logging.py +0 -0
  51. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/hgitaly/manifest.py +0 -0
  52. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/hgitaly/message.py +0 -0
  53. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/hgitaly/oid.py +0 -0
  54. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/hgitaly/pagination.py +0 -0
  55. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/hgitaly/path.py +0 -0
  56. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/hgitaly/peer.py +0 -0
  57. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/hgitaly/procutil.py +0 -0
  58. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/hgitaly/repository.py +0 -0
  59. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/hgitaly/revision.py +0 -0
  60. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/hgitaly/scripts.py +0 -0
  61. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/hgitaly/server/__init__.py +0 -0
  62. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/hgitaly/server/address.py +0 -0
  63. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/hgitaly/server/mono.py +0 -0
  64. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/hgitaly/server/tests/__init__.py +0 -0
  65. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/hgitaly/server/tests/test_address.py +0 -0
  66. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/hgitaly/server/tests/test_mono.py +0 -0
  67. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/hgitaly/server/tests/test_worker.py +0 -0
  68. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/hgitaly/server/worker.py +0 -0
  69. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/hgitaly/service/__init__.py +0 -0
  70. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/hgitaly/service/analysis.py +0 -0
  71. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/hgitaly/service/blob.py +0 -0
  72. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/hgitaly/service/diff.py +0 -0
  73. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/hgitaly/service/interceptors.py +0 -0
  74. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/hgitaly/service/mercurial_changeset.py +0 -0
  75. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/hgitaly/service/mercurial_namespace.py +0 -0
  76. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/hgitaly/service/mercurial_operations.py +0 -0
  77. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/hgitaly/service/mercurial_repository.py +0 -0
  78. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/hgitaly/service/operations.py +0 -0
  79. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/hgitaly/service/ref.py +0 -0
  80. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/hgitaly/service/repository.py +0 -0
  81. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/hgitaly/service/server.py +0 -0
  82. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/hgitaly/service/tests/__init__.py +0 -0
  83. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/hgitaly/service/tests/fixture.py +0 -0
  84. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/hgitaly/service/tests/test_analysis.py +0 -0
  85. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/hgitaly/service/tests/test_blob.py +0 -0
  86. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/hgitaly/service/tests/test_default_branch.py +0 -0
  87. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/hgitaly/service/tests/test_diff.py +0 -0
  88. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/hgitaly/service/tests/test_mercurial_changeset.py +0 -0
  89. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/hgitaly/service/tests/test_mercurial_namespace.py +0 -0
  90. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/hgitaly/service/tests/test_mercurial_operations.py +0 -0
  91. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/hgitaly/service/tests/test_mercurial_repository.py +0 -0
  92. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/hgitaly/service/tests/test_operations.py +0 -0
  93. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/hgitaly/service/tests/test_ref.py +0 -0
  94. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/hgitaly/service/tests/test_repository_service.py +0 -0
  95. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/hgitaly/service/tests/test_server.py +0 -0
  96. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/hgitaly/servicer.py +0 -0
  97. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/hgitaly/ssh.py +0 -0
  98. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/hgitaly/stream.py +0 -0
  99. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/hgitaly/stub/__init__.py +0 -0
  100. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/hgitaly/stub/analysis_pb2.py +0 -0
  101. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/hgitaly/stub/analysis_pb2_grpc.py +0 -0
  102. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/hgitaly/stub/blob_pb2.py +0 -0
  103. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/hgitaly/stub/blob_pb2_grpc.py +0 -0
  104. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/hgitaly/stub/commit_pb2.py +0 -0
  105. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/hgitaly/stub/commit_pb2_grpc.py +0 -0
  106. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/hgitaly/stub/diff_pb2.py +0 -0
  107. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/hgitaly/stub/diff_pb2_grpc.py +0 -0
  108. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/hgitaly/stub/errors_pb2.py +0 -0
  109. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/hgitaly/stub/errors_pb2_grpc.py +0 -0
  110. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/hgitaly/stub/lint_pb2.py +0 -0
  111. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/hgitaly/stub/lint_pb2_grpc.py +0 -0
  112. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/hgitaly/stub/mercurial_aux_git_pb2.py +0 -0
  113. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/hgitaly/stub/mercurial_aux_git_pb2_grpc.py +0 -0
  114. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/hgitaly/stub/mercurial_changeset_pb2.py +0 -0
  115. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/hgitaly/stub/mercurial_changeset_pb2_grpc.py +0 -0
  116. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/hgitaly/stub/mercurial_namespace_pb2.py +0 -0
  117. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/hgitaly/stub/mercurial_namespace_pb2_grpc.py +0 -0
  118. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/hgitaly/stub/mercurial_operations_pb2.py +0 -0
  119. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/hgitaly/stub/mercurial_operations_pb2_grpc.py +0 -0
  120. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/hgitaly/stub/mercurial_repository_pb2.py +0 -0
  121. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/hgitaly/stub/mercurial_repository_pb2_grpc.py +0 -0
  122. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/hgitaly/stub/operations_pb2.py +0 -0
  123. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/hgitaly/stub/operations_pb2_grpc.py +0 -0
  124. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/hgitaly/stub/ref_pb2.py +0 -0
  125. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/hgitaly/stub/ref_pb2_grpc.py +0 -0
  126. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/hgitaly/stub/remote_pb2.py +0 -0
  127. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/hgitaly/stub/remote_pb2_grpc.py +0 -0
  128. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/hgitaly/stub/repository_pb2.py +0 -0
  129. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/hgitaly/stub/repository_pb2_grpc.py +0 -0
  130. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/hgitaly/stub/server_pb2.py +0 -0
  131. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/hgitaly/stub/server_pb2_grpc.py +0 -0
  132. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/hgitaly/stub/shared_pb2.py +0 -0
  133. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/hgitaly/stub/shared_pb2_grpc.py +0 -0
  134. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/hgitaly/tag.py +0 -0
  135. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/hgitaly/testing/__init__.py +0 -0
  136. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/hgitaly/testing/bundle.py +0 -0
  137. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/hgitaly/testing/context.py +0 -0
  138. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/hgitaly/testing/grpc.py +0 -0
  139. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/hgitaly/testing/multiprocessing.py +0 -0
  140. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/hgitaly/testing/repo.py +0 -0
  141. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/hgitaly/testing/ssh.py +0 -0
  142. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/hgitaly/testing/sshd.py +0 -0
  143. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/hgitaly/testing/storage.py +0 -0
  144. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/hgitaly/testing/tests/__init__.py +0 -0
  145. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/hgitaly/testing/tests/test_sshd.py +0 -0
  146. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/hgitaly/tests/__init__.py +0 -0
  147. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/hgitaly/tests/common.py +0 -0
  148. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/hgitaly/tests/test_branch.py +0 -0
  149. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/hgitaly/tests/test_diff.py +0 -0
  150. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/hgitaly/tests/test_errors.py +0 -0
  151. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/hgitaly/tests/test_feature.py +0 -0
  152. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/hgitaly/tests/test_file_context.py +0 -0
  153. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/hgitaly/tests/test_gitlab_ref.py +0 -0
  154. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/hgitaly/tests/test_identification.py +0 -0
  155. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/hgitaly/tests/test_manifest.py +0 -0
  156. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/hgitaly/tests/test_messages.py +0 -0
  157. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/hgitaly/tests/test_oid.py +0 -0
  158. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/hgitaly/tests/test_peer.py +0 -0
  159. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/hgitaly/tests/test_repository.py +0 -0
  160. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/hgitaly/tests/test_revision.py +0 -0
  161. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/hgitaly/tests/test_revset.py +0 -0
  162. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/hgitaly/tests/test_servicer.py +0 -0
  163. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/hgitaly/tests/test_stream.py +0 -0
  164. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/hgitaly/tests/test_tag.py +0 -0
  165. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/hgitaly/tests/test_workdir.py +0 -0
  166. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/hgitaly/util.py +0 -0
  167. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/hgitaly/workdir.py +0 -0
  168. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/hgitaly.egg-info/SOURCES.txt +0 -0
  169. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/hgitaly.egg-info/dependency_links.txt +0 -0
  170. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/hgitaly.egg-info/entry_points.txt +0 -0
  171. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/hgitaly.egg-info/top_level.txt +0 -0
  172. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/setup.cfg +0 -0
  173. {hgitaly-18.7.0a1 → hgitaly-18.7.1}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: hgitaly
3
- Version: 18.7.0a1
3
+ Version: 18.7.1
4
4
  Summary: Server-side implementation of Gitaly protocol for Mercurial
5
5
  Home-page: https://foss.heptapod.net/heptapod/hgitaly
6
6
  Author: Georges Racinet
@@ -10,7 +10,7 @@ Keywords: hg mercurial heptapod gitlab
10
10
  Requires-Python: >=3.8
11
11
  Description-Content-Type: text/markdown
12
12
  License-File: LICENSE
13
- Requires-Dist: heptapod>=5.4.0
13
+ Requires-Dist: heptapod~=5.5.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
@@ -17,6 +17,7 @@ from hgitaly.stub.shared_pb2 import (
17
17
  from hgitaly.stub.commit_pb2 import (
18
18
  CommitLanguagesRequest,
19
19
  CommitIsAncestorRequest,
20
+ CountCommitsRequest,
20
21
  FindCommitRequest,
21
22
  FindCommitsRequest,
22
23
  LastCommitForPathRequest,
@@ -583,6 +584,12 @@ def test_compare_count_find_commits(gitaly_rhgitaly_comparison, hg_server):
583
584
  wrapper.update(2)
584
585
  ctx4 = wrapper.merge_commit(ctx3, message=b'merge with stable',
585
586
  utc_timestamp=ts+20)
587
+ unknown = b'unknown'
588
+ unknown_sha = b'cade12fe' * 5
589
+ range_with_unknown = b'..'.join((unknown_sha, ctx2.hex()))
590
+ assert_compare_errors(revision=unknown)
591
+ assert_compare_errors(revision=unknown_sha)
592
+ assert_compare_errors(revision=range_with_unknown)
586
593
 
587
594
  # when `revision` is provided as <revspec>
588
595
  with sorted_comparison():
@@ -688,7 +695,7 @@ def test_compare_count_find_commits(gitaly_rhgitaly_comparison, hg_server):
688
695
  hg_server=hg_server,
689
696
  stub_cls=CommitServiceStub,
690
697
  method_name='CountCommits',
691
- request_cls=FindCommitsRequest,
698
+ request_cls=CountCommitsRequest,
692
699
  request_sha_attrs=['revision'],
693
700
  )
694
701
 
@@ -697,7 +704,10 @@ def test_compare_count_find_commits(gitaly_rhgitaly_comparison, hg_server):
697
704
 
698
705
  # when `revision` is provided as <revspec>
699
706
  all_revs = [ctx0.hex(), ctx1.hex(), ctx2.hex(), ctx3.hex(), ctx4.hex()]
700
- for range_str in (b'..', ): # TODO symdiff not implemented
707
+ range_ops = [b'..']
708
+ if hg_server == 'rhgitaly':
709
+ range_ops.append(b'...')
710
+ for range_str in range_ops:
701
711
  for r1 in all_revs:
702
712
  for r2 in all_revs:
703
713
  assert_compare(revision=r1 + range_str + r2)
@@ -708,11 +718,27 @@ def test_compare_count_find_commits(gitaly_rhgitaly_comparison, hg_server):
708
718
  for ref in refs:
709
719
  rpc_helper.assert_compare(revision=ref)
710
720
 
721
+ for mc in (0, 1, 2, 3):
722
+ assert_compare(revision=ctx2.hex(), max_count=mc)
723
+
724
+ assert_compare(all=True)
725
+
726
+ if hg_server == 'rhgitaly':
727
+ for date in [date1, date2]:
728
+ assert_compare(revision=ctx4.hex(), after=date)
729
+ assert_compare(revision=ctx4.hex(), before=date)
730
+ assert_compare(revision=ctx4.hex(), before=date, after=date)
731
+ assert_compare(revision=ctx4.hex(), before=date1, after=date2)
732
+
711
733
  assert_compare_errors()
734
+ assert_compare(revision=unknown)
735
+ assert_compare(revision=unknown_sha)
736
+ assert_compare(revision=range_with_unknown)
712
737
 
713
738
 
714
- def test_compare_list_commits(gitaly_comparison):
715
- fixture = gitaly_comparison
739
+ @parametrize('hg_server', ('hgitaly', 'rhgitaly'))
740
+ def test_compare_list_commits(gitaly_rhgitaly_comparison, hg_server):
741
+ fixture = gitaly_rhgitaly_comparison
716
742
 
717
743
  wrapper = fixture.hg_repo_wrapper
718
744
  # set_default_gitlab_branch(wrapper.repo, b'branch/default')
@@ -720,7 +746,7 @@ def test_compare_list_commits(gitaly_comparison):
720
746
  #
721
747
  # @ 4 (branch/default) merge with stable
722
748
  # |\
723
- # | o 3 creates 'animal' (branch/stable)
749
+ # | o 3 creates 'animals' (branch/stable)
724
750
  # | |
725
751
  # o | 2 rename 'foo' to 'zoo' (user: testuser)
726
752
  # |/
@@ -741,9 +767,12 @@ def test_compare_list_commits(gitaly_comparison):
741
767
  ctx2 = wrapper.commit([b'foo', b'zoo'],
742
768
  message=b"rename foo to zoo",
743
769
  utc_timestamp=ts - 10)
770
+ # TODO the converted email by hg-git is more liberal, and would
771
+ # parse the email correctly from 'testuser <testuser@heptapod.test'.
772
+ # Same with HGitaly, compared to RHGitaly.
744
773
  ctx3 = wrapper.write_commit('animals', branch='stable', parent=ctx0,
745
774
  utc_timestamp=ts + 10,
746
- user='testuser <testuser@heptapod.test')
775
+ user='testuser <testuser@heptapod.test>')
747
776
  wrapper.update(2)
748
777
  ctx4 = wrapper.merge_commit(ctx3, message=b'merge with stable',
749
778
  utc_timestamp=ts+20)
@@ -754,6 +783,7 @@ def test_compare_list_commits(gitaly_comparison):
754
783
  normalize_commit_message(commit)
755
784
 
756
785
  rpc_helper = fixture.rpc_helper(
786
+ hg_server=hg_server,
757
787
  stub_cls=CommitServiceStub,
758
788
  method_name='ListCommits',
759
789
  request_cls=ListCommitsRequest,
@@ -811,6 +841,18 @@ def test_compare_list_commits(gitaly_comparison):
811
841
  # no result
812
842
  assert_compare(revisions=[ctx4.hex(), caret(ctx4)])
813
843
 
844
+ # with paths
845
+ assert_compare(revisions=[ctx4.hex()], paths=[b'animals'])
846
+ assert_compare(revisions=[ctx4.hex()], paths=[b'foo'])
847
+ assert_compare(revisions=[ctx4.hex()], paths=[b'zoo'])
848
+ assert_compare(revisions=[ctx3.hex(), ctx2.hex()],
849
+ paths=[b'animals', b'zoo'])
850
+ assert_compare(revisions=[ctx4.hex()], paths=[b'anim*'])
851
+ # with two paths, Git starts returning the merge
852
+ # but Mercurial does not. This seems more consistent on the Mercurial
853
+ # side, so we won't compare. It would be:
854
+ # assert_compare(revisions=[ctx4.hex()], paths=[b'anim*', b'foo'])
855
+
814
856
  # orderings
815
857
  #
816
858
  # Comparison is limited because Mercurial orderings don't exactly
@@ -0,0 +1 @@
1
+ 18.7.1
@@ -60,6 +60,9 @@ def revset_from_git_revspec(repo, revspec, for_follow=False):
60
60
  return None
61
61
  return ctx.hex() if for_follow else b"reverse(::%s)" % ctx
62
62
 
63
+ if revset is None:
64
+ return None
65
+
63
66
  return b"sort(%s, -rev)" % revset
64
67
 
65
68
 
@@ -90,6 +93,9 @@ def revset_git_range(repo, r1, r2, for_follow=False):
90
93
  raise FollowNotImplemented()
91
94
 
92
95
  ctx_start, ctx_end = resolve_git_range(repo, r1, r2)
96
+ if ctx_start is None or ctx_end is None:
97
+ return None
98
+
93
99
  return b"::%s - ::%s" % (ctx_end, ctx_start)
94
100
 
95
101
 
@@ -114,6 +120,9 @@ def revset_symmetric_difference(repo, r1, r2, for_follow=False):
114
120
  raise FollowNotImplemented()
115
121
 
116
122
  ctx_start, ctx_end = resolve_git_range(repo, r1, r2)
123
+ if ctx_start is None or ctx_end is None:
124
+ return None
125
+
117
126
  left = ctx_start.rev()
118
127
  right = ctx_end.rev()
119
128
  branchpoint = repo.revs(b"ancestor(%d, %d)" % (left, right)).first()
@@ -559,6 +559,14 @@ class CommitServicer(CommitServiceServicer, HGitalyServicer):
559
559
  if request.max_parents == 1:
560
560
  revset += b" and not merge()"
561
561
 
562
+ if request.paths:
563
+ revset += b" and ("
564
+ revset += b" or ".join(
565
+ b'file("%s/%s")' % (repo.root, p)
566
+ for p in request.paths
567
+ )
568
+ revset += b")"
569
+
562
570
  Order = ListCommitsRequest.Order
563
571
  reverse = request.reverse
564
572
 
@@ -223,6 +223,11 @@ def test_find_commits(commit_fixture_empty_repo):
223
223
  # when revision does not exists (including special Node IDs)
224
224
  for rev in (b'does_not_exists',
225
225
  b'1234deadbeaf',
226
+ b'1234dead' * 5,
227
+ b'unknown..%s' % ctx1.hex(),
228
+ b'%s..unknown' % ctx1.hex(),
229
+ b'unknown...%s' % ctx1.hex(),
230
+ b'%s...unknown' % ctx1.hex(),
226
231
  b'ffffffff' * 5,
227
232
  b'ffffffff'):
228
233
  with pytest.raises(grpc.RpcError) as exc_info:
@@ -805,6 +810,13 @@ def test_list_commits(commit_fixture_empty_repo):
805
810
  # author regexp
806
811
  assert list_commits(sha4, author=b't.stuser') == [sha3]
807
812
 
813
+ # paths
814
+ assert list_commits(sha4, paths=[b'animals']) == [sha3]
815
+ assert list_commits(sha4, paths=[b'anim*']) == [sha3]
816
+ # Mercurial does not count the merge (see also comment in Comp test)
817
+ assert list_commits(sha4,
818
+ paths=[b'foo', b'animals']) == [sha3, sha2, sha0]
819
+
808
820
  # unknown revision, including special cases:
809
821
  for unknown in ('branch/unknown',
810
822
  'f' * 39, # wdir node id, prefix
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: hgitaly
3
- Version: 18.7.0a1
3
+ Version: 18.7.1
4
4
  Summary: Server-side implementation of Gitaly protocol for Mercurial
5
5
  Home-page: https://foss.heptapod.net/heptapod/hgitaly
6
6
  Author: Georges Racinet
@@ -10,7 +10,7 @@ Keywords: hg mercurial heptapod gitlab
10
10
  Requires-Python: >=3.8
11
11
  Description-Content-Type: text/markdown
12
12
  License-File: LICENSE
13
- Requires-Dist: heptapod>=5.4.0
13
+ Requires-Dist: heptapod~=5.5.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
@@ -1,4 +1,4 @@
1
- heptapod>=5.4.0
1
+ heptapod~=5.5.0
2
2
  protobuf~=6.31.1
3
3
  grpcio~=1.76.0
4
4
  grpcio-status~=1.76.0
@@ -1,4 +1,4 @@
1
- heptapod>=5.4.0
1
+ heptapod~=5.5.0
2
2
  protobuf~=6.31.1
3
3
  grpcio~=1.76.0
4
4
  grpcio-status~=1.76.0
@@ -1 +0,0 @@
1
- 18.7.0a1
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