hgitaly 18.7.0a0__tar.gz → 18.7.0a1__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.0a1}/PKG-INFO +1 -1
  2. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/functional_tests/test_blob_tree.py +4 -5
  3. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/functional_tests/test_commit.py +2 -3
  4. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/functional_tests/test_ref.py +1 -0
  5. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/functional_tests/test_repository_service.py +12 -11
  6. hgitaly-18.7.0a1/hgitaly/VERSION +1 -0
  7. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/hgitaly/gitlab_ref.py +3 -39
  8. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/hgitaly/manifest.py +0 -13
  9. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/hgitaly/service/commit.py +0 -282
  10. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/hgitaly/service/repository.py +0 -86
  11. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/hgitaly/service/tests/fixture.py +0 -12
  12. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/hgitaly/service/tests/test_commit.py +8 -337
  13. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/hgitaly/service/tests/test_mercurial_operations.py +13 -53
  14. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/hgitaly/service/tests/test_operations.py +5 -25
  15. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/hgitaly/service/tests/test_repository_service.py +0 -156
  16. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/hgitaly/testing/storage.py +17 -3
  17. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/hgitaly/tests/test_gitlab_ref.py +1 -23
  18. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/hgitaly/tests/test_servicer.py +16 -8
  19. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1/hgitaly.egg-info}/PKG-INFO +1 -1
  20. hgitaly-18.7.0a0/hgitaly/VERSION +0 -1
  21. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/LICENSE +0 -0
  22. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/MANIFEST.in +0 -0
  23. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/README.md +0 -0
  24. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/functional_tests/__init__.py +0 -0
  25. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/functional_tests/comparison.py +0 -0
  26. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/functional_tests/conftest.py +0 -0
  27. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/functional_tests/gitaly.py +0 -0
  28. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/functional_tests/hgitaly_rhgitaly_comparison.py +0 -0
  29. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/functional_tests/rhgitaly.py +0 -0
  30. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/functional_tests/test_comparison.py +0 -0
  31. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/functional_tests/test_diff.py +0 -0
  32. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/functional_tests/test_gitaly_server.py +0 -0
  33. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/functional_tests/test_mercurial_aux_git.py +0 -0
  34. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/functional_tests/test_mercurial_operations.py +0 -0
  35. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/functional_tests/test_mercurial_repository.py +0 -0
  36. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/functional_tests/test_operations.py +0 -0
  37. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/functional_tests/test_remote.py +0 -0
  38. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/functional_tests/test_rhgitaly_server.py +0 -0
  39. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/functional_tests/test_server.py +0 -0
  40. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/hgext3rd/__init__.py +0 -0
  41. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/hgext3rd/hgitaly/__init__.py +0 -0
  42. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/hgext3rd/hgitaly/revset.py +0 -0
  43. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/hgext3rd/hgitaly/tests/__init__.py +0 -0
  44. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/hgext3rd/hgitaly/tests/test_revset.py +0 -0
  45. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/hgext3rd/hgitaly/tests/test_serve.py +0 -0
  46. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/hgitaly/__init__.py +0 -0
  47. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/hgitaly/branch.py +0 -0
  48. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/hgitaly/changelog.py +0 -0
  49. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/hgitaly/diff.py +0 -0
  50. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/hgitaly/errors.py +0 -0
  51. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/hgitaly/feature.py +0 -0
  52. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/hgitaly/file_content.py +0 -0
  53. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/hgitaly/file_context.py +0 -0
  54. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/hgitaly/git.py +0 -0
  55. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/hgitaly/identification.py +0 -0
  56. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/hgitaly/logging.py +0 -0
  57. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/hgitaly/message.py +0 -0
  58. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/hgitaly/oid.py +0 -0
  59. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/hgitaly/pagination.py +0 -0
  60. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/hgitaly/path.py +0 -0
  61. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/hgitaly/peer.py +0 -0
  62. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/hgitaly/procutil.py +0 -0
  63. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/hgitaly/repository.py +0 -0
  64. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/hgitaly/revision.py +0 -0
  65. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/hgitaly/revset.py +0 -0
  66. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/hgitaly/scripts.py +0 -0
  67. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/hgitaly/server/__init__.py +0 -0
  68. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/hgitaly/server/address.py +0 -0
  69. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/hgitaly/server/mono.py +0 -0
  70. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/hgitaly/server/tests/__init__.py +0 -0
  71. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/hgitaly/server/tests/test_address.py +0 -0
  72. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/hgitaly/server/tests/test_mono.py +0 -0
  73. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/hgitaly/server/tests/test_worker.py +0 -0
  74. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/hgitaly/server/worker.py +0 -0
  75. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/hgitaly/service/__init__.py +0 -0
  76. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/hgitaly/service/analysis.py +0 -0
  77. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/hgitaly/service/blob.py +0 -0
  78. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/hgitaly/service/diff.py +0 -0
  79. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/hgitaly/service/interceptors.py +0 -0
  80. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/hgitaly/service/mercurial_changeset.py +0 -0
  81. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/hgitaly/service/mercurial_namespace.py +0 -0
  82. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/hgitaly/service/mercurial_operations.py +0 -0
  83. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/hgitaly/service/mercurial_repository.py +0 -0
  84. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/hgitaly/service/operations.py +0 -0
  85. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/hgitaly/service/ref.py +0 -0
  86. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/hgitaly/service/server.py +0 -0
  87. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/hgitaly/service/tests/__init__.py +0 -0
  88. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/hgitaly/service/tests/test_analysis.py +0 -0
  89. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/hgitaly/service/tests/test_blob.py +0 -0
  90. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/hgitaly/service/tests/test_default_branch.py +0 -0
  91. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/hgitaly/service/tests/test_diff.py +0 -0
  92. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/hgitaly/service/tests/test_mercurial_changeset.py +0 -0
  93. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/hgitaly/service/tests/test_mercurial_namespace.py +0 -0
  94. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/hgitaly/service/tests/test_mercurial_repository.py +0 -0
  95. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/hgitaly/service/tests/test_ref.py +0 -0
  96. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/hgitaly/service/tests/test_server.py +0 -0
  97. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/hgitaly/servicer.py +0 -0
  98. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/hgitaly/ssh.py +0 -0
  99. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/hgitaly/stream.py +0 -0
  100. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/hgitaly/stub/__init__.py +0 -0
  101. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/hgitaly/stub/analysis_pb2.py +0 -0
  102. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/hgitaly/stub/analysis_pb2_grpc.py +0 -0
  103. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/hgitaly/stub/blob_pb2.py +0 -0
  104. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/hgitaly/stub/blob_pb2_grpc.py +0 -0
  105. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/hgitaly/stub/commit_pb2.py +0 -0
  106. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/hgitaly/stub/commit_pb2_grpc.py +0 -0
  107. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/hgitaly/stub/diff_pb2.py +0 -0
  108. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/hgitaly/stub/diff_pb2_grpc.py +0 -0
  109. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/hgitaly/stub/errors_pb2.py +0 -0
  110. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/hgitaly/stub/errors_pb2_grpc.py +0 -0
  111. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/hgitaly/stub/lint_pb2.py +0 -0
  112. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/hgitaly/stub/lint_pb2_grpc.py +0 -0
  113. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/hgitaly/stub/mercurial_aux_git_pb2.py +0 -0
  114. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/hgitaly/stub/mercurial_aux_git_pb2_grpc.py +0 -0
  115. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/hgitaly/stub/mercurial_changeset_pb2.py +0 -0
  116. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/hgitaly/stub/mercurial_changeset_pb2_grpc.py +0 -0
  117. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/hgitaly/stub/mercurial_namespace_pb2.py +0 -0
  118. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/hgitaly/stub/mercurial_namespace_pb2_grpc.py +0 -0
  119. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/hgitaly/stub/mercurial_operations_pb2.py +0 -0
  120. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/hgitaly/stub/mercurial_operations_pb2_grpc.py +0 -0
  121. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/hgitaly/stub/mercurial_repository_pb2.py +0 -0
  122. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/hgitaly/stub/mercurial_repository_pb2_grpc.py +0 -0
  123. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/hgitaly/stub/operations_pb2.py +0 -0
  124. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/hgitaly/stub/operations_pb2_grpc.py +0 -0
  125. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/hgitaly/stub/ref_pb2.py +0 -0
  126. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/hgitaly/stub/ref_pb2_grpc.py +0 -0
  127. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/hgitaly/stub/remote_pb2.py +0 -0
  128. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/hgitaly/stub/remote_pb2_grpc.py +0 -0
  129. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/hgitaly/stub/repository_pb2.py +0 -0
  130. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/hgitaly/stub/repository_pb2_grpc.py +0 -0
  131. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/hgitaly/stub/server_pb2.py +0 -0
  132. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/hgitaly/stub/server_pb2_grpc.py +0 -0
  133. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/hgitaly/stub/shared_pb2.py +0 -0
  134. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/hgitaly/stub/shared_pb2_grpc.py +0 -0
  135. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/hgitaly/tag.py +0 -0
  136. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/hgitaly/testing/__init__.py +0 -0
  137. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/hgitaly/testing/bundle.py +0 -0
  138. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/hgitaly/testing/context.py +0 -0
  139. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/hgitaly/testing/grpc.py +0 -0
  140. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/hgitaly/testing/multiprocessing.py +0 -0
  141. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/hgitaly/testing/repo.py +0 -0
  142. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/hgitaly/testing/ssh.py +0 -0
  143. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/hgitaly/testing/sshd.py +0 -0
  144. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/hgitaly/testing/tests/__init__.py +0 -0
  145. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/hgitaly/testing/tests/test_sshd.py +0 -0
  146. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/hgitaly/tests/__init__.py +0 -0
  147. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/hgitaly/tests/common.py +0 -0
  148. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/hgitaly/tests/test_branch.py +0 -0
  149. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/hgitaly/tests/test_diff.py +0 -0
  150. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/hgitaly/tests/test_errors.py +0 -0
  151. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/hgitaly/tests/test_feature.py +0 -0
  152. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/hgitaly/tests/test_file_context.py +0 -0
  153. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/hgitaly/tests/test_identification.py +0 -0
  154. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/hgitaly/tests/test_manifest.py +0 -0
  155. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/hgitaly/tests/test_messages.py +0 -0
  156. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/hgitaly/tests/test_oid.py +0 -0
  157. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/hgitaly/tests/test_peer.py +0 -0
  158. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/hgitaly/tests/test_repository.py +0 -0
  159. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/hgitaly/tests/test_revision.py +0 -0
  160. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/hgitaly/tests/test_revset.py +0 -0
  161. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/hgitaly/tests/test_stream.py +0 -0
  162. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/hgitaly/tests/test_tag.py +0 -0
  163. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/hgitaly/tests/test_workdir.py +0 -0
  164. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/hgitaly/util.py +0 -0
  165. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/hgitaly/workdir.py +0 -0
  166. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/hgitaly.egg-info/SOURCES.txt +0 -0
  167. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/hgitaly.egg-info/dependency_links.txt +0 -0
  168. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/hgitaly.egg-info/entry_points.txt +0 -0
  169. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/hgitaly.egg-info/requires.txt +0 -0
  170. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/hgitaly.egg-info/top_level.txt +0 -0
  171. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/install-requirements.txt +0 -0
  172. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/setup.cfg +0 -0
  173. {hgitaly-18.7.0a0 → hgitaly-18.7.0a1}/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.0a1
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
@@ -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")
@@ -406,8 +406,7 @@ def test_compare_list_files(gitaly_comparison):
406
406
  rpc_helper.assert_compare(revision=rev)
