hgitaly 18.7.0a0__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.0a0/hgitaly.egg-info → hgitaly-18.7.1}/PKG-INFO +2 -2
  2. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/functional_tests/test_blob_tree.py +4 -5
  3. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/functional_tests/test_commit.py +50 -9
  4. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/functional_tests/test_ref.py +1 -0
  5. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/functional_tests/test_repository_service.py +12 -11
  6. hgitaly-18.7.1/hgitaly/VERSION +1 -0
  7. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/hgitaly/gitlab_ref.py +3 -39
  8. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/hgitaly/manifest.py +0 -13
  9. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/hgitaly/revset.py +9 -0
  10. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/hgitaly/service/commit.py +8 -282
  11. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/hgitaly/service/repository.py +0 -86
  12. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/hgitaly/service/tests/fixture.py +0 -12
  13. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/hgitaly/service/tests/test_commit.py +20 -337
  14. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/hgitaly/service/tests/test_mercurial_operations.py +13 -53
  15. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/hgitaly/service/tests/test_operations.py +5 -25
  16. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/hgitaly/service/tests/test_repository_service.py +0 -156
  17. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/hgitaly/testing/storage.py +17 -3
  18. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/hgitaly/tests/test_gitlab_ref.py +1 -23
  19. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/hgitaly/tests/test_servicer.py +16 -8
  20. {hgitaly-18.7.0a0 → hgitaly-18.7.1/hgitaly.egg-info}/PKG-INFO +2 -2
  21. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/hgitaly.egg-info/requires.txt +1 -1
  22. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/install-requirements.txt +1 -1
  23. hgitaly-18.7.0a0/hgitaly/VERSION +0 -1
  24. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/LICENSE +0 -0
  25. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/MANIFEST.in +0 -0
  26. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/README.md +0 -0
  27. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/functional_tests/__init__.py +0 -0
  28. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/functional_tests/comparison.py +0 -0
  29. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/functional_tests/conftest.py +0 -0
  30. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/functional_tests/gitaly.py +0 -0
  31. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/functional_tests/hgitaly_rhgitaly_comparison.py +0 -0
  32. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/functional_tests/rhgitaly.py +0 -0
  33. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/functional_tests/test_comparison.py +0 -0
  34. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/functional_tests/test_diff.py +0 -0
  35. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/functional_tests/test_gitaly_server.py +0 -0
  36. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/functional_tests/test_mercurial_aux_git.py +0 -0
  37. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/functional_tests/test_mercurial_operations.py +0 -0
  38. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/functional_tests/test_mercurial_repository.py +0 -0
  39. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/functional_tests/test_operations.py +0 -0
  40. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/functional_tests/test_remote.py +0 -0
  41. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/functional_tests/test_rhgitaly_server.py +0 -0
  42. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/functional_tests/test_server.py +0 -0
  43. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/hgext3rd/__init__.py +0 -0
  44. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/hgext3rd/hgitaly/__init__.py +0 -0
  45. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/hgext3rd/hgitaly/revset.py +0 -0
  46. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/hgext3rd/hgitaly/tests/__init__.py +0 -0
  47. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/hgext3rd/hgitaly/tests/test_revset.py +0 -0
  48. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/hgext3rd/hgitaly/tests/test_serve.py +0 -0
  49. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/hgitaly/__init__.py +0 -0
  50. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/hgitaly/branch.py +0 -0
  51. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/hgitaly/changelog.py +0 -0
  52. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/hgitaly/diff.py +0 -0
  53. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/hgitaly/errors.py +0 -0
  54. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/hgitaly/feature.py +0 -0
  55. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/hgitaly/file_content.py +0 -0
  56. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/hgitaly/file_context.py +0 -0
  57. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/hgitaly/git.py +0 -0
  58. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/hgitaly/identification.py +0 -0
  59. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/hgitaly/logging.py +0 -0
  60. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/hgitaly/message.py +0 -0
  61. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/hgitaly/oid.py +0 -0
  62. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/hgitaly/pagination.py +0 -0
  63. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/hgitaly/path.py +0 -0
  64. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/hgitaly/peer.py +0 -0
  65. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/hgitaly/procutil.py +0 -0
  66. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/hgitaly/repository.py +0 -0
  67. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/hgitaly/revision.py +0 -0
  68. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/hgitaly/scripts.py +0 -0
  69. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/hgitaly/server/__init__.py +0 -0
  70. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/hgitaly/server/address.py +0 -0
  71. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/hgitaly/server/mono.py +0 -0
  72. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/hgitaly/server/tests/__init__.py +0 -0
  73. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/hgitaly/server/tests/test_address.py +0 -0
  74. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/hgitaly/server/tests/test_mono.py +0 -0
  75. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/hgitaly/server/tests/test_worker.py +0 -0
  76. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/hgitaly/server/worker.py +0 -0
  77. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/hgitaly/service/__init__.py +0 -0
  78. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/hgitaly/service/analysis.py +0 -0
  79. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/hgitaly/service/blob.py +0 -0
  80. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/hgitaly/service/diff.py +0 -0
  81. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/hgitaly/service/interceptors.py +0 -0
  82. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/hgitaly/service/mercurial_changeset.py +0 -0
  83. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/hgitaly/service/mercurial_namespace.py +0 -0
  84. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/hgitaly/service/mercurial_operations.py +0 -0
  85. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/hgitaly/service/mercurial_repository.py +0 -0
  86. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/hgitaly/service/operations.py +0 -0
  87. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/hgitaly/service/ref.py +0 -0
  88. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/hgitaly/service/server.py +0 -0
  89. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/hgitaly/service/tests/__init__.py +0 -0
  90. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/hgitaly/service/tests/test_analysis.py +0 -0
  91. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/hgitaly/service/tests/test_blob.py +0 -0
  92. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/hgitaly/service/tests/test_default_branch.py +0 -0
  93. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/hgitaly/service/tests/test_diff.py +0 -0
  94. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/hgitaly/service/tests/test_mercurial_changeset.py +0 -0
  95. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/hgitaly/service/tests/test_mercurial_namespace.py +0 -0
  96. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/hgitaly/service/tests/test_mercurial_repository.py +0 -0
  97. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/hgitaly/service/tests/test_ref.py +0 -0
  98. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/hgitaly/service/tests/test_server.py +0 -0
  99. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/hgitaly/servicer.py +0 -0
  100. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/hgitaly/ssh.py +0 -0
  101. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/hgitaly/stream.py +0 -0
  102. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/hgitaly/stub/__init__.py +0 -0
  103. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/hgitaly/stub/analysis_pb2.py +0 -0
  104. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/hgitaly/stub/analysis_pb2_grpc.py +0 -0
  105. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/hgitaly/stub/blob_pb2.py +0 -0
  106. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/hgitaly/stub/blob_pb2_grpc.py +0 -0
  107. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/hgitaly/stub/commit_pb2.py +0 -0
  108. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/hgitaly/stub/commit_pb2_grpc.py +0 -0
  109. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/hgitaly/stub/diff_pb2.py +0 -0
  110. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/hgitaly/stub/diff_pb2_grpc.py +0 -0
  111. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/hgitaly/stub/errors_pb2.py +0 -0
  112. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/hgitaly/stub/errors_pb2_grpc.py +0 -0
  113. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/hgitaly/stub/lint_pb2.py +0 -0
  114. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/hgitaly/stub/lint_pb2_grpc.py +0 -0
  115. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/hgitaly/stub/mercurial_aux_git_pb2.py +0 -0
  116. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/hgitaly/stub/mercurial_aux_git_pb2_grpc.py +0 -0
  117. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/hgitaly/stub/mercurial_changeset_pb2.py +0 -0
  118. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/hgitaly/stub/mercurial_changeset_pb2_grpc.py +0 -0
  119. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/hgitaly/stub/mercurial_namespace_pb2.py +0 -0
  120. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/hgitaly/stub/mercurial_namespace_pb2_grpc.py +0 -0
  121. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/hgitaly/stub/mercurial_operations_pb2.py +0 -0
  122. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/hgitaly/stub/mercurial_operations_pb2_grpc.py +0 -0
  123. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/hgitaly/stub/mercurial_repository_pb2.py +0 -0
  124. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/hgitaly/stub/mercurial_repository_pb2_grpc.py +0 -0
  125. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/hgitaly/stub/operations_pb2.py +0 -0
  126. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/hgitaly/stub/operations_pb2_grpc.py +0 -0
  127. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/hgitaly/stub/ref_pb2.py +0 -0
  128. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/hgitaly/stub/ref_pb2_grpc.py +0 -0
  129. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/hgitaly/stub/remote_pb2.py +0 -0
  130. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/hgitaly/stub/remote_pb2_grpc.py +0 -0
  131. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/hgitaly/stub/repository_pb2.py +0 -0
  132. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/hgitaly/stub/repository_pb2_grpc.py +0 -0
  133. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/hgitaly/stub/server_pb2.py +0 -0
  134. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/hgitaly/stub/server_pb2_grpc.py +0 -0
  135. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/hgitaly/stub/shared_pb2.py +0 -0
  136. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/hgitaly/stub/shared_pb2_grpc.py +0 -0
  137. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/hgitaly/tag.py +0 -0
  138. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/hgitaly/testing/__init__.py +0 -0
  139. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/hgitaly/testing/bundle.py +0 -0
  140. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/hgitaly/testing/context.py +0 -0
  141. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/hgitaly/testing/grpc.py +0 -0
  142. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/hgitaly/testing/multiprocessing.py +0 -0
  143. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/hgitaly/testing/repo.py +0 -0
  144. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/hgitaly/testing/ssh.py +0 -0
  145. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/hgitaly/testing/sshd.py +0 -0
  146. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/hgitaly/testing/tests/__init__.py +0 -0
  147. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/hgitaly/testing/tests/test_sshd.py +0 -0
  148. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/hgitaly/tests/__init__.py +0 -0
  149. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/hgitaly/tests/common.py +0 -0
  150. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/hgitaly/tests/test_branch.py +0 -0
  151. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/hgitaly/tests/test_diff.py +0 -0
  152. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/hgitaly/tests/test_errors.py +0 -0
  153. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/hgitaly/tests/test_feature.py +0 -0
  154. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/hgitaly/tests/test_file_context.py +0 -0
  155. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/hgitaly/tests/test_identification.py +0 -0
  156. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/hgitaly/tests/test_manifest.py +0 -0
  157. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/hgitaly/tests/test_messages.py +0 -0
  158. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/hgitaly/tests/test_oid.py +0 -0
  159. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/hgitaly/tests/test_peer.py +0 -0
  160. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/hgitaly/tests/test_repository.py +0 -0
  161. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/hgitaly/tests/test_revision.py +0 -0
  162. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/hgitaly/tests/test_revset.py +0 -0
  163. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/hgitaly/tests/test_stream.py +0 -0
  164. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/hgitaly/tests/test_tag.py +0 -0
  165. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/hgitaly/tests/test_workdir.py +0 -0
  166. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/hgitaly/util.py +0 -0
  167. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/hgitaly/workdir.py +0 -0
  168. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/hgitaly.egg-info/SOURCES.txt +0 -0
  169. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/hgitaly.egg-info/dependency_links.txt +0 -0
  170. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/hgitaly.egg-info/entry_points.txt +0 -0
  171. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/hgitaly.egg-info/top_level.txt +0 -0
  172. {hgitaly-18.7.0a0 → hgitaly-18.7.1}/setup.cfg +0 -0
  173. {hgitaly-18.7.0a0 → 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.0a0
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
@@ -108,9 +108,9 @@ def oid_normalizer(oid2git):
108
108
  return normalizer
109
109
 
110
110
 
111
- @parametrize('hg_server', ('hgitaly', 'rhgitaly'))
112
- def test_compare_tree_entry_request(gitaly_rhgitaly_comparison, hg_server):
111
+ def test_compare_tree_entry_request(gitaly_rhgitaly_comparison):
113
112
  fixture = gitaly_rhgitaly_comparison
113
+ hg_server = 'rhgitaly'
114
114
 
115
115
  wrapper = fixture.hg_repo_wrapper
116
116
  wrapper.write_commit('foo', message="Some foo")
@@ -302,10 +302,9 @@ def test_compare_tree_entry_request(gitaly_rhgitaly_comparison, hg_server):
302
302
  )
