hgitaly 17.8.0__tar.gz → 17.8.2__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 (306) hide show
  1. {hgitaly-17.8.0 → hgitaly-17.8.2}/PKG-INFO +1 -1
  2. hgitaly-17.8.2/hgitaly/VERSION +1 -0
  3. {hgitaly-17.8.0 → hgitaly-17.8.2}/hgitaly/gitlab_ref.py +51 -3
  4. {hgitaly-17.8.0 → hgitaly-17.8.2}/hgitaly/service/mercurial_repository.py +60 -1
  5. {hgitaly-17.8.0 → hgitaly-17.8.2}/hgitaly/service/tests/test_mercurial_repository.py +20 -0
  6. hgitaly-17.8.2/hgitaly/stub/mercurial_aux_git_pb2.py +35 -0
  7. hgitaly-17.8.2/hgitaly/stub/mercurial_aux_git_pb2_grpc.py +147 -0
  8. {hgitaly-17.8.0 → hgitaly-17.8.2}/hgitaly/stub/mercurial_repository_pb2.py +13 -5
  9. {hgitaly-17.8.0 → hgitaly-17.8.2}/hgitaly/stub/mercurial_repository_pb2_grpc.py +34 -0
  10. {hgitaly-17.8.0 → hgitaly-17.8.2}/hgitaly/tests/test_gitlab_ref.py +21 -0
  11. {hgitaly-17.8.0 → hgitaly-17.8.2}/hgitaly/tests/test_workdir.py +98 -1
  12. {hgitaly-17.8.0 → hgitaly-17.8.2}/hgitaly/workdir.py +104 -16
  13. {hgitaly-17.8.0 → hgitaly-17.8.2}/hgitaly.egg-info/PKG-INFO +1 -1
  14. {hgitaly-17.8.0 → hgitaly-17.8.2}/hgitaly.egg-info/SOURCES.txt +3 -134
  15. {hgitaly-17.8.0 → hgitaly-17.8.2}/tests_with_gitaly/comparison.py +4 -1
  16. {hgitaly-17.8.0 → hgitaly-17.8.2}/tests_with_gitaly/test_commit.py +1 -0
  17. hgitaly-17.8.2/tests_with_gitaly/test_mercurial_aux_git.py +100 -0
  18. {hgitaly-17.8.0 → hgitaly-17.8.2}/tests_with_gitaly/test_ref.py +1 -0
  19. {hgitaly-17.8.0 → hgitaly-17.8.2}/tests_with_gitaly/test_repository_service.py +2 -0
  20. hgitaly-17.8.0/.coveragerc +0 -5
  21. hgitaly-17.8.0/.gitlab-ci.yml +0 -150
  22. hgitaly-17.8.0/.hgignore +0 -34
  23. hgitaly-17.8.0/.hgtags +0 -130
  24. hgitaly-17.8.0/ci/heptapod-sftp-push +0 -31
  25. hgitaly-17.8.0/ci/heptapod-sign-package +0 -34
  26. hgitaly-17.8.0/ci/heptapod_known_hosts.ssh +0 -4
  27. hgitaly-17.8.0/ci/upload-rhgitaly +0 -43
  28. hgitaly-17.8.0/conftest.py +0 -91
  29. hgitaly-17.8.0/dev-requirements.txt +0 -2
  30. hgitaly-17.8.0/examples/client.py +0 -48
  31. hgitaly-17.8.0/examples/client_list_lcft.py +0 -55
  32. hgitaly-17.8.0/generate-stubs +0 -33
  33. hgitaly-17.8.0/hgitaly/VERSION +0 -1
  34. hgitaly-17.8.0/hgitaly/license_detector/GPL-2.sample +0 -339
  35. hgitaly-17.8.0/hgitaly/testing/data/authorized_keys +0 -1
  36. hgitaly-17.8.0/hgitaly/testing/data/backup_additional_no_git.tar +0 -0
  37. hgitaly-17.8.0/hgitaly/testing/data/id_ecdsa_user +0 -38
  38. hgitaly-17.8.0/hgitaly/testing/data/known_hosts +0 -2
  39. hgitaly-17.8.0/hgitaly/testing/data/ssh_host_ecdsa_key +0 -9
  40. hgitaly-17.8.0/hgitaly/testing/data/ssh_host_ecdsa_key.pub +0 -1
  41. hgitaly-17.8.0/hgitaly/testing/data/ssh_host_ed25519 +0 -8
  42. hgitaly-17.8.0/hgitaly/testing/data/ssh_host_ed25519.pub +0 -1
  43. hgitaly-17.8.0/hgitaly/testing/data/sshd_config +0 -17
  44. hgitaly-17.8.0/lint +0 -3
  45. hgitaly-17.8.0/protos/analysis.proto +0 -62
  46. hgitaly-17.8.0/protos/blob.proto +0 -299
  47. hgitaly-17.8.0/protos/cleanup.proto +0 -88
  48. hgitaly-17.8.0/protos/cluster.proto +0 -107
  49. hgitaly-17.8.0/protos/commit.proto +0 -985
  50. hgitaly-17.8.0/protos/conflicts.proto +0 -137
  51. hgitaly-17.8.0/protos/diff.proto +0 -622
  52. hgitaly-17.8.0/protos/errors.proto +0 -228
  53. hgitaly-17.8.0/protos/hook.proto +0 -205
  54. hgitaly-17.8.0/protos/internal.proto +0 -37
  55. hgitaly-17.8.0/protos/lint.proto +0 -75
  56. hgitaly-17.8.0/protos/log.proto +0 -147
  57. hgitaly-17.8.0/protos/mercurial-changeset.proto +0 -96
  58. hgitaly-17.8.0/protos/mercurial-operations.proto +0 -163
  59. hgitaly-17.8.0/protos/mercurial-repository.proto +0 -304
  60. hgitaly-17.8.0/protos/namespace.proto +0 -98
  61. hgitaly-17.8.0/protos/objectpool.proto +0 -173
  62. hgitaly-17.8.0/protos/operations.proto +0 -1139
  63. hgitaly-17.8.0/protos/packfile.proto +0 -26
  64. hgitaly-17.8.0/protos/partition.proto +0 -70
  65. hgitaly-17.8.0/protos/praefect.proto +0 -222
  66. hgitaly-17.8.0/protos/ref.proto +0 -593
  67. hgitaly-17.8.0/protos/remote.proto +0 -153
  68. hgitaly-17.8.0/protos/repository.proto +0 -1342
  69. hgitaly-17.8.0/protos/server.proto +0 -123
  70. hgitaly-17.8.0/protos/service_config.proto +0 -86
  71. hgitaly-17.8.0/protos/shared.proto +0 -248
  72. hgitaly-17.8.0/protos/smarthttp.proto +0 -121
  73. hgitaly-17.8.0/protos/ssh.proto +0 -109
  74. hgitaly-17.8.0/protos/transaction.proto +0 -104
  75. hgitaly-17.8.0/protos/wiki.proto +0 -211
  76. hgitaly-17.8.0/ruby/.ruby-version +0 -1
  77. hgitaly-17.8.0/ruby/Gemfile +0 -5
  78. hgitaly-17.8.0/ruby/README.md +0 -48
  79. hgitaly-17.8.0/ruby/generate-grpc-lib +0 -63
  80. hgitaly-17.8.0/ruby/hgitaly.gemspec +0 -25
  81. hgitaly-17.8.0/ruby/lib/hgitaly/mercurial-changeset_pb.rb +0 -69
  82. hgitaly-17.8.0/ruby/lib/hgitaly/mercurial-changeset_services_pb.rb +0 -25
  83. hgitaly-17.8.0/ruby/lib/hgitaly/mercurial-operations_pb.rb +0 -103
  84. hgitaly-17.8.0/ruby/lib/hgitaly/mercurial-operations_services_pb.rb +0 -39
  85. hgitaly-17.8.0/ruby/lib/hgitaly/mercurial-repository_pb.rb +0 -141
  86. hgitaly-17.8.0/ruby/lib/hgitaly/mercurial-repository_services_pb.rb +0 -77
  87. hgitaly-17.8.0/ruby/lib/hgitaly/version.rb +0 -4
  88. hgitaly-17.8.0/ruby/lib/hgitaly.rb +0 -11
  89. hgitaly-17.8.0/ruby/run.rb +0 -39
  90. hgitaly-17.8.0/run-all-tests +0 -19
  91. hgitaly-17.8.0/rust/Cargo.lock +0 -2423
  92. hgitaly-17.8.0/rust/Cargo.toml +0 -3
  93. hgitaly-17.8.0/rust/Makefile +0 -69
  94. hgitaly-17.8.0/rust/build-from-tarball.sh +0 -30
  95. hgitaly-17.8.0/rust/check-line-width +0 -48
  96. hgitaly-17.8.0/rust/dependencies/README.md +0 -19
  97. hgitaly-17.8.0/rust/dependencies/mercurial.patch +0 -48
  98. hgitaly-17.8.0/rust/dependencies/proto/google/protobuf/any.proto +0 -158
  99. hgitaly-17.8.0/rust/dependencies/proto/google/protobuf/api.proto +0 -208
  100. hgitaly-17.8.0/rust/dependencies/proto/google/protobuf/compiler/plugin.proto +0 -183
  101. hgitaly-17.8.0/rust/dependencies/proto/google/protobuf/descriptor.proto +0 -911
  102. hgitaly-17.8.0/rust/dependencies/proto/google/protobuf/duration.proto +0 -116
  103. hgitaly-17.8.0/rust/dependencies/proto/google/protobuf/empty.proto +0 -52
  104. hgitaly-17.8.0/rust/dependencies/proto/google/protobuf/field_mask.proto +0 -245
  105. hgitaly-17.8.0/rust/dependencies/proto/google/protobuf/source_context.proto +0 -48
  106. hgitaly-17.8.0/rust/dependencies/proto/google/protobuf/struct.proto +0 -95
  107. hgitaly-17.8.0/rust/dependencies/proto/google/protobuf/timestamp.proto +0 -147
  108. hgitaly-17.8.0/rust/dependencies/proto/google/protobuf/type.proto +0 -187
  109. hgitaly-17.8.0/rust/dependencies/proto/google/protobuf/wrappers.proto +0 -123
  110. hgitaly-17.8.0/rust/go-enry.rev +0 -1
  111. hgitaly-17.8.0/rust/lint +0 -14
  112. hgitaly-17.8.0/rust/mercurial.rev +0 -1
  113. hgitaly-17.8.0/rust/rhgitaly/Cargo.toml +0 -43
  114. hgitaly-17.8.0/rust/rhgitaly/build.rs +0 -44
  115. hgitaly-17.8.0/rust/rhgitaly/clippy.toml +0 -6
  116. hgitaly-17.8.0/rust/rhgitaly/src/config.rs +0 -140
  117. hgitaly-17.8.0/rust/rhgitaly/src/errors.rs +0 -123
  118. hgitaly-17.8.0/rust/rhgitaly/src/generated/README.md +0 -7
  119. hgitaly-17.8.0/rust/rhgitaly/src/git.rs +0 -293
  120. hgitaly-17.8.0/rust/rhgitaly/src/gitlab/mod.rs +0 -50
  121. hgitaly-17.8.0/rust/rhgitaly/src/gitlab/reference.rs +0 -83
  122. hgitaly-17.8.0/rust/rhgitaly/src/gitlab/revision.rs +0 -320
  123. hgitaly-17.8.0/rust/rhgitaly/src/gitlab/state.rs +0 -508
  124. hgitaly-17.8.0/rust/rhgitaly/src/glob.rs +0 -137
  125. hgitaly-17.8.0/rust/rhgitaly/src/lib.rs +0 -41
  126. hgitaly-17.8.0/rust/rhgitaly/src/main.rs +0 -115
  127. hgitaly-17.8.0/rust/rhgitaly/src/mercurial.rs +0 -1362
  128. hgitaly-17.8.0/rust/rhgitaly/src/message.rs +0 -469
  129. hgitaly-17.8.0/rust/rhgitaly/src/metadata.rs +0 -27
  130. hgitaly-17.8.0/rust/rhgitaly/src/oid.rs +0 -87
  131. hgitaly-17.8.0/rust/rhgitaly/src/process.rs +0 -39
  132. hgitaly-17.8.0/rust/rhgitaly/src/repository/mod.rs +0 -475
  133. hgitaly-17.8.0/rust/rhgitaly/src/repository/spawner.rs +0 -471
  134. hgitaly-17.8.0/rust/rhgitaly/src/service/analysis.rs +0 -184
  135. hgitaly-17.8.0/rust/rhgitaly/src/service/blob.rs +0 -256
  136. hgitaly-17.8.0/rust/rhgitaly/src/service/commit/find_commits.rs +0 -202
  137. hgitaly-17.8.0/rust/rhgitaly/src/service/commit/get_tree_entries.rs +0 -291
  138. hgitaly-17.8.0/rust/rhgitaly/src/service/commit/last_commits.rs +0 -567
  139. hgitaly-17.8.0/rust/rhgitaly/src/service/commit/mod.rs +0 -492
  140. hgitaly-17.8.0/rust/rhgitaly/src/service/commit/tree_entry.rs +0 -155
  141. hgitaly-17.8.0/rust/rhgitaly/src/service/diff.rs +0 -92
  142. hgitaly-17.8.0/rust/rhgitaly/src/service/mercurial_repository.rs +0 -435
  143. hgitaly-17.8.0/rust/rhgitaly/src/service/mod.rs +0 -14
  144. hgitaly-17.8.0/rust/rhgitaly/src/service/ref.rs +0 -634
  145. hgitaly-17.8.0/rust/rhgitaly/src/service/remote.rs +0 -668
  146. hgitaly-17.8.0/rust/rhgitaly/src/service/repository.rs +0 -275
  147. hgitaly-17.8.0/rust/rhgitaly/src/service/server.rs +0 -34
  148. hgitaly-17.8.0/rust/rhgitaly/src/sidecar.rs +0 -184
  149. hgitaly-17.8.0/rust/rhgitaly/src/ssh.rs +0 -101
  150. hgitaly-17.8.0/rust/rhgitaly/src/streaming.rs +0 -339
  151. hgitaly-17.8.0/rust/rhgitaly/src/util.rs +0 -132
  152. hgitaly-17.8.0/rust/rs-enry.rev +0 -1
  153. hgitaly-17.8.0/rust/src-tarball.sh +0 -60
  154. hgitaly-17.8.0/test-requirements.txt +0 -8
  155. {hgitaly-17.8.0 → hgitaly-17.8.2}/LICENSE +0 -0
  156. {hgitaly-17.8.0 → hgitaly-17.8.2}/MANIFEST.in +0 -0
  157. {hgitaly-17.8.0 → hgitaly-17.8.2}/README.md +0 -0
  158. {hgitaly-17.8.0 → hgitaly-17.8.2}/hgext3rd/__init__.py +0 -0
  159. {hgitaly-17.8.0 → hgitaly-17.8.2}/hgext3rd/hgitaly/__init__.py +0 -0
  160. {hgitaly-17.8.0 → hgitaly-17.8.2}/hgext3rd/hgitaly/revset.py +0 -0
  161. {hgitaly-17.8.0 → hgitaly-17.8.2}/hgext3rd/hgitaly/tests/__init__.py +0 -0
  162. {hgitaly-17.8.0 → hgitaly-17.8.2}/hgext3rd/hgitaly/tests/test_revset.py +0 -0
  163. {hgitaly-17.8.0 → hgitaly-17.8.2}/hgext3rd/hgitaly/tests/test_serve.py +0 -0
  164. {hgitaly-17.8.0 → hgitaly-17.8.2}/hgitaly/__init__.py +0 -0
  165. {hgitaly-17.8.0 → hgitaly-17.8.2}/hgitaly/branch.py +0 -0
  166. {hgitaly-17.8.0 → hgitaly-17.8.2}/hgitaly/changelog.py +0 -0
  167. {hgitaly-17.8.0 → hgitaly-17.8.2}/hgitaly/diff.py +0 -0
  168. {hgitaly-17.8.0 → hgitaly-17.8.2}/hgitaly/errors.py +0 -0
  169. {hgitaly-17.8.0 → hgitaly-17.8.2}/hgitaly/feature.py +0 -0
  170. {hgitaly-17.8.0 → hgitaly-17.8.2}/hgitaly/file_content.py +0 -0
  171. {hgitaly-17.8.0 → hgitaly-17.8.2}/hgitaly/file_context.py +0 -0
  172. {hgitaly-17.8.0 → hgitaly-17.8.2}/hgitaly/git.py +0 -0
  173. {hgitaly-17.8.0 → hgitaly-17.8.2}/hgitaly/license_detector/__init__.py +0 -0
  174. {hgitaly-17.8.0 → hgitaly-17.8.2}/hgitaly/license_detector/spdx-licenses.json +0 -0
  175. {hgitaly-17.8.0 → hgitaly-17.8.2}/hgitaly/linguist/__init__.py +0 -0
  176. {hgitaly-17.8.0 → hgitaly-17.8.2}/hgitaly/linguist/languages.json +0 -0
  177. {hgitaly-17.8.0 → hgitaly-17.8.2}/hgitaly/logging.py +0 -0
  178. {hgitaly-17.8.0 → hgitaly-17.8.2}/hgitaly/manifest.py +0 -0
  179. {hgitaly-17.8.0 → hgitaly-17.8.2}/hgitaly/message.py +0 -0
  180. {hgitaly-17.8.0 → hgitaly-17.8.2}/hgitaly/oid.py +0 -0
  181. {hgitaly-17.8.0 → hgitaly-17.8.2}/hgitaly/pagination.py +0 -0
  182. {hgitaly-17.8.0 → hgitaly-17.8.2}/hgitaly/path.py +0 -0
  183. {hgitaly-17.8.0 → hgitaly-17.8.2}/hgitaly/peer.py +0 -0
  184. {hgitaly-17.8.0 → hgitaly-17.8.2}/hgitaly/procutil.py +0 -0
  185. {hgitaly-17.8.0 → hgitaly-17.8.2}/hgitaly/repository.py +0 -0
  186. {hgitaly-17.8.0 → hgitaly-17.8.2}/hgitaly/revision.py +0 -0
  187. {hgitaly-17.8.0 → hgitaly-17.8.2}/hgitaly/revset.py +0 -0
  188. {hgitaly-17.8.0 → hgitaly-17.8.2}/hgitaly/scripts.py +0 -0
  189. {hgitaly-17.8.0 → hgitaly-17.8.2}/hgitaly/server/__init__.py +0 -0
  190. {hgitaly-17.8.0 → hgitaly-17.8.2}/hgitaly/server/address.py +0 -0
  191. {hgitaly-17.8.0 → hgitaly-17.8.2}/hgitaly/server/mono.py +0 -0
  192. {hgitaly-17.8.0 → hgitaly-17.8.2}/hgitaly/server/prefork.py +0 -0
  193. {hgitaly-17.8.0 → hgitaly-17.8.2}/hgitaly/server/tests/__init__.py +0 -0
  194. {hgitaly-17.8.0 → hgitaly-17.8.2}/hgitaly/server/tests/test_address.py +0 -0
  195. {hgitaly-17.8.0 → hgitaly-17.8.2}/hgitaly/server/tests/test_mono.py +0 -0
  196. {hgitaly-17.8.0 → hgitaly-17.8.2}/hgitaly/server/tests/test_prefork.py +0 -0
  197. {hgitaly-17.8.0 → hgitaly-17.8.2}/hgitaly/server/tests/test_worker.py +0 -0
  198. {hgitaly-17.8.0 → hgitaly-17.8.2}/hgitaly/server/worker.py +0 -0
  199. {hgitaly-17.8.0 → hgitaly-17.8.2}/hgitaly/service/__init__.py +0 -0
  200. {hgitaly-17.8.0 → hgitaly-17.8.2}/hgitaly/service/analysis.py +0 -0
  201. {hgitaly-17.8.0 → hgitaly-17.8.2}/hgitaly/service/blob.py +0 -0
  202. {hgitaly-17.8.0 → hgitaly-17.8.2}/hgitaly/service/commit.py +0 -0
  203. {hgitaly-17.8.0 → hgitaly-17.8.2}/hgitaly/service/diff.py +0 -0
  204. {hgitaly-17.8.0 → hgitaly-17.8.2}/hgitaly/service/interceptors.py +0 -0
  205. {hgitaly-17.8.0 → hgitaly-17.8.2}/hgitaly/service/mercurial_changeset.py +0 -0
  206. {hgitaly-17.8.0 → hgitaly-17.8.2}/hgitaly/service/mercurial_operations.py +0 -0
  207. {hgitaly-17.8.0 → hgitaly-17.8.2}/hgitaly/service/operations.py +0 -0
  208. {hgitaly-17.8.0 → hgitaly-17.8.2}/hgitaly/service/ref.py +0 -0
  209. {hgitaly-17.8.0 → hgitaly-17.8.2}/hgitaly/service/repository.py +0 -0
  210. {hgitaly-17.8.0 → hgitaly-17.8.2}/hgitaly/service/server.py +0 -0
  211. {hgitaly-17.8.0 → hgitaly-17.8.2}/hgitaly/service/tests/__init__.py +0 -0
  212. {hgitaly-17.8.0 → hgitaly-17.8.2}/hgitaly/service/tests/fixture.py +0 -0
  213. {hgitaly-17.8.0 → hgitaly-17.8.2}/hgitaly/service/tests/test_analysis.py +0 -0
  214. {hgitaly-17.8.0 → hgitaly-17.8.2}/hgitaly/service/tests/test_blob.py +0 -0
  215. {hgitaly-17.8.0 → hgitaly-17.8.2}/hgitaly/service/tests/test_commit.py +0 -0
  216. {hgitaly-17.8.0 → hgitaly-17.8.2}/hgitaly/service/tests/test_default_branch.py +0 -0
  217. {hgitaly-17.8.0 → hgitaly-17.8.2}/hgitaly/service/tests/test_diff.py +0 -0
  218. {hgitaly-17.8.0 → hgitaly-17.8.2}/hgitaly/service/tests/test_mercurial_changeset.py +0 -0
  219. {hgitaly-17.8.0 → hgitaly-17.8.2}/hgitaly/service/tests/test_mercurial_operations.py +0 -0
  220. {hgitaly-17.8.0 → hgitaly-17.8.2}/hgitaly/service/tests/test_operations.py +0 -0
  221. {hgitaly-17.8.0 → hgitaly-17.8.2}/hgitaly/service/tests/test_ref.py +0 -0
  222. {hgitaly-17.8.0 → hgitaly-17.8.2}/hgitaly/service/tests/test_repository_service.py +0 -0
  223. {hgitaly-17.8.0 → hgitaly-17.8.2}/hgitaly/service/tests/test_server.py +0 -0
  224. {hgitaly-17.8.0 → hgitaly-17.8.2}/hgitaly/servicer.py +0 -0
  225. {hgitaly-17.8.0 → hgitaly-17.8.2}/hgitaly/ssh.py +0 -0
  226. {hgitaly-17.8.0 → hgitaly-17.8.2}/hgitaly/stream.py +0 -0
  227. {hgitaly-17.8.0 → hgitaly-17.8.2}/hgitaly/stub/__init__.py +0 -0
  228. {hgitaly-17.8.0 → hgitaly-17.8.2}/hgitaly/stub/analysis_pb2.py +0 -0
  229. {hgitaly-17.8.0 → hgitaly-17.8.2}/hgitaly/stub/analysis_pb2_grpc.py +0 -0
  230. {hgitaly-17.8.0 → hgitaly-17.8.2}/hgitaly/stub/blob_pb2.py +0 -0
  231. {hgitaly-17.8.0 → hgitaly-17.8.2}/hgitaly/stub/blob_pb2_grpc.py +0 -0
  232. {hgitaly-17.8.0 → hgitaly-17.8.2}/hgitaly/stub/commit_pb2.py +0 -0
  233. {hgitaly-17.8.0 → hgitaly-17.8.2}/hgitaly/stub/commit_pb2_grpc.py +0 -0
  234. {hgitaly-17.8.0 → hgitaly-17.8.2}/hgitaly/stub/diff_pb2.py +0 -0
  235. {hgitaly-17.8.0 → hgitaly-17.8.2}/hgitaly/stub/diff_pb2_grpc.py +0 -0
  236. {hgitaly-17.8.0 → hgitaly-17.8.2}/hgitaly/stub/errors_pb2.py +0 -0
  237. {hgitaly-17.8.0 → hgitaly-17.8.2}/hgitaly/stub/errors_pb2_grpc.py +0 -0
  238. {hgitaly-17.8.0 → hgitaly-17.8.2}/hgitaly/stub/lint_pb2.py +0 -0
  239. {hgitaly-17.8.0 → hgitaly-17.8.2}/hgitaly/stub/lint_pb2_grpc.py +0 -0
  240. {hgitaly-17.8.0 → hgitaly-17.8.2}/hgitaly/stub/mercurial_changeset_pb2.py +0 -0
  241. {hgitaly-17.8.0 → hgitaly-17.8.2}/hgitaly/stub/mercurial_changeset_pb2_grpc.py +0 -0
  242. {hgitaly-17.8.0 → hgitaly-17.8.2}/hgitaly/stub/mercurial_operations_pb2.py +0 -0
  243. {hgitaly-17.8.0 → hgitaly-17.8.2}/hgitaly/stub/mercurial_operations_pb2_grpc.py +0 -0
  244. {hgitaly-17.8.0 → hgitaly-17.8.2}/hgitaly/stub/operations_pb2.py +0 -0
  245. {hgitaly-17.8.0 → hgitaly-17.8.2}/hgitaly/stub/operations_pb2_grpc.py +0 -0
  246. {hgitaly-17.8.0 → hgitaly-17.8.2}/hgitaly/stub/ref_pb2.py +0 -0
  247. {hgitaly-17.8.0 → hgitaly-17.8.2}/hgitaly/stub/ref_pb2_grpc.py +0 -0
  248. {hgitaly-17.8.0 → hgitaly-17.8.2}/hgitaly/stub/remote_pb2.py +0 -0
  249. {hgitaly-17.8.0 → hgitaly-17.8.2}/hgitaly/stub/remote_pb2_grpc.py +0 -0
  250. {hgitaly-17.8.0 → hgitaly-17.8.2}/hgitaly/stub/repository_pb2.py +0 -0
  251. {hgitaly-17.8.0 → hgitaly-17.8.2}/hgitaly/stub/repository_pb2_grpc.py +0 -0
  252. {hgitaly-17.8.0 → hgitaly-17.8.2}/hgitaly/stub/server_pb2.py +0 -0
  253. {hgitaly-17.8.0 → hgitaly-17.8.2}/hgitaly/stub/server_pb2_grpc.py +0 -0
  254. {hgitaly-17.8.0 → hgitaly-17.8.2}/hgitaly/stub/shared_pb2.py +0 -0
  255. {hgitaly-17.8.0 → hgitaly-17.8.2}/hgitaly/stub/shared_pb2_grpc.py +0 -0
  256. {hgitaly-17.8.0 → hgitaly-17.8.2}/hgitaly/tag.py +0 -0
  257. {hgitaly-17.8.0 → hgitaly-17.8.2}/hgitaly/testing/__init__.py +0 -0
  258. {hgitaly-17.8.0 → hgitaly-17.8.2}/hgitaly/testing/bundle.py +0 -0
  259. {hgitaly-17.8.0 → hgitaly-17.8.2}/hgitaly/testing/context.py +0 -0
  260. {hgitaly-17.8.0 → hgitaly-17.8.2}/hgitaly/testing/grpc.py +0 -0
  261. {hgitaly-17.8.0 → hgitaly-17.8.2}/hgitaly/testing/ssh.py +0 -0
  262. {hgitaly-17.8.0 → hgitaly-17.8.2}/hgitaly/testing/sshd.py +0 -0
  263. {hgitaly-17.8.0 → hgitaly-17.8.2}/hgitaly/testing/storage.py +0 -0
  264. {hgitaly-17.8.0 → hgitaly-17.8.2}/hgitaly/testing/tests/__init__.py +0 -0
  265. {hgitaly-17.8.0 → hgitaly-17.8.2}/hgitaly/testing/tests/test_sshd.py +0 -0
  266. {hgitaly-17.8.0 → hgitaly-17.8.2}/hgitaly/tests/__init__.py +0 -0
  267. {hgitaly-17.8.0 → hgitaly-17.8.2}/hgitaly/tests/common.py +0 -0
  268. {hgitaly-17.8.0 → hgitaly-17.8.2}/hgitaly/tests/test_branch.py +0 -0
  269. {hgitaly-17.8.0 → hgitaly-17.8.2}/hgitaly/tests/test_diff.py +0 -0
  270. {hgitaly-17.8.0 → hgitaly-17.8.2}/hgitaly/tests/test_errors.py +0 -0
  271. {hgitaly-17.8.0 → hgitaly-17.8.2}/hgitaly/tests/test_feature.py +0 -0
  272. {hgitaly-17.8.0 → hgitaly-17.8.2}/hgitaly/tests/test_file_context.py +0 -0
  273. {hgitaly-17.8.0 → hgitaly-17.8.2}/hgitaly/tests/test_license_detector.py +0 -0
  274. {hgitaly-17.8.0 → hgitaly-17.8.2}/hgitaly/tests/test_linguist.py +0 -0
  275. {hgitaly-17.8.0 → hgitaly-17.8.2}/hgitaly/tests/test_manifest.py +0 -0
  276. {hgitaly-17.8.0 → hgitaly-17.8.2}/hgitaly/tests/test_messages.py +0 -0
  277. {hgitaly-17.8.0 → hgitaly-17.8.2}/hgitaly/tests/test_oid.py +0 -0
  278. {hgitaly-17.8.0 → hgitaly-17.8.2}/hgitaly/tests/test_peer.py +0 -0
  279. {hgitaly-17.8.0 → hgitaly-17.8.2}/hgitaly/tests/test_repository.py +0 -0
  280. {hgitaly-17.8.0 → hgitaly-17.8.2}/hgitaly/tests/test_revision.py +0 -0
  281. {hgitaly-17.8.0 → hgitaly-17.8.2}/hgitaly/tests/test_revset.py +0 -0
  282. {hgitaly-17.8.0 → hgitaly-17.8.2}/hgitaly/tests/test_servicer.py +0 -0
  283. {hgitaly-17.8.0 → hgitaly-17.8.2}/hgitaly/tests/test_stream.py +0 -0
  284. {hgitaly-17.8.0 → hgitaly-17.8.2}/hgitaly/tests/test_tag.py +0 -0
  285. {hgitaly-17.8.0 → hgitaly-17.8.2}/hgitaly/util.py +0 -0
  286. {hgitaly-17.8.0 → hgitaly-17.8.2}/hgitaly.egg-info/dependency_links.txt +0 -0
  287. {hgitaly-17.8.0 → hgitaly-17.8.2}/hgitaly.egg-info/entry_points.txt +0 -0
  288. {hgitaly-17.8.0 → hgitaly-17.8.2}/hgitaly.egg-info/requires.txt +0 -0
  289. {hgitaly-17.8.0 → hgitaly-17.8.2}/hgitaly.egg-info/top_level.txt +0 -0
  290. {hgitaly-17.8.0 → hgitaly-17.8.2}/install-requirements.txt +0 -0
  291. {hgitaly-17.8.0 → hgitaly-17.8.2}/setup.cfg +0 -0
  292. {hgitaly-17.8.0 → hgitaly-17.8.2}/setup.py +0 -0
  293. {hgitaly-17.8.0 → hgitaly-17.8.2}/tests_with_gitaly/__init__.py +0 -0
  294. {hgitaly-17.8.0 → hgitaly-17.8.2}/tests_with_gitaly/conftest.py +0 -0
  295. {hgitaly-17.8.0 → hgitaly-17.8.2}/tests_with_gitaly/gitaly.py +0 -0
  296. {hgitaly-17.8.0 → hgitaly-17.8.2}/tests_with_gitaly/hgitaly_rhgitaly_comparison.py +0 -0
  297. {hgitaly-17.8.0 → hgitaly-17.8.2}/tests_with_gitaly/rhgitaly.py +0 -0
  298. {hgitaly-17.8.0 → hgitaly-17.8.2}/tests_with_gitaly/test_blob_tree.py +0 -0
  299. {hgitaly-17.8.0 → hgitaly-17.8.2}/tests_with_gitaly/test_comparison.py +0 -0
  300. {hgitaly-17.8.0 → hgitaly-17.8.2}/tests_with_gitaly/test_diff.py +0 -0
  301. {hgitaly-17.8.0 → hgitaly-17.8.2}/tests_with_gitaly/test_gitaly_server.py +0 -0
  302. {hgitaly-17.8.0 → hgitaly-17.8.2}/tests_with_gitaly/test_mercurial_repository.py +0 -0
  303. {hgitaly-17.8.0 → hgitaly-17.8.2}/tests_with_gitaly/test_operations.py +0 -0
  304. {hgitaly-17.8.0 → hgitaly-17.8.2}/tests_with_gitaly/test_remote.py +0 -0
  305. {hgitaly-17.8.0 → hgitaly-17.8.2}/tests_with_gitaly/test_rhgitaly_server.py +0 -0
  306. {hgitaly-17.8.0 → hgitaly-17.8.2}/tests_with_gitaly/test_server.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: hgitaly