407
407
 
408
408
 
409
- @parametrize('hg_server', ('hgitaly', 'rhgitaly'))
410
- def test_compare_find_commit(gitaly_rhgitaly_comparison, hg_server):
409
+ def test_compare_find_commit(gitaly_rhgitaly_comparison):
411
410
  fixture = gitaly_rhgitaly_comparison
412
411
  wrapper = fixture.hg_repo_wrapper
413
412
 
@@ -416,7 +415,7 @@ def test_compare_find_commit(gitaly_rhgitaly_comparison, hg_server):
416
415
  normalize_commit_message(response.commit)
417
416
 
418
417
  rpc_helper = fixture.rpc_helper(
419
- hg_server=hg_server,
418
+ hg_server='rhgitaly',
420
419
  stub_cls=CommitServiceStub,
421
420
  method_name='FindCommit',
422
421
  request_cls=FindCommitRequest,
@@ -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.0a1
@@ -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()
@@ -22,24 +22,13 @@ from mercurial import (
22
22
  from hgext3rd.heptapod.branch import get_default_gitlab_branch
23
23
 
24
24
  from .. import (
25
- manifest,
26
25
  message,
27
26
  )
28
27
  from ..errors import (
29
28
  not_implemented,
30
29
  structured_abort,
31
30
  )
32
- from ..file_context import (
33
- git_perms,
34
- )
35
- from ..git import (
36
- OBJECT_MODE_TREE,
37
- )
38
31
  from ..logging import LoggerAdapter
39
- from ..oid import (
40
- tree_oid,
41
- blob_oid,
42
- )
43
32
  from ..pagination import (
44
33
  extract_limit,
45
34
  )
@@ -62,22 +51,14 @@ from ..stream import (
62
51
  from ..stub.commit_pb2 import (
63
52
  CommitIsAncestorRequest,
64
53
  CommitIsAncestorResponse,
65
- TreeEntryRequest,
66
- TreeEntryResponse,
67
54
  CheckObjectsExistRequest,
68
55
  CheckObjectsExistResponse,
69
56
  CountCommitsRequest,
70
57
  CountCommitsResponse,
71
58
  CountDivergingCommitsRequest,
72
59
  CountDivergingCommitsResponse,
73
- GetTreeEntriesError,
74
- GetTreeEntriesRequest,
75
- GetTreeEntriesResponse,
76
- TreeEntry,
77
60
  ListFilesRequest,
78
61
  ListFilesResponse,
79
- FindCommitRequest,
80
- FindCommitResponse,
81
62
  CommitStatsRequest,
82
63
  CommitStatsResponse,
83
64
  FindAllCommitsRequest,
@@ -100,9 +81,7 @@ from ..stub.commit_pb2 import (
100
81
  GetCommitMessagesResponse,
101
82
  )
102
83
  from ..stub.errors_pb2 import (
103
- PathError,
104
84
  PathNotFoundError,
105
- ResolveRevisionError,
106
85
  )
107
86
  from ..stub.commit_pb2_grpc import CommitServiceServicer
108
87
  from ..util import (
@@ -150,110 +129,6 @@ class CommitServicer(CommitServiceServicer, HGitalyServicer):
150
129
 
151
130
  return CommitIsAncestorResponse(value=result)
152
131
 
153
- def TreeEntry(self, request: TreeEntryRequest,
154
- context) -> TreeEntryResponse:
155
- """Return an entry of a tree.
156
-
157
- The name could be confusing with the entry for a tree: the entry
158
- can be of any type.
159
-
160
- Actually, it always yields one response message, using the empty
161
- response in case the given path does not resolve.
162
- """
163
- repo = self.load_repo(request.repository, context).unfiltered()
164
- changeset = gitlab_revision_changeset(repo, request.revision)
165
- if changeset is None:
166
- # As of v15.8.0, Gitaly error details don't give up anything
167
- context.abort(StatusCode.NOT_FOUND, "tree entry not found")
168
-
169
- sha = changeset.hex().decode('ascii')
170
- # early testing shows that even for leaf files, Gitaly ignores
171
- # trailing slashes
172
- path = request.path.rstrip(b'/')
173
-
174
- try:
175
- filectx = changeset.filectx(path)
176
- except error.ManifestLookupError:
177
- filectx = None
178
-
179
- # TODO investigate why it's not the usual WRITE_BUFFER_SIZE
180
- # The only occurrence we could find so far was a 16384 in grpc Golang
181
- # lib (size of HTTP/2 frames).
182
- # Could be because Gitaly implementation uses CopyN to send to
183
- # its chunker (in `streamio.go`) and CopyN has a buffer.
184
- buffer_size = 16384
185
- if filectx is not None:
186
- otype = TreeEntryResponse.ObjectType.BLOB
187
- oid = blob_oid(repo, sha, path)
188
- mode = git_perms(filectx)
189
- size = filectx.size()
190
- max_size = request.max_size
191
- if max_size != 0 and size > request.max_size:
192
- context.abort(
193
- StatusCode.FAILED_PRECONDITION,
194
- "object size (%d) is bigger than the maximum "
195
- "allowed size (%d)" % (size, max_size))
196
-
197
- data = filectx.data()
198
-
199
- limit = request.limit
200
- if limit != 0:
201
- data = data[:limit]
202
-
203
- offset = 0
204
- while offset < size:
205
- # only the first response of the stream carries the metadata
206
- if offset:
207
- resp = TreeEntryResponse()
208
- else:
209
- resp = TreeEntryResponse(type=otype,
210
- oid=oid,
211
- size=size,
212
- mode=mode)
213
-
214
- resp.data = data[offset:offset+buffer_size]
215
- offset += buffer_size
216
-
217
- yield resp
218
- return
219
-
220
- subtrees, file_paths = manifest.miner(changeset).ls_dir(path)
221
- if not subtrees and not file_paths:
222
- context.abort(StatusCode.NOT_FOUND, "tree entry not found")
223
-
224
- # path is an actual directory
225
-
226
- # size computation to match Git response.
227
- # The formula for size computation is meant to match the size
228
- # returned by Git, which is actually the size of the raw Git Tree
229
- # object as returned by `git-cat-file` with `<type>` parameter.
230
- #
231
- # The raw Git Tree object is a simple concatenation of entries, each
232
- # one being made of
233
- # - mode (octal representation): 6 bytes for blobs (e.g 100644),
234
- # 5 bytes for subtrees (40000)
235
- # - 0x20 (separator): 1 byte
236
- # - name of the entry
237
- # - 0x00 (separator): 1 byte
238
- # - binary SHA-1 of the object referenced by the entry: 20 bytes
239
- # Hence the total length per entry is 27 + (name length) for subtrees
240
- # and 28 + (name length) for blobs.
241
- # Finally, our `ls_dir` returns full paths from the root, so the
242
- # have to substract `len(path + b'/')`, hence `len(path) + 1`
243
- # for each entry.
244
- size = (
245
- 28 * len(file_paths) + 27 * len(subtrees)
246
- + sum(len(s) for s in subtrees) + sum(len(f) for f in file_paths)
247
- - (len(subtrees) + len(file_paths)) * (len(path) + 1)
248
- )
249
- # max_size does not apply here (see Gitaly comparison test)
250
- yield TreeEntryResponse(
251
- type=TreeEntryResponse.ObjectType.TREE,
252
- oid=tree_oid(repo, sha, path),
253
- mode=OBJECT_MODE_TREE,
254
- size=size,
255
- )
256
-
257
132
  def CountCommits(self,
258
133
  request: CountCommitsRequest,
259
134
  context) -> CountCommitsResponse:
@@ -353,142 +228,6 @@ class CommitServicer(CommitServiceServicer, HGitalyServicer):
353
228
  return CountDivergingCommitsResponse(left_count=left_count,
354
229
  right_count=right_count)
355
230
 
356
- def GetTreeEntries(self, request: GetTreeEntriesRequest,
357
- context) -> GetTreeEntriesResponse:
358
- repo = self.load_repo(request.repository, context)
359
- revision = request.revision
360
- changeset = gitlab_revision_changeset(repo, revision)
361
- if changeset is None:
362
- structured_abort(
363
- context,
364
- StatusCode.INVALID_ARGUMENT,
365
- "invalid revision or path",
366
- GetTreeEntriesError(resolve_tree=ResolveRevisionError(
367
- revision=request.revision)))
368
-
369
- repo = repo.unfiltered()
370
- sha = changeset.hex().decode('ascii')
371
- if not request.path:
372
- structured_abort(
373
- context,
374
- StatusCode.INVALID_ARGUMENT, "empty path",
375
- GetTreeEntriesError(
376
- path=PathError(path=request.path,
377
- error_type=PathError.ERROR_TYPE_EMPTY_PATH))
378
- )
379
- path = request.path.rstrip(b'/') # same as in TreeEntry
380
- if path == b'.': # special case, means the top directory
381
- path = b''
382
-
383
- blob_type = TreeEntry.EntryType.BLOB
384
- tree_type = TreeEntry.EntryType.TREE
385
- miner = manifest.miner(changeset)
386
-
387
- if request.recursive:
388
- entries = ((epath, is_dir, b'')
389
- for epath, is_dir in miner.iter_dir_recursive(path))
390
- elif request.skip_flat_paths:
391
- trees, files = miner.ls_dir(path)
392
- entries = itertools.chain(
393
- ((epath, True, b'') for epath in trees),
394
- ((epath, False, b'') for epath in files),
395
- )
396
- else:
397
- entries = miner.iter_dir_with_flat_paths(path)
398
-
399
- # TODO request.sort == SortBy.TREES_FIRST
400
- limit = extract_limit(request)
401
- if limit == 0:
402
- return # simplify things (next_cursor computation notably)
403
-
404
- # voids the advantages of iteration, but there's few choice
405
- # in the matter with sort and pagination
406
- if request.sort == GetTreeEntriesRequest.SortBy.TREES_FIRST:
407
- # each entry is (path, is_dir (bool), flat_path)
408
- # where flat_path is ignored for sorting purposes.
409
- # TODO OPTIM is it an improvement to avoid this post-processing
410
- # sort by making ManifestMiner already provide directories first?
411
- # to get an advantage, we'd need to avoid at least a list
412
- # construction
413
- entries = sorted(
414
- entries,
415
- key=lambda entry: (1 if entry[1] else 2, entry[0]))
416
- else:
417
- # TODO OPTIM because Mercurial manifests are stored in
418
- # lexicographical ordering, this sort is probably unnecessary.
419
- # In first impl of sorting and pagination, probably not worth
420
- # the risk.
421
- # Also would be neat to avoid consuming the iterator into
422
- # a least, but is it worth the added complexity if it can't
423
- # be done in the TREES_FIRST case?
424
- # What if GitLab introduces a sort direction anyway ?
425
- entries = sorted(entries) # sorts lexicographically by path
426
-
427
- if not entries:
428
- # there is no such thing as an empty directory in Mercurial
429
- try:
430
- changeset.filectx(path)
431
- except error.ManifestLookupError:
432
- if request.recursive:
433
- err_code = StatusCode.NOT_FOUND
434
- else:
435
- err_code = StatusCode.INVALID_ARGUMENT
436
- structured_abort(
437
- context,
438
- err_code,
439
- "invalid revision or path",
440
- GetTreeEntriesError(resolve_tree=ResolveRevisionError(
441
- revision=request.revision))
442
- )
443
- else:
444
- structured_abort(
445
- context,
446
- StatusCode.INVALID_ARGUMENT,
447
- "path not treeish",
448
- GetTreeEntriesError(resolve_tree=ResolveRevisionError(
449
- revision=request.revision))
450
- )
451
-
452
- def entry_oid(path, is_dir):
453
- return (tree_oid if is_dir else blob_oid)(repo, sha, path)
454
-
455
- page_token = request.pagination_params.page_token
456
- if page_token:
457
- for offset, (path, is_dir, _) in enumerate(entries):
458
- if entry_oid(path, is_dir) == page_token:
459
- break
460
- else:
461
- context.abort(StatusCode.INTERNAL,
462
- "could not find starting OID: %s" % page_token)
463
-
464
- entries = entries[offset+1:]
465
-
466
- if limit < len(entries):
467
- entries = entries[:limit]
468
- last_path, last_is_dir = entries[-1][:2]
469
- next_cursor = entry_oid(last_path, last_is_dir)
470
- else:
471
- next_cursor = ''
472
-
473
- yield from chunked_with_cursor(
474
- GetTreeEntriesResponse,
475
- entries,
476
- next_cursor=next_cursor,
477
- builder=lambda chunk: dict(
478
- entries=(
479
- TreeEntry(
480
- path=path,
481
- type=tree_type if is_dir else blob_type,
482
- oid=entry_oid(path, is_dir),
483
- commit_oid=revision,
484
- mode=(OBJECT_MODE_TREE if is_dir else
485
- git_perms(changeset.filectx(path))),
486
- flat_path=flat_path,
487
- )
488
- for path, is_dir, flat_path in chunk)
489
- )
490
- )
491
-
492
231
  def ListFiles(self, request: ListFilesRequest,
493
232
  context) -> ListFilesResponse:
494
233
  repo = self.load_repo(request.repository, context)
@@ -523,27 +262,6 @@ class CommitServicer(CommitServiceServicer, HGitalyServicer):
523
262
  deletions=removetotal,
524
263
  )
525
264
 
526
- def FindCommit(self,
527
- request: FindCommitRequest, context) -> FindCommitResponse:
528
- logger = LoggerAdapter(base_logger, context)
529
- revision = request.revision
530
- if not revision:
531
- context.abort(StatusCode.INVALID_ARGUMENT, "empty revision")
532
-
533
- repo = self.load_repo(request.repository, context)
534
- ctx = gitlab_revision_changeset(repo, revision)
535
-
536
- if ctx is None:
537
- logger.warning("FindCommit revision %r could not be found",
538
- revision)
539
- return FindCommitResponse()
540
-
541
- if ctx.rev() == NULL_REV:
542
- return FindCommitResponse()
543
-
544
- commit = message.commit(ctx)
545
- return FindCommitResponse(commit=commit)
546
-
547
265
  def FindAllCommits(self, request: FindAllCommitsRequest,
548
266
  context) -> FindAllCommitsResponse:
549
267
  logger = LoggerAdapter(base_logger, context)