303
303
 
304
304
 
305
- @parametrize('hg_server', ('hgitaly', 'rhgitaly'))
306
- def test_compare_get_tree_entries_pagination(gitaly_rhgitaly_comparison,
307
- hg_server):
305
+ def test_compare_get_tree_entries_pagination(gitaly_rhgitaly_comparison):
308
306
  fixture = gitaly_rhgitaly_comparison
307
+ hg_server = 'rhgitaly'
309
308
 
310
309
  wrapper = fixture.hg_repo_wrapper
311
310
  wrapper.write_commit('foo', message="Some foo")
@@ -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,
@@ -406,8 +407,7 @@ def test_compare_list_files(gitaly_comparison):
406
407
  rpc_helper.assert_compare(revision=rev)
407
408
 
408
409
 
409
- @parametrize('hg_server', ('hgitaly', 'rhgitaly'))
410
- def test_compare_find_commit(gitaly_rhgitaly_comparison, hg_server):
410
+ def test_compare_find_commit(gitaly_rhgitaly_comparison):
411
411
  fixture = gitaly_rhgitaly_comparison
412
412
  wrapper = fixture.hg_repo_wrapper
413
413
 
@@ -416,7 +416,7 @@ def test_compare_find_commit(gitaly_rhgitaly_comparison, hg_server):
416
416
  normalize_commit_message(response.commit)