3
- Version: 17.8.0
3
+ Version: 17.8.2
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
@@ -0,0 +1 @@
1
+ 17.8.2
@@ -13,6 +13,8 @@ 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
+ import re
16
18
 
17
19
  from heptapod.gitlab.branch import gitlab_branch_ref
18
20
  from heptapod.gitlab.tag import gitlab_tag_ref
@@ -30,10 +32,40 @@ from hgext3rd.heptapod.special_ref import (
30
32
  )
31
33
  from hgext3rd.heptapod.keep_around import (
32
34
  iter_keep_arounds,
35
+ init_keep_arounds,
33
36
  KEEP_AROUND_REF_PREFIX,
34
37
  KEEP_AROUND_REF_PREFIX_LEN,
35
38
  )
36
39
 
40
+ DOT_HG_RX = re.compile(br'\.hg$')
41
+
42
+
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
+
37
69
 
38
70
  def gitlab_special_ref_target(repo, ref_path):
39
71
  """Return the changeset for a special ref.
@@ -115,7 +147,23 @@ def iter_gitlab_special_refs_as_refs(repo, deref=True, patterns=None):
115
147
 
116
148
 
117
149
  def ensure_special_refs(repo):
118
- return ensure_gitlab_special_refs(repo.ui, repo)
150
+ if has_legacy_git_repo(repo):
151
+ return ensure_gitlab_special_refs(repo.ui, repo)
152
+ return {}
153
+
154
+
155
+ def ensure_keep_arounds(repo, init_empty=False):
156
+ """Ensure keep around from Git repo if present or create.
157
+
158
+ An empty file is created so that the keep-arounds file is no
159
+ more missing, but only if `init_empty` is `True`, so that
160
+ responsibility is handed to the caller, than must use the
161
+ option only after having obtained the missing marker.
162
+ """
163
+ if has_legacy_git_repo(repo):
164
+ ensure_gitlab_keep_arounds(repo.ui, repo)
165
+ elif init_empty:
166
+ init_keep_arounds(repo, ())
119
167
 
120
168
 
121
169
  def has_keep_around(repo, sha):
@@ -125,7 +173,7 @@ def has_keep_around(repo, sha):
125
173
  """