417
417
 
418
418
  rpc_helper = fixture.rpc_helper(
419
- hg_server=hg_server,
419
+ hg_server='rhgitaly',
420
420
  stub_cls=CommitServiceStub,
421
421
  method_name='FindCommit',
422
422
  request_cls=FindCommitRequest,
@@ -584,6 +584,12 @@ def test_compare_count_find_commits(gitaly_rhgitaly_comparison, hg_server):
584
584
  wrapper.update(2)
585
585
  ctx4 = wrapper.merge_commit(ctx3, message=b'merge with stable',
586
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)
587
593
 
588
594
  # when `revision` is provided as <revspec>
589
595
  with sorted_comparison():
@@ -689,7 +695,7 @@ def test_compare_count_find_commits(gitaly_rhgitaly_comparison, hg_server):
689
695
  hg_server=hg_server,
690
696
  stub_cls=CommitServiceStub,
691
697
  method_name='CountCommits',
692
- request_cls=FindCommitsRequest,
698
+ request_cls=CountCommitsRequest,
693
699
  request_sha_attrs=['revision'],
694
700
  )
695
701
 
@@ -698,7 +704,10 @@ def test_compare_count_find_commits(gitaly_rhgitaly_comparison, hg_server):
698
704
 
699
705
  # when `revision` is provided as <revspec>