126
174
  for ka in iter_keep_arounds(repo):
127
175
  if ka is GITLAB_TYPED_REFS_MISSING:
128
- ensure_gitlab_keep_arounds(repo.ui, repo)
176
+ ensure_keep_arounds(repo, init_empty=True)
129
177
  return has_keep_around(repo, sha)
130
178
  if ka == sha:
131
179
  return True
@@ -146,7 +194,7 @@ def parse_keep_around_ref_path(ref):
146
194
  def iter_keep_arounds_as_refs(repo, deref=True, patterns=None):
147
195
  for sha in iter_keep_arounds(repo):
148
196
  if sha is GITLAB_TYPED_REFS_MISSING:
149
- ensure_gitlab_keep_arounds(repo.ui, repo)
197
+ ensure_keep_arounds(repo, init_empty=True)
150
198
  yield from iter_keep_arounds_as_refs(repo, deref=deref)
151
199
  return
152
200
  ref_path = keep_around_ref_path(sha)
@@ -16,6 +16,7 @@ from mercurial import (
16
16
  )
17
17
 
18
18
  from ..branch import iter_gitlab_branches_matching
19
+ from ..logging import LoggerAdapter
19
20
  from ..peer import (
20
21
  FileURLOutsidePath,
21
22
  InvalidURLScheme,
@@ -30,6 +31,10 @@ from ..repository import (
30
31
  set_config_inheritance,
31
32
  set_managed_config,
32
33
  )
34
+ from ..workdir import (
35
+ remove_unlisted_workdirs,
36
+ workdirs_gc,
37
+ )
33
38
  from ..errors import (
34
39
  not_implemented,
35
40
  )
@@ -39,6 +44,8 @@ from ..stub.mercurial_repository_pb2 import (
39
44
  GetConfigItemResponse,
40
45
  GetManagedConfigRequest,
41
46
  GetManagedConfigResponse,
47
+ HousekeepingRequest,
48
+ HousekeepingResponse,
42
49
  PushRequest,
43
50
  PushResponse,
44
51
  SetManagedConfigRequest,
@@ -49,7 +56,7 @@ from ..stub.mercurial_repository_pb2_grpc import (
49
56
  )
50
57
  from ..servicer import HGitalyServicer
51
58
 
52
- logger = logging.getLogger(__name__)
59
+ base_logger = logging.getLogger(__name__)
53
60
 
54
61
 
55
62
  class MercurialRepositoryServicer(MercurialRepositoryServiceServicer,
@@ -186,3 +193,55 @@ class MercurialRepositoryServicer(MercurialRepositoryServiceServicer,
186
193
  context.abort(StatusCode.INTERNAL,
187
194
  "Unexpected error, not in the actual "
188
195
  "push to %r: %s" % (remote_url, exc))
196
+
197
+ def Housekeeping(self,
198
+ request: HousekeepingRequest,
199
+ context) -> HousekeepingResponse:
200
+ logger = LoggerAdapter(base_logger, context)
201
+ gl_repo = request.repository
202
+ repo = self.load_repo(gl_repo, context)
203
+ tasks = []
204
+ resp_attrs = {}
205
+ if request.fail:
206
+ tasks.append('fail')
207
+ if request.working_directories_age_threshold_seconds:
208
+ tasks.append('working_dirs_gc')
209
+ if request.working_directories_remove_unlisted:
210
+ tasks.append('remove_unlisted_working_dirs')
211
+ if request.recover:
212
+ tasks.append('recover')
213
+ for task in tasks:
214
+ try:
215
+ resp_attrs.update(getattr(self, 'housekeeping_' + task)(
216
+ repo=repo,
217
+ request=request,
218
+ context=context
219
+ ))
220
+ except Exception as exc:
221
+ logger.error("Housekeeping task %s failed: %r" % (task, exc))
222
+
223
+ return HousekeepingResponse(**resp_attrs)
224
+
225
+ def housekeeping_fail(self, *a, **kw):
226
+ raise RuntimeError("client-required failure")
227
+
228
+ def housekeeping_working_dirs_gc(self, repo, request, context):
229
+ workdirs_gc(
230
+ workdirs_root=self.repo_workdirs_root(request.repository, context),
231
+ repo=repo,
232
+ max_age_seconds=request.working_directories_age_threshold_seconds
233
+ )
234
+ return [('working_directories_gc', True)]
235
+
236
+ def housekeeping_remove_unlisted_working_dirs(self, repo,
237
+ request, context):
238
+ remove_unlisted_workdirs(
239
+ repo=repo,
240
+ workdirs_root=self.repo_workdirs_root(request.repository, context),
241
+ )
242
+ return [('working_directories_remove_unlisted', True)]
243
+
244
+ def housekeeping_recover(self, repo, request, context):
245
+ return (('recover_run', True),
246
+ ('recovered_interrupted_transaction', repo.recover()),
247
+ )
@@ -26,6 +26,7 @@ from hgitaly.stub.mercurial_repository_pb2 import (
26
26
  ConfigItemType,
27
27
  GetConfigItemRequest,
28
28
  GetManagedConfigRequest,
29
+ HousekeepingRequest,
29
30
  SetManagedConfigRequest,
30
31
  HeptapodConfigSection,
31
32
  MercurialPeer,
@@ -86,6 +87,10 @@ class ConfigFixture(ServiceFixture):
86
87
  def include_managed_hgrc(self):
87
88
  self.append_main_hgrc('', '%include hgrc.managed', '')
88
89
 
90
+ def housekeeping(self, **kw):
91
+ kw.setdefault('repository', self.grpc_repo)
92
+ return self.stub.Housekeeping(HousekeepingRequest(**kw))
93
+
89
94
 
90
95
  @pytest.fixture
91
96
  def config_fixture(grpc_channel, server_repos_root):
@@ -511,3 +516,18 @@ def test_push_invalid_url(push_fixture, url):
511
516
  with pytest.raises(grpc.RpcError) as exc_info:
512
517
  push(remote_url=url)
513
518
  assert exc_info.value.code() == grpc.StatusCode.INVALID_ARGUMENT
519
+
520
+
521
+ def test_housekeeping(config_fixture):
522
+ fixture = config_fixture
523
+
524
+ fixture.housekeeping(fail=True)
525
+
526
+ assert fixture.housekeeping(
527
+ working_directories_age_threshold_seconds=1).working_directories_gc
528
+
529
+ fixture.housekeeping(working_directories_remove_unlisted=True)
530
+
531
+ resp = fixture.housekeeping(recover=True)
532
+ assert resp.recover_run
533
+ assert not resp.recovered_interrupted_transaction
@@ -0,0 +1,35 @@
1
+ # -*- coding: utf-8 -*-
2
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
3
+ # source: mercurial-aux-git.proto
4
+ """Generated protocol buffer code."""
5
+ from google.protobuf import descriptor as _descriptor
6
+ from google.protobuf import descriptor_pool as _descriptor_pool
7
+ from google.protobuf import symbol_database as _symbol_database
8
+ from google.protobuf.internal import builder as _builder
9
+ # @@protoc_insertion_point(imports)
10
+
11
+ _sym_db = _symbol_database.Default()
12
+
13
+
14
+ from . import lint_pb2 as lint__pb2
15
+ from . import shared_pb2 as shared__pb2
16
+ from . import repository_pb2 as repository__pb2
17
+
18
+
19
+ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x17mercurial-aux-git.proto\x12\x07hgitaly\x1a\nlint.proto\x1a\x0cshared.proto\x1a\x10repository.proto2\xcd\x02\n\x16MercurialAuxGitService\x12Y\n\x12\x41uxGitCreateBundle\x12\x1b.gitaly.CreateBundleRequest\x1a\x1c.gitaly.CreateBundleResponse\"\x06\xfa\x97(\x02\x08\x02\x30\x01\x12y\n\x16\x41uxGitCreateFromBundle\x12).gitaly.CreateRepositoryFromBundleRequest\x1a*.gitaly.CreateRepositoryFromBundleResponse\"\x06\xfa\x97(\x02\x08\x01(\x01\x12]\n\x14\x41uxGitRepositorySize\x12\x1d.gitaly.RepositorySizeRequest\x1a\x1e.gitaly.RepositorySizeResponse\"\x06\xfa\x97(\x02\x08\x01\x62\x06proto3')
20
+
21
+ _globals = globals()
22
+ _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
23
+ _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'mercurial_aux_git_pb2', _globals)
24
+ if _descriptor._USE_C_DESCRIPTORS == False:
25
+
26
+ DESCRIPTOR._options = None
27
+ _MERCURIALAUXGITSERVICE.methods_by_name['AuxGitCreateBundle']._options = None
28
+ _MERCURIALAUXGITSERVICE.methods_by_name['AuxGitCreateBundle']._serialized_options = b'\372\227(\002\010\002'
29
+ _MERCURIALAUXGITSERVICE.methods_by_name['AuxGitCreateFromBundle']._options = None
30
+ _MERCURIALAUXGITSERVICE.methods_by_name['AuxGitCreateFromBundle']._serialized_options = b'\372\227(\002\010\001'
31
+ _MERCURIALAUXGITSERVICE.methods_by_name['AuxGitRepositorySize']._options = None
32
+ _MERCURIALAUXGITSERVICE.methods_by_name['AuxGitRepositorySize']._serialized_options = b'\372\227(\002\010\001'
33
+ _globals['_MERCURIALAUXGITSERVICE']._serialized_start=81
34
+ _globals['_MERCURIALAUXGITSERVICE']._serialized_end=414
35
+ # @@protoc_insertion_point(module_scope)
@@ -0,0 +1,147 @@
1
+ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
2
+ """Client and server classes corresponding to protobuf-defined services."""
3
+ import grpc
4
+
5
+ from . import repository_pb2 as repository__pb2
6
+
7
+
8
+ class MercurialAuxGitServiceStub(object):
9
+ """Methods working on auxiliary Git repositories
10
+
11
+ The auxiliary Git repositories are mostly meant to support mirroring
12
+ to external Git services.
13
+ These are set aside so that Gitaly does not handle them.
14
+ """
15
+
16
+ def __init__(self, channel):
17
+ """Constructor.
18
+
19
+ Args:
20
+ channel: A grpc.Channel.
21
+ """
22
+ self.AuxGitCreateBundle = channel.unary_stream(
23
+ '/hgitaly.MercurialAuxGitService/AuxGitCreateBundle',
24
+ request_serializer=repository__pb2.CreateBundleRequest.SerializeToString,
25
+ response_deserializer=repository__pb2.CreateBundleResponse.FromString,
26
+ )
27
+ self.AuxGitCreateFromBundle = channel.stream_unary(
28
+ '/hgitaly.MercurialAuxGitService/AuxGitCreateFromBundle',
29
+ request_serializer=repository__pb2.CreateRepositoryFromBundleRequest.SerializeToString,
30
+ response_deserializer=repository__pb2.CreateRepositoryFromBundleResponse.FromString,
31
+ )
32
+ self.AuxGitRepositorySize = channel.unary_unary(
33
+ '/hgitaly.MercurialAuxGitService/AuxGitRepositorySize',
34
+ request_serializer=repository__pb2.RepositorySizeRequest.SerializeToString,
35
+ response_deserializer=repository__pb2.RepositorySizeResponse.FromString,
36
+ )
37
+
38
+
39
+ class MercurialAuxGitServiceServicer(object):
40
+ """Methods working on auxiliary Git repositories
41
+
42
+ The auxiliary Git repositories are mostly meant to support mirroring
43
+ to external Git services.
44
+ These are set aside so that Gitaly does not handle them.
45
+ """
46
+
47
+ def AuxGitCreateBundle(self, request, context):
48
+ """Missing associated documentation comment in .proto file."""
49
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
50
+ context.set_details('Method not implemented!')
51
+ raise NotImplementedError('Method not implemented!')
52
+
53
+ def AuxGitCreateFromBundle(self, request_iterator, context):
54
+ """Missing associated documentation comment in .proto file."""
55
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
56
+ context.set_details('Method not implemented!')
57
+ raise NotImplementedError('Method not implemented!')
58
+
59
+ def AuxGitRepositorySize(self, request, context):
60
+ """Missing associated documentation comment in .proto file."""
61
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
62
+ context.set_details('Method not implemented!')
63
+ raise NotImplementedError('Method not implemented!')
64
+
65
+
66
+ def add_MercurialAuxGitServiceServicer_to_server(servicer, server):
67
+ rpc_method_handlers = {
68
+ 'AuxGitCreateBundle': grpc.unary_stream_rpc_method_handler(
69
+ servicer.AuxGitCreateBundle,
70
+ request_deserializer=repository__pb2.CreateBundleRequest.FromString,
71
+ response_serializer=repository__pb2.CreateBundleResponse.SerializeToString,
72
+ ),
73
+ 'AuxGitCreateFromBundle': grpc.stream_unary_rpc_method_handler(
74
+ servicer.AuxGitCreateFromBundle,
75
+ request_deserializer=repository__pb2.CreateRepositoryFromBundleRequest.FromString,
76
+ response_serializer=repository__pb2.CreateRepositoryFromBundleResponse.SerializeToString,
77
+ ),
78
+ 'AuxGitRepositorySize': grpc.unary_unary_rpc_method_handler(
79
+ servicer.AuxGitRepositorySize,
80
+ request_deserializer=repository__pb2.RepositorySizeRequest.FromString,
81
+ response_serializer=repository__pb2.RepositorySizeResponse.SerializeToString,
82
+ ),
83
+ }
84
+ generic_handler = grpc.method_handlers_generic_handler(
85
+ 'hgitaly.MercurialAuxGitService', rpc_method_handlers)
86
+ server.add_generic_rpc_handlers((generic_handler,))
87
+
88
+
89
+ # This class is part of an EXPERIMENTAL API.
90
+ class MercurialAuxGitService(object):
91
+ """Methods working on auxiliary Git repositories
92
+
93
+ The auxiliary Git repositories are mostly meant to support mirroring
94
+ to external Git services.
95
+ These are set aside so that Gitaly does not handle them.
96
+ """
97
+
98
+ @staticmethod
99
+ def AuxGitCreateBundle(request,
100
+ target,
101
+ options=(),
102
+ channel_credentials=None,
103
+ call_credentials=None,
104
+ insecure=False,
105
+ compression=None,
106
+ wait_for_ready=None,
107
+ timeout=None,
108
+ metadata=None):
109
+ return grpc.experimental.unary_stream(request, target, '/hgitaly.MercurialAuxGitService/AuxGitCreateBundle',
110
+ repository__pb2.CreateBundleRequest.SerializeToString,
111
+ repository__pb2.CreateBundleResponse.FromString,
112
+ options, channel_credentials,
113
+ insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
114
+
115
+ @staticmethod
116
+ def AuxGitCreateFromBundle(request_iterator,
117
+ target,
118
+ options=(),
119
+ channel_credentials=None,
120
+ call_credentials=None,
121
+ insecure=False,
122
+ compression=None,
123
+ wait_for_ready=None,
124
+ timeout=None,
125
+ metadata=None):
126
+ return grpc.experimental.stream_unary(request_iterator, target, '/hgitaly.MercurialAuxGitService/AuxGitCreateFromBundle',
127
+ repository__pb2.CreateRepositoryFromBundleRequest.SerializeToString,
128
+ repository__pb2.CreateRepositoryFromBundleResponse.FromString,
129
+ options, channel_credentials,
130
+ insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
131
+
132
+ @staticmethod
133
+ def AuxGitRepositorySize(request,
134
+ target,
135
+ options=(),
136
+ channel_credentials=None,
137
+ call_credentials=None,
138
+ insecure=False,
139
+ compression=None,
140
+ wait_for_ready=None,
141
+ timeout=None,
142
+ metadata=None):
143
+ return grpc.experimental.unary_unary(request, target, '/hgitaly.MercurialAuxGitService/AuxGitRepositorySize',
144
+ repository__pb2.RepositorySizeRequest.SerializeToString,
145
+ repository__pb2.RepositorySizeResponse.FromString,
146
+ options, channel_credentials,
147
+ insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
@@ -15,7 +15,7 @@ from . import lint_pb2 as lint__pb2
15
15
  from . import shared_pb2 as shared__pb2
16
16
 
17
17
 
18
- DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1amercurial-repository.proto\x12\x07hgitaly\x1a\nlint.proto\x1a\x0cshared.proto\"Y\n\x11InitConfigRequest\x12,\n\nrepository\x18\x01 \x01(\x0b\x32\x12.gitaly.RepositoryB\x04\x98\xc6,\x01\x12\x16\n\x0enamespace_path\x18\x02 \x01(\t\"\x14\n\x12InitConfigResponse\"\x95\x02\n\x15HeptapodConfigSection\x12!\n\x14\x61llow_multiple_heads\x18\x02 \x01(\x08H\x00\x88\x01\x01\x12\x1c\n\x0f\x61llow_bookmarks\x18\x03 \x01(\x08H\x01\x88\x01\x01\x12\x45\n\x0c\x61uto_publish\x18\x04 \x01(\x0e\x32*.hgitaly.HeptapodConfigSection.AutoPublishH\x02\x88\x01\x01\"6\n\x0b\x41utoPublish\x12\x11\n\rWITHOUT_TOPIC\x10\x00\x12\x0b\n\x07NOTHING\x10\x01\x12\x07\n\x03\x41LL\x10\x02\x42\x17\n\x15_allow_multiple_headsB\x12\n\x10_allow_bookmarksB\x0f\n\r_auto_publish\"V\n\x17GetManagedConfigRequest\x12,\n\nrepository\x18\x01 \x01(\x0b\x32\x12.gitaly.RepositoryB\x04\x98\xc6,\x01\x12\r\n\x05local\x18\x02 \x01(\x08\"]\n\x18GetManagedConfigResponse\x12\x0f\n\x07inherit\x18\x01 \x01(\x08\x12\x30\n\x08heptapod\x18\x02 \x01(\x0b\x32\x1e.hgitaly.HeptapodConfigSection\"\xc2\x01\n\x17SetManagedConfigRequest\x12,\n\nrepository\x18\x01 \x01(\x0b\x32\x12.gitaly.RepositoryB\x04\x98\xc6,\x01\x12\x14\n\x07inherit\x18\x02 \x01(\x08H\x00\x88\x01\x01\x12\x30\n\x08heptapod\x18\x03 \x01(\x0b\x32\x1e.hgitaly.HeptapodConfigSection\x12\x14\n\x0cremove_items\x18\x04 \x03(\t\x12\x0f\n\x07\x62y_line\x18\x05 \x01(\tB\n\n\x08_inherit\"\x1a\n\x18SetManagedConfigResponse\"\x8d\x01\n\x14GetConfigItemRequest\x12,\n\nrepository\x18\x01 \x01(\x0b\x32\x12.gitaly.RepositoryB\x04\x98\xc6,\x01\x12(\n\x07\x61s_type\x18\x02 \x01(\x0e\x32\x17.hgitaly.ConfigItemType\x12\x0f\n\x07section\x18\x03 \x01(\t\x12\x0c\n\x04name\x18\x04 \x01(\t\"H\n\x15GetConfigItemResponse\x12\x13\n\tas_string\x18\x01 \x01(\tH\x00\x12\x11\n\x07\x61s_bool\x18\x02 \x01(\x08H\x00\x42\x07\n\x05value\">\n\x0eRecoverRequest\x12,\n\nrepository\x18\x01 \x01(\x0b\x32\x12.gitaly.RepositoryB\x04\x98\xc6,\x01\"%\n\x0fRecoverResponse\x12\x12\n\nnot_needed\x18\x01 \x01(\x08\"?\n\x0fOptimizeRequest\x12,\n\nrepository\x18\x01 \x01(\x0b\x32\x12.gitaly.RepositoryB\x04\x98\xc6,\x01\"\x12\n\x10OptimizeResponse\"\x88\x01\n\x12ResetCachesRequest\x12,\n\nrepository\x18\x01 \x01(\x0b\x32\x12.gitaly.RepositoryB\x04\x98\xc6,\x01\x12\x31\n\x06\x63\x61\x63hes\x18\x02 \x03(\x0e\x32!.hgitaly.ResetCachesRequest.Cache\"\x11\n\x05\x43\x61\x63he\x12\x08\n\x04TAGS\x10\x00\"\x15\n\x13ResetCachesResponse\"b\n\rMercurialPeer\x12\x0b\n\x03url\x18\x01 \x01(\t\x12\x0f\n\x07ssh_key\x18\x05 \x01(\t\x12\x17\n\x0fssh_known_hosts\x18\x06 \x01(\t\x12\x1a\n\x12ssh_remote_command\x18\x07 \x01(\x0c\"\xa7\x01\n\x0bPushRequest\x12,\n\nrepository\x18\x01 \x01(\x0b\x32\x12.gitaly.RepositoryB\x04\x98\xc6,\x01\x12+\n\x0bremote_peer\x18\x02 \x01(\x0b\x32\x16.hgitaly.MercurialPeer\x12%\n\x1donly_gitlab_branches_matching\x18\x03 \x03(\x0c\x12\x16\n\x0einclude_drafts\x18\x04 \x01(\x08\"&\n\x0cPushResponse\x12\x16\n\x0enew_changesets\x18\x01 \x01(\x08\"\xb8\x01\n\x0bPullRequest\x12,\n\nrepository\x18\x01 \x01(\x0b\x32\x12.gitaly.RepositoryB\x04\x98\xc6,\x01\x12+\n\x0bremote_peer\x18\x02 \x01(\x0b\x32\x16.hgitaly.MercurialPeer\x12\x1a\n\x04user\x18\x04 \x01(\x0b\x32\x0c.gitaly.User\x12\x1b\n\x13mercurial_revisions\x18\x05 \x03(\x0cJ\x04\x08\x03\x10\x04R\x0fgitlab_branches\"&\n\x0cPullResponse\x12\x16\n\x0enew_changesets\x18\x01 \x01(\x08\"g\n\rHgCallRequest\x12,\n\nrepository\x18\x01 \x01(\x0b\x32\x12.gitaly.RepositoryB\x04\x98\xc6,\x01\x12\x1a\n\x04user\x18\x02 \x01(\x0b\x32\x0c.gitaly.User\x12\x0c\n\x04\x61rgs\x18\x03 \x03(\x0c\"3\n\x0eHgCallResponse\x12\x11\n\texit_code\x18\x01 \x01(\x05\x12\x0e\n\x06stdout\x18\x02 \x03(\x0c*&\n\x0e\x43onfigItemType\x12\n\n\x06STRING\x10\x00\x12\x08\n\x04\x42OOL\x10\x01\x32\xa5\x06\n\x1aMercurialRepositoryService\x12M\n\nInitConfig\x12\x1a.hgitaly.InitConfigRequest\x1a\x1b.hgitaly.InitConfigResponse\"\x06\xfa\x97(\x02\x08\x01\x12V\n\rGetConfigItem\x12\x1d.hgitaly.GetConfigItemRequest\x1a\x1e.hgitaly.GetConfigItemResponse\"\x06\xfa\x97(\x02\x08\x02\x12\x44\n\x07Recover\x12\x17.hgitaly.RecoverRequest\x1a\x18.hgitaly.RecoverResponse\"\x06\xfa\x97(\x02\x08\x02\x12G\n\x08Optimize\x12\x18.hgitaly.OptimizeRequest\x1a\x19.hgitaly.OptimizeResponse\"\x06\xfa\x97(\x02\x08\x01\x12P\n\x0bResetCaches\x12\x1b.hgitaly.ResetCachesRequest\x1a\x1c.hgitaly.ResetCachesResponse\"\x06\xfa\x97(\x02\x08\x01\x12\x43\n\x06HgCall\x12\x16.hgitaly.HgCallRequest\x1a\x17.hgitaly.HgCallResponse\"\x06\xfa\x97(\x02\x08\x01\x30\x01\x12_\n\x10GetManagedConfig\x12 .hgitaly.GetManagedConfigRequest\x1a!.hgitaly.GetManagedConfigResponse\"\x06\xfa\x97(\x02\x08\x02\x12_\n\x10SetManagedConfig\x12 .hgitaly.SetManagedConfigRequest\x1a!.hgitaly.SetManagedConfigResponse\"\x06\xfa\x97(\x02\x08\x01\x12;\n\x04Push\x12\x14.hgitaly.PushRequest\x1a\x15.hgitaly.PushResponse\"\x06\xfa\x97(\x02\x08\x01\x12;\n\x04Pull\x12\x14.hgitaly.PullRequest\x1a\x15.hgitaly.PullResponse\"\x06\xfa\x97(\x02\x08\x01\x62\x06proto3')
18
+ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1amercurial-repository.proto\x12\x07hgitaly\x1a\nlint.proto\x1a\x0cshared.proto\"Y\n\x11InitConfigRequest\x12,\n\nrepository\x18\x01 \x01(\x0b\x32\x12.gitaly.RepositoryB\x04\x98\xc6,\x01\x12\x16\n\x0enamespace_path\x18\x02 \x01(\t\"\x14\n\x12InitConfigResponse\"\x95\x02\n\x15HeptapodConfigSection\x12!\n\x14\x61llow_multiple_heads\x18\x02 \x01(\x08H\x00\x88\x01\x01\x12\x1c\n\x0f\x61llow_bookmarks\x18\x03 \x01(\x08H\x01\x88\x01\x01\x12\x45\n\x0c\x61uto_publish\x18\x04 \x01(\x0e\x32*.hgitaly.HeptapodConfigSection.AutoPublishH\x02\x88\x01\x01\"6\n\x0b\x41utoPublish\x12\x11\n\rWITHOUT_TOPIC\x10\x00\x12\x0b\n\x07NOTHING\x10\x01\x12\x07\n\x03\x41LL\x10\x02\x42\x17\n\x15_allow_multiple_headsB\x12\n\x10_allow_bookmarksB\x0f\n\r_auto_publish\"V\n\x17GetManagedConfigRequest\x12,\n\nrepository\x18\x01 \x01(\x0b\x32\x12.gitaly.RepositoryB\x04\x98\xc6,\x01\x12\r\n\x05local\x18\x02 \x01(\x08\"]\n\x18GetManagedConfigResponse\x12\x0f\n\x07inherit\x18\x01 \x01(\x08\x12\x30\n\x08heptapod\x18\x02 \x01(\x0b\x32\x1e.hgitaly.HeptapodConfigSection\"\xc2\x01\n\x17SetManagedConfigRequest\x12,\n\nrepository\x18\x01 \x01(\x0b\x32\x12.gitaly.RepositoryB\x04\x98\xc6,\x01\x12\x14\n\x07inherit\x18\x02 \x01(\x08H\x00\x88\x01\x01\x12\x30\n\x08heptapod\x18\x03 \x01(\x0b\x32\x1e.hgitaly.HeptapodConfigSection\x12\x14\n\x0cremove_items\x18\x04 \x03(\t\x12\x0f\n\x07\x62y_line\x18\x05 \x01(\tB\n\n\x08_inherit\"\x1a\n\x18SetManagedConfigResponse\"\x8d\x01\n\x14GetConfigItemRequest\x12,\n\nrepository\x18\x01 \x01(\x0b\x32\x12.gitaly.RepositoryB\x04\x98\xc6,\x01\x12(\n\x07\x61s_type\x18\x02 \x01(\x0e\x32\x17.hgitaly.ConfigItemType\x12\x0f\n\x07section\x18\x03 \x01(\t\x12\x0c\n\x04name\x18\x04 \x01(\t\"H\n\x15GetConfigItemResponse\x12\x13\n\tas_string\x18\x01 \x01(\tH\x00\x12\x11\n\x07\x61s_bool\x18\x02 \x01(\x08H\x00\x42\x07\n\x05value\">\n\x0eRecoverRequest\x12,\n\nrepository\x18\x01 \x01(\x0b\x32\x12.gitaly.RepositoryB\x04\x98\xc6,\x01\"%\n\x0fRecoverResponse\x12\x12\n\nnot_needed\x18\x01 \x01(\x08\"?\n\x0fOptimizeRequest\x12,\n\nrepository\x18\x01 \x01(\x0b\x32\x12.gitaly.RepositoryB\x04\x98\xc6,\x01\"\x12\n\x10OptimizeResponse\"\x88\x01\n\x12ResetCachesRequest\x12,\n\nrepository\x18\x01 \x01(\x0b\x32\x12.gitaly.RepositoryB\x04\x98\xc6,\x01\x12\x31\n\x06\x63\x61\x63hes\x18\x02 \x03(\x0e\x32!.hgitaly.ResetCachesRequest.Cache\"\x11\n\x05\x43\x61\x63he\x12\x08\n\x04TAGS\x10\x00\"\x15\n\x13ResetCachesResponse\"b\n\rMercurialPeer\x12\x0b\n\x03url\x18\x01 \x01(\t\x12\x0f\n\x07ssh_key\x18\x05 \x01(\t\x12\x17\n\x0fssh_known_hosts\x18\x06 \x01(\t\x12\x1a\n\x12ssh_remote_command\x18\x07 \x01(\x0c\"\xa7\x01\n\x0bPushRequest\x12,\n\nrepository\x18\x01 \x01(\x0b\x32\x12.gitaly.RepositoryB\x04\x98\xc6,\x01\x12+\n\x0bremote_peer\x18\x02 \x01(\x0b\x32\x16.hgitaly.MercurialPeer\x12%\n\x1donly_gitlab_branches_matching\x18\x03 \x03(\x0c\x12\x16\n\x0einclude_drafts\x18\x04 \x01(\x08\"&\n\x0cPushResponse\x12\x16\n\x0enew_changesets\x18\x01 \x01(\x08\"\xb8\x01\n\x0bPullRequest\x12,\n\nrepository\x18\x01 \x01(\x0b\x32\x12.gitaly.RepositoryB\x04\x98\xc6,\x01\x12+\n\x0bremote_peer\x18\x02 \x01(\x0b\x32\x16.hgitaly.MercurialPeer\x12\x1a\n\x04user\x18\x04 \x01(\x0b\x32\x0c.gitaly.User\x12\x1b\n\x13mercurial_revisions\x18\x05 \x03(\x0cJ\x04\x08\x03\x10\x04R\x0fgitlab_branches\"&\n\x0cPullResponse\x12\x16\n\x0enew_changesets\x18\x01 \x01(\x08\"g\n\rHgCallRequest\x12,\n\nrepository\x18\x01 \x01(\x0b\x32\x12.gitaly.RepositoryB\x04\x98\xc6,\x01\x12\x1a\n\x04user\x18\x02 \x01(\x0b\x32\x0c.gitaly.User\x12\x0c\n\x04\x61rgs\x18\x03 \x03(\x0c\"3\n\x0eHgCallResponse\x12\x11\n\texit_code\x18\x01 \x01(\x05\x12\x0e\n\x06stdout\x18\x02 \x03(\x0c\"\xc2\x01\n\x13HousekeepingRequest\x12,\n\nrepository\x18\x01 \x01(\x0b\x32\x12.gitaly.RepositoryB\x04\x98\xc6,\x01\x12\x0c\n\x04\x66\x61il\x18\x02 \x01(\x08\x12\x0f\n\x07recover\x18\x03 \x01(\x08\x12\x31\n)working_directories_age_threshold_seconds\x18\x04 \x01(\r\x12+\n#working_directories_remove_unlisted\x18\x05 \x01(\x08\"\xa3\x01\n\x14HousekeepingResponse\x12\x13\n\x0brecover_run\x18\x01 \x01(\x08\x12)\n!recovered_interrupted_transaction\x18\x02 \x01(\x08\x12\x1e\n\x16working_directories_gc\x18\x03 \x01(\x08\x12+\n#working_directories_remove_unlisted\x18\x04 \x01(\x08*&\n\x0e\x43onfigItemType\x12\n\n\x06STRING\x10\x00\x12\x08\n\x04\x42OOL\x10\x01\x32\xfa\x06\n\x1aMercurialRepositoryService\x12M\n\nInitConfig\x12\x1a.hgitaly.InitConfigRequest\x1a\x1b.hgitaly.InitConfigResponse\"\x06\xfa\x97(\x02\x08\x01\x12V\n\rGetConfigItem\x12\x1d.hgitaly.GetConfigItemRequest\x1a\x1e.hgitaly.GetConfigItemResponse\"\x06\xfa\x97(\x02\x08\x02\x12\x44\n\x07Recover\x12\x17.hgitaly.RecoverRequest\x1a\x18.hgitaly.RecoverResponse\"\x06\xfa\x97(\x02\x08\x02\x12G\n\x08Optimize\x12\x18.hgitaly.OptimizeRequest\x1a\x19.hgitaly.OptimizeResponse\"\x06\xfa\x97(\x02\x08\x01\x12P\n\x0bResetCaches\x12\x1b.hgitaly.ResetCachesRequest\x1a\x1c.hgitaly.ResetCachesResponse\"\x06\xfa\x97(\x02\x08\x01\x12\x43\n\x06HgCall\x12\x16.hgitaly.HgCallRequest\x1a\x17.hgitaly.HgCallResponse\"\x06\xfa\x97(\x02\x08\x01\x30\x01\x12_\n\x10GetManagedConfig\x12 .hgitaly.GetManagedConfigRequest\x1a!.hgitaly.GetManagedConfigResponse\"\x06\xfa\x97(\x02\x08\x02\x12_\n\x10SetManagedConfig\x12 .hgitaly.SetManagedConfigRequest\x1a!.hgitaly.SetManagedConfigResponse\"\x06\xfa\x97(\x02\x08\x01\x12;\n\x04Push\x12\x14.hgitaly.PushRequest\x1a\x15.hgitaly.PushResponse\"\x06\xfa\x97(\x02\x08\x01\x12;\n\x04Pull\x12\x14.hgitaly.PullRequest\x1a\x15.hgitaly.PullResponse\"\x06\xfa\x97(\x02\x08\x01\x12S\n\x0cHousekeeping\x12\x1c.hgitaly.HousekeepingRequest\x1a\x1d.hgitaly.HousekeepingResponse\"\x06\xfa\x97(\x02\x08\x01\x62\x06proto3')
19
19
 
20
20
  _globals = globals()
21
21
  _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
@@ -43,6 +43,8 @@ if _descriptor._USE_C_DESCRIPTORS == False:
43
43
  _PULLREQUEST.fields_by_name['repository']._serialized_options = b'\230\306,\001'
44
44
  _HGCALLREQUEST.fields_by_name['repository']._options = None
45
45
  _HGCALLREQUEST.fields_by_name['repository']._serialized_options = b'\230\306,\001'
46
+ _HOUSEKEEPINGREQUEST.fields_by_name['repository']._options = None
47
+ _HOUSEKEEPINGREQUEST.fields_by_name['repository']._serialized_options = b'\230\306,\001'
46
48
  _MERCURIALREPOSITORYSERVICE.methods_by_name['InitConfig']._options = None
47
49
  _MERCURIALREPOSITORYSERVICE.methods_by_name['InitConfig']._serialized_options = b'\372\227(\002\010\001'
48
50
  _MERCURIALREPOSITORYSERVICE.methods_by_name['GetConfigItem']._options = None
@@ -63,8 +65,10 @@ if _descriptor._USE_C_DESCRIPTORS == False:
63
65
  _MERCURIALREPOSITORYSERVICE.methods_by_name['Push']._serialized_options = b'\372\227(\002\010\001'
64
66
  _MERCURIALREPOSITORYSERVICE.methods_by_name['Pull']._options = None
65
67
  _MERCURIALREPOSITORYSERVICE.methods_by_name['Pull']._serialized_options = b'\372\227(\002\010\001'
66
- _globals['_CONFIGITEMTYPE']._serialized_start=2129
67
- _globals['_CONFIGITEMTYPE']._serialized_end=2167
68
+ _MERCURIALREPOSITORYSERVICE.methods_by_name['Housekeeping']._options = None
69
+ _MERCURIALREPOSITORYSERVICE.methods_by_name['Housekeeping']._serialized_options = b'\372\227(\002\010\001'
70
+ _globals['_CONFIGITEMTYPE']._serialized_start=2492
71
+ _globals['_CONFIGITEMTYPE']._serialized_end=2530
68
72
  _globals['_INITCONFIGREQUEST']._serialized_start=65
69
73
  _globals['_INITCONFIGREQUEST']._serialized_end=154
70
74
  _globals['_INITCONFIGRESPONSE']._serialized_start=156
@@ -113,6 +117,10 @@ if _descriptor._USE_C_DESCRIPTORS == False:
113
117
  _globals['_HGCALLREQUEST']._serialized_end=2074
114
118
  _globals['_HGCALLRESPONSE']._serialized_start=2076
115
119
  _globals['_HGCALLRESPONSE']._serialized_end=2127
116
- _globals['_MERCURIALREPOSITORYSERVICE']._serialized_start=2170
117
- _globals['_MERCURIALREPOSITORYSERVICE']._serialized_end=2975
120
+ _globals['_HOUSEKEEPINGREQUEST']._serialized_start=2130
121
+ _globals['_HOUSEKEEPINGREQUEST']._serialized_end=2324
122
+ _globals['_HOUSEKEEPINGRESPONSE']._serialized_start=2327
123
+ _globals['_HOUSEKEEPINGRESPONSE']._serialized_end=2490
124
+ _globals['_MERCURIALREPOSITORYSERVICE']._serialized_start=2533
125
+ _globals['_MERCURIALREPOSITORYSERVICE']._serialized_end=3423
118
126
  # @@protoc_insertion_point(module_scope)
@@ -64,6 +64,11 @@ class MercurialRepositoryServiceStub(object):
64
64
  request_serializer=mercurial__repository__pb2.PullRequest.SerializeToString,
65
65
  response_deserializer=mercurial__repository__pb2.PullResponse.FromString,
66
66
  )
67
+ self.Housekeeping = channel.unary_unary(
68
+ '/hgitaly.MercurialRepositoryService/Housekeeping',
69
+ request_serializer=mercurial__repository__pb2.HousekeepingRequest.SerializeToString,
70
+ response_deserializer=mercurial__repository__pb2.HousekeepingResponse.FromString,
71
+ )
67
72
 
68
73
 
69
74
  class MercurialRepositoryServiceServicer(object):
@@ -175,6 +180,13 @@ class MercurialRepositoryServiceServicer(object):
175
180
  context.set_details('Method not implemented!')
176
181
  raise NotImplementedError('Method not implemented!')
177
182
 
183
+ def Housekeeping(self, request, context):
184
+ """/ General tidying and optimization for this repository
185
+ """
186
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
187
+ context.set_details('Method not implemented!')
188
+ raise NotImplementedError('Method not implemented!')
189
+
178
190
 
179
191
  def add_MercurialRepositoryServiceServicer_to_server(servicer, server):
180
192
  rpc_method_handlers = {
@@ -228,6 +240,11 @@ def add_MercurialRepositoryServiceServicer_to_server(servicer, server):
228
240
  request_deserializer=mercurial__repository__pb2.PullRequest.FromString,
229
241
  response_serializer=mercurial__repository__pb2.PullResponse.SerializeToString,
230
242
  ),
243
+ 'Housekeeping': grpc.unary_unary_rpc_method_handler(
244
+ servicer.Housekeeping,
245
+ request_deserializer=mercurial__repository__pb2.HousekeepingRequest.FromString,
246
+ response_serializer=mercurial__repository__pb2.HousekeepingResponse.SerializeToString,
247
+ ),
231
248
  }
232
249
  generic_handler = grpc.method_handlers_generic_handler(
233
250
  'hgitaly.MercurialRepositoryService', rpc_method_handlers)
@@ -407,3 +424,20 @@ class MercurialRepositoryService(object):
407
424
  mercurial__repository__pb2.PullResponse.FromString,
408
425
  options, channel_credentials,
409
426
  insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
427
+
428
+ @staticmethod
429
+ def Housekeeping(request,
430
+ target,
431
+ options=(),
432
+ channel_credentials=None,
433
+ call_credentials=None,
434
+ insecure=False,
435
+ compression=None,
436
+ wait_for_ready=None,
437
+ timeout=None,
438
+ metadata=None):
439
+ return grpc.experimental.unary_unary(request, target, '/hgitaly.MercurialRepositoryService/Housekeeping',
440
+ mercurial__repository__pb2.HousekeepingRequest.SerializeToString,
441
+ mercurial__repository__pb2.HousekeepingResponse.FromString,
442
+ options, channel_credentials,
443
+ insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
@@ -5,6 +5,7 @@
5
5
  #
6
6
  # SPDX-License-Identifier: GPL-2.0-or-later
7
7
  from copy import deepcopy
8
+ import shutil
8
9
 
9
10
  import pytest
10
11
  from heptapod.testhelpers import (
@@ -29,6 +30,7 @@ from ..gitlab_ref import (
29
30
  keep_around_ref_path,
30
31
  parse_keep_around_ref_path,
31
32
  )
33
+ from .. import gitlab_ref as glref_mod # for monkey-patching
32
34
 
33
35
 
34
36
  @pytest.fixture
@@ -97,6 +99,25 @@ def test_gitlab_special_ref_target_ensure(mirror):
97
99
  assert gitlab_special_ref_target(wrapper.repo, ref_path) == ctx
98
100
 
99
101
 
102
+ def should_not_be_called(*a, **kw): # pragma: no cover
103
+ raise AssertionError("should not have been called")
104
+
105
+
106
+ def test_special_ref_not_ensure(mirror, monkeypatch):
107
+ wrapper = mirror.hg_repo_wrapper
108
+ git_repo = mirror.git_repo
109
+
110
+ shutil.rmtree(git_repo.path)
111
+ monkeypatch.setattr(glref_mod, 'ensure_gitlab_special_refs',
112
+ should_not_be_called)
113
+ monkeypatch.setattr(glref_mod, 'ensure_gitlab_keep_arounds',
114
+ should_not_be_called)
115
+
116
+ ref_path = b'refs/environments/654'
117
+ assert gitlab_special_ref_target(wrapper.repo, ref_path) is None
118
+ assert tuple(iter_keep_arounds_as_refs(wrapper.repo)) == ()
119
+
120
+
100
121
  def test_write_special_ref(repo_wrapper):
101
122
  repo, wrapper = repo_wrapper
102
123