700
706
  all_revs = [ctx0.hex(), ctx1.hex(), ctx2.hex(), ctx3.hex(), ctx4.hex()]
701
- 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:
702
711
  for r1 in all_revs:
703
712
  for r2 in all_revs:
704
713
  assert_compare(revision=r1 + range_str + r2)
@@ -709,11 +718,27 @@ def test_compare_count_find_commits(gitaly_rhgitaly_comparison, hg_server):
709
718
  for ref in refs:
710
719
  rpc_helper.assert_compare(revision=ref)
711
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
+
712
733
  assert_compare_errors()
734
+ assert_compare(revision=unknown)
735
+ assert_compare(revision=unknown_sha)
736
+ assert_compare(revision=range_with_unknown)
713
737
 
714
738
 
715
- def test_compare_list_commits(gitaly_comparison):
716
- 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
717
742
 
718
743
  wrapper = fixture.hg_repo_wrapper
719
744
  # set_default_gitlab_branch(wrapper.repo, b'branch/default')
@@ -721,7 +746,7 @@ def test_compare_list_commits(gitaly_comparison):
721
746
  #
722
747
  # @ 4 (branch/default) merge with stable
723
748
  # |\
724
- # | o 3 creates 'animal' (branch/stable)
749
+ # | o 3 creates 'animals' (branch/stable)
725
750
  # | |
726
751
  # o | 2 rename 'foo' to 'zoo' (user: testuser)
727
752
  # |/
@@ -742,9 +767,12 @@ def test_compare_list_commits(gitaly_comparison):
742
767
  ctx2 = wrapper.commit([b'foo', b'zoo'],
743
768
  message=b"rename foo to zoo",
744
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.
745
773
  ctx3 = wrapper.write_commit('animals', branch='stable', parent=ctx0,
746
774
  utc_timestamp=ts + 10,
747
- user='testuser <testuser@heptapod.test')
775
+ user='testuser <testuser@heptapod.test>')
748
776
  wrapper.update(2)
749
777
  ctx4 = wrapper.merge_commit(ctx3, message=b'merge with stable',
750
778
  utc_timestamp=ts+20)
@@ -755,6 +783,7 @@ def test_compare_list_commits(gitaly_comparison):
755
783
  normalize_commit_message(commit)
756
784
 
757
785
  rpc_helper = fixture.rpc_helper(
786
+ hg_server=hg_server,
758
787
  stub_cls=CommitServiceStub,
759
788
  method_name='ListCommits',
760
789
  request_cls=ListCommitsRequest,
@@ -812,6 +841,18 @@ def test_compare_list_commits(gitaly_comparison):
812
841
  # no result
813
842
  assert_compare(revisions=[ctx4.hex(), caret(ctx4)])
814
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
+
815
856
  # orderings
816
857
  #
817
858
  # Comparison is limited because Mercurial orderings don't exactly
@@ -122,6 +122,7 @@ def test_update_references(gitaly_rhgitaly_comparison,
122
122
  normalize_commit_message(response.commit)
123
123
 
124
124
  find_commit_helper = fixture.rpc_helper(
125
+ hg_server='rhgitaly',
125
126
  stub_cls=CommitServiceStub,
126
127
  method_name='FindCommit',
127
128
  request_cls=FindCommitRequest,
@@ -77,8 +77,7 @@ TESTS_DATA_DIR = Path(__file__).parent / 'data'
77
77
  TIP_TAG_NAME = b'tip'
78
78
 
79
79
 
80
- @parametrize('hg_server', ('hgitaly', 'rhgitaly'))
81
- def test_compare_find_merge_base(gitaly_rhgitaly_comparison, hg_server):
80
+ def test_compare_find_merge_base(gitaly_rhgitaly_comparison):
82
81
  fixture = gitaly_rhgitaly_comparison
83
82
  gitaly_repo = fixture.gitaly_repo
84
83
  git_repo = fixture.git_repo
@@ -112,10 +111,7 @@ def test_compare_find_merge_base(gitaly_rhgitaly_comparison, hg_server):
112
111
  parent=node_mod.nullid).hex()
113
112
  git_shas[sha4] = git_repo.branches()[b'branch/other']['sha']
114
113
 
115
- if hg_server == 'rhgitaly':
116
- hgitaly_channel = fixture.rhgitaly_channel
117
- else:
118
- hgitaly_channel = fixture.hgitaly_channel
114
+ hgitaly_channel = fixture.rhgitaly_channel
119
115
  diff_stubs = dict(
120
116
  git=RepositoryServiceStub(fixture.gitaly_channel),
121
117
  hg=RepositoryServiceStub(hgitaly_channel),
@@ -365,11 +361,10 @@ def test_repository_size(gitaly_comparison,
365
361
  relative_path='/some/path'))
366
362
 
367
363
 
368
- @parametrize('hg_server', ('hgitaly', 'rhgitaly'))
369
364
  def test_has_local_branches(gitaly_rhgitaly_comparison,
370
- server_repos_root,
371
- hg_server):
365
+ server_repos_root):
372
366
  fixture = gitaly_rhgitaly_comparison
367
+ hg_server = 'rhgitaly'
373
368
  grpc_repo = fixture.gitaly_repo
374
369
  rpc_helper = fixture.rpc_helper(
375
370
  hg_server=hg_server,
@@ -382,6 +377,11 @@ def test_has_local_branches(gitaly_rhgitaly_comparison,
382
377
 
383
378
  assert_compare(repository=grpc_repo)
384
379
 
380
+ wrapper = fixture.hg_repo_wrapper
381
+ wrapper.commit_file('foo')
382
+ wrapper.command('gitlab-mirror')
383
+ assert_compare(repository=grpc_repo)
384
+
385
385
  # repo does not exist
386
386
  assert_compare_errors(
387
387
  same_details=False,
@@ -657,9 +657,9 @@ def test_create_bundle_from_ref_list(
657
657
  assert not target_repo_path(vcs, 'broken-bundle').exists()
658
658
 
659
659
 
660
- @parametrize('hg_server', ('hgitaly', 'rhgitaly'))
661
- def test_search_files_by_name(gitaly_rhgitaly_comparison, hg_server):
660
+ def test_search_files_by_name(gitaly_rhgitaly_comparison):
662
661
  fixture = gitaly_rhgitaly_comparison
662
+ hg_server = 'rhgitaly'
663
663
 
664
664
  wrapper = fixture.hg_repo_wrapper
665
665
  ctx0 = wrapper.write_commit('afoo', message="Some foo")
@@ -841,6 +841,7 @@ def test_write_ref(gitaly_rhgitaly_comparison, server_repos_root, hg_server):
841
841
  normalize_commit_message(response.commit)
842
842
 
843
843
  find_commit_helper = fixture.rpc_helper(
844
+ hg_server='rhgitaly',
844
845
  stub_cls=CommitServiceStub,
845
846
  method_name='FindCommit',
846
847
  request_cls=FindCommitRequest,
@@ -0,0 +1 @@
1
+ 18.7.1
@@ -13,7 +13,6 @@ utilities about refs, i.e, anything about a full ref path, such as
13
13
  or tags.
14
14
  """
15
15
  from fnmatch import fnmatch
16
- import os
17
16
  import re
18
17
 
19
18
  from heptapod.gitlab.branch import gitlab_branch_ref
@@ -23,8 +22,6 @@ from hgext3rd.heptapod.branch import (
23
22
  get_default_gitlab_branch,
24
23
  )
25
24
  from hgext3rd.heptapod.tag import gitlab_tags
26
- from hgext3rd.heptapod import ensure_gitlab_special_refs
27
- from hgext3rd.heptapod import ensure_gitlab_keep_arounds
28
25
  from hgext3rd.heptapod.special_ref import (
29
26
  GITLAB_TYPED_REFS_MISSING,
30
27
  parse_special_ref,
@@ -40,33 +37,6 @@ from hgext3rd.heptapod.keep_around import (
40
37
  DOT_HG_RX = re.compile(br'\.hg$')
41
38
 
42
39
 
43
- def has_legacy_git_repo(repo):
44
- """Return whether there is a legacy Git repo for this Mercurial repo.
45
-
46
- With "legacy" here is meant the Git repository for a non-native project.
47
- Git repositories meant for mirroring are *not* included in this scope.
48
-
49
- As of Heptapod 17.6, this is the best way to know without direct indication
50
- (from the inside) that a repository is not legacy (hg-git based).
51
- The reverse implication is false, as there are loopholes:
52
-
53
- - leftover Git repositories for Projects that have migrated to native
54
- - native projects with addition conversion for mirrors whose Git
55
- repositories have not been moved yet (bug, time to run the migration,
56
- etc.)
57
-
58
- The caller must be aware of these loopholes and avoid overwriting existing
59
- data based on the legacy Git repo. In the intended case where this is to
60
- decide on calling the `ensure` methods, this means it is ok only if there
61
- is no existing data.
62
- """
63
- # if a repository is legacy, based on hg-git conversion, is whether
64
- # it has a `.git` repository at the same location. Git repositories
65
- # for mirroring are in a different place
66
- git_path = DOT_HG_RX.sub(b'', repo.root) + b'.git'
67
- return os.path.exists(git_path)
68
-
69
-
70
40
  def gitlab_special_ref_target(repo, ref_path):
71
41
  """Return the changeset for a special ref.
72
42
 
@@ -135,8 +105,6 @@ def iter_gitlab_special_refs_as_refs(repo, deref=True, patterns=None):
135
105
  """
136
106
  all_special_refs = special_refs(repo)
137
107
  if all_special_refs is GITLAB_TYPED_REFS_MISSING:
138
- # transitional while we still have an inner Git repo
139
- # would still be the best we can do near the end of HGitaly2 milestone
140
108
  all_special_refs = ensure_special_refs(repo)
141
109
 
142
110
  for sref, sha in all_special_refs.items():
@@ -147,22 +115,18 @@ def iter_gitlab_special_refs_as_refs(repo, deref=True, patterns=None):
147
115
 
148
116
 
149
117
  def ensure_special_refs(repo):
150
- if has_legacy_git_repo(repo):
151
- return ensure_gitlab_special_refs(repo.ui, repo)
152
118
  return {}
153
119
 
154
120
 
155
121
  def ensure_keep_arounds(repo, init_empty=False):
156
- """Ensure keep around from Git repo if present or create.
122
+ """Ensure keep around file by creating it if needed
157
123
 
158
124
  An empty file is created so that the keep-arounds file is no
159
125
  more missing, but only if `init_empty` is `True`, so that
160
- responsibility is handed to the caller, than must use the
126
+ responsibility is handed to the caller, that must use the
161
127
  option only after having obtained the missing marker.
162
128
  """
163
- if has_legacy_git_repo(repo):
164
- ensure_gitlab_keep_arounds(repo.ui, repo)
165
- elif init_empty:
129
+ if init_empty:
166
130
  init_keep_arounds(repo, ())
167
131
 
168
132
 
@@ -234,19 +234,6 @@ class ManifestMiner:
234
234
  prefix + b'/'.join(flat_path) if flat_path else dir_path
235
235
  )
236
236
 
237
- def file_names_by_regexp(self, rx, subdir=b''):
238
- manifest = self.changeset.manifest()
239
- subdir_prefix = subdir + b'/' if subdir else b''
240
-
241
- for file_path in manifest.iterkeys():
242
- if not file_path.startswith(subdir_prefix):
243
- continue
244
-
245
- if rx is not None and rx.search(file_path) is None:
246
- continue
247
-
248
- yield file_path
249
-
250
237
  def iter_files_with_content(self, exclude_binary=False):
251
238
  manifest = self.changeset.manifest()
252
239
  repo = self.changeset.repo().unfiltered()
@@ -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()