hgitaly 17.10.0a0__tar.gz → 17.11.0__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 (315) hide show
  1. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/.hgtags +2 -0
  2. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/PKG-INFO +1 -1
  3. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/hgext3rd/hgitaly/__init__.py +4 -0
  4. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/hgext3rd/hgitaly/tests/test_serve.py +26 -14
  5. hgitaly-17.11.0/hgitaly/VERSION +1 -0
  6. hgitaly-17.11.0/hgitaly/identification.py +46 -0
  7. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/hgitaly/server/tests/test_prefork.py +81 -0
  8. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/hgitaly/server/worker.py +4 -0
  9. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/hgitaly/service/mercurial_operations.py +46 -0
  10. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/hgitaly/service/tests/test_mercurial_operations.py +67 -0
  11. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/hgitaly/service/tests/test_repository_service.py +5 -1
  12. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/hgitaly/servicer.py +3 -0
  13. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/hgitaly/stub/mercurial_operations_pb2.py +23 -7
  14. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/hgitaly/stub/mercurial_operations_pb2_grpc.py +94 -0
  15. hgitaly-17.11.0/hgitaly/stub/repository_pb2.py +408 -0
  16. hgitaly-17.11.0/hgitaly/testing/multiprocessing.py +18 -0
  17. hgitaly-17.11.0/hgitaly/tests/test_identification.py +26 -0
  18. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/hgitaly/tests/test_workdir.py +198 -79
  19. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/hgitaly/workdir.py +112 -29
  20. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/hgitaly.egg-info/PKG-INFO +1 -1
  21. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/hgitaly.egg-info/SOURCES.txt +3 -7
  22. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/protos/cluster.proto +27 -1
  23. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/protos/log.proto +0 -13
  24. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/protos/mercurial-operations.proto +50 -0
  25. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/protos/repository.proto +78 -0
  26. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/ruby/lib/hgitaly/mercurial-operations_pb.rb +22 -0
  27. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/ruby/lib/hgitaly/mercurial-operations_services_pb.rb +10 -0
  28. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/ruby/lib/hgitaly/version.rb +1 -1
  29. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/rust/Cargo.lock +692 -16
  30. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/rust/rhgitaly/Cargo.toml +4 -0
  31. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/rust/rhgitaly/build.rs +1 -0
  32. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/rust/rhgitaly/clippy.toml +1 -1
  33. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/rust/rhgitaly/src/config.rs +27 -0
  34. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/rust/rhgitaly/src/lib.rs +2 -0
  35. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/rust/rhgitaly/src/service/commit/find_commits.rs +2 -1
  36. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/rust/src-tarball.sh +2 -2
  37. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/tests_with_gitaly/rhgitaly.py +1 -0
  38. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/tests_with_gitaly/test_commit.py +4 -2
  39. hgitaly-17.10.0a0/hgitaly/VERSION +0 -1
  40. hgitaly-17.10.0a0/hgitaly/stub/repository_pb2.py +0 -399
  41. hgitaly-17.10.0a0/protos/mercurial-aux-git.proto +0 -33
  42. hgitaly-17.10.0a0/ruby/lib/hgitaly/mercurial-aux-git_pb.rb +0 -15
  43. hgitaly-17.10.0a0/ruby/lib/hgitaly/mercurial-aux-git_services_pb.rb +0 -29
  44. hgitaly-17.10.0a0/rust/rhgitaly/src/bundle.rs +0 -160
  45. hgitaly-17.10.0a0/rust/rhgitaly/src/repository.rs +0 -544
  46. hgitaly-17.10.0a0/rust/rhgitaly/src/service/commit.rs +0 -500
  47. hgitaly-17.10.0a0/rust/rhgitaly/src/service/mercurial_aux_git.rs +0 -186
  48. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/.coveragerc +0 -0
  49. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/.gitlab-ci.yml +0 -0
  50. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/.hgignore +0 -0
  51. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/LICENSE +0 -0
  52. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/MANIFEST.in +0 -0
  53. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/README.md +0 -0
  54. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/ci/heptapod-sftp-push +0 -0
  55. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/ci/heptapod-sign-package +0 -0
  56. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/ci/heptapod_known_hosts.ssh +0 -0
  57. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/ci/upload-rhgitaly +0 -0
  58. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/conftest.py +0 -0
  59. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/dev-requirements.txt +0 -0
  60. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/examples/client.py +0 -0
  61. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/examples/client_list_lcft.py +0 -0
  62. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/generate-stubs +0 -0
  63. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/hgext3rd/__init__.py +0 -0
  64. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/hgext3rd/hgitaly/revset.py +0 -0
  65. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/hgext3rd/hgitaly/tests/__init__.py +0 -0
  66. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/hgext3rd/hgitaly/tests/test_revset.py +0 -0
  67. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/hgitaly/__init__.py +0 -0
  68. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/hgitaly/branch.py +0 -0
  69. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/hgitaly/changelog.py +0 -0
  70. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/hgitaly/diff.py +0 -0
  71. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/hgitaly/errors.py +0 -0
  72. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/hgitaly/feature.py +0 -0
  73. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/hgitaly/file_content.py +0 -0
  74. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/hgitaly/file_context.py +0 -0
  75. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/hgitaly/git.py +0 -0
  76. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/hgitaly/gitlab_ref.py +0 -0
  77. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/hgitaly/license_detector/GPL-2.sample +0 -0
  78. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/hgitaly/license_detector/__init__.py +0 -0
  79. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/hgitaly/license_detector/spdx-licenses.json +0 -0
  80. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/hgitaly/linguist/__init__.py +0 -0
  81. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/hgitaly/linguist/languages.json +0 -0
  82. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/hgitaly/logging.py +0 -0
  83. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/hgitaly/manifest.py +0 -0
  84. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/hgitaly/message.py +0 -0
  85. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/hgitaly/oid.py +0 -0
  86. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/hgitaly/pagination.py +0 -0
  87. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/hgitaly/path.py +0 -0
  88. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/hgitaly/peer.py +0 -0
  89. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/hgitaly/procutil.py +0 -0
  90. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/hgitaly/repository.py +0 -0
  91. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/hgitaly/revision.py +0 -0
  92. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/hgitaly/revset.py +0 -0
  93. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/hgitaly/scripts.py +0 -0
  94. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/hgitaly/server/__init__.py +0 -0
  95. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/hgitaly/server/address.py +0 -0
  96. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/hgitaly/server/mono.py +0 -0
  97. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/hgitaly/server/prefork.py +0 -0
  98. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/hgitaly/server/tests/__init__.py +0 -0
  99. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/hgitaly/server/tests/test_address.py +0 -0
  100. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/hgitaly/server/tests/test_mono.py +0 -0
  101. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/hgitaly/server/tests/test_worker.py +0 -0
  102. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/hgitaly/service/__init__.py +0 -0
  103. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/hgitaly/service/analysis.py +0 -0
  104. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/hgitaly/service/blob.py +0 -0
  105. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/hgitaly/service/commit.py +0 -0
  106. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/hgitaly/service/diff.py +0 -0
  107. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/hgitaly/service/interceptors.py +0 -0
  108. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/hgitaly/service/mercurial_changeset.py +0 -0
  109. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/hgitaly/service/mercurial_repository.py +0 -0
  110. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/hgitaly/service/operations.py +0 -0
  111. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/hgitaly/service/ref.py +0 -0
  112. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/hgitaly/service/repository.py +0 -0
  113. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/hgitaly/service/server.py +0 -0
  114. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/hgitaly/service/tests/__init__.py +0 -0
  115. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/hgitaly/service/tests/fixture.py +0 -0
  116. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/hgitaly/service/tests/test_analysis.py +0 -0
  117. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/hgitaly/service/tests/test_blob.py +0 -0
  118. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/hgitaly/service/tests/test_commit.py +0 -0
  119. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/hgitaly/service/tests/test_default_branch.py +0 -0
  120. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/hgitaly/service/tests/test_diff.py +0 -0
  121. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/hgitaly/service/tests/test_mercurial_changeset.py +0 -0
  122. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/hgitaly/service/tests/test_mercurial_repository.py +0 -0
  123. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/hgitaly/service/tests/test_operations.py +0 -0
  124. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/hgitaly/service/tests/test_ref.py +0 -0
  125. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/hgitaly/service/tests/test_server.py +0 -0
  126. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/hgitaly/ssh.py +0 -0
  127. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/hgitaly/stream.py +0 -0
  128. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/hgitaly/stub/__init__.py +0 -0
  129. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/hgitaly/stub/analysis_pb2.py +0 -0
  130. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/hgitaly/stub/analysis_pb2_grpc.py +0 -0
  131. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/hgitaly/stub/blob_pb2.py +0 -0
  132. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/hgitaly/stub/blob_pb2_grpc.py +0 -0
  133. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/hgitaly/stub/commit_pb2.py +0 -0
  134. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/hgitaly/stub/commit_pb2_grpc.py +0 -0
  135. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/hgitaly/stub/diff_pb2.py +0 -0
  136. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/hgitaly/stub/diff_pb2_grpc.py +0 -0
  137. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/hgitaly/stub/errors_pb2.py +0 -0
  138. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/hgitaly/stub/errors_pb2_grpc.py +0 -0
  139. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/hgitaly/stub/lint_pb2.py +0 -0
  140. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/hgitaly/stub/lint_pb2_grpc.py +0 -0
  141. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/hgitaly/stub/mercurial_aux_git_pb2.py +0 -0
  142. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/hgitaly/stub/mercurial_aux_git_pb2_grpc.py +0 -0
  143. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/hgitaly/stub/mercurial_changeset_pb2.py +0 -0
  144. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/hgitaly/stub/mercurial_changeset_pb2_grpc.py +0 -0
  145. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/hgitaly/stub/mercurial_repository_pb2.py +0 -0
  146. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/hgitaly/stub/mercurial_repository_pb2_grpc.py +0 -0
  147. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/hgitaly/stub/operations_pb2.py +0 -0
  148. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/hgitaly/stub/operations_pb2_grpc.py +0 -0
  149. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/hgitaly/stub/ref_pb2.py +0 -0
  150. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/hgitaly/stub/ref_pb2_grpc.py +0 -0
  151. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/hgitaly/stub/remote_pb2.py +0 -0
  152. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/hgitaly/stub/remote_pb2_grpc.py +0 -0
  153. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/hgitaly/stub/repository_pb2_grpc.py +0 -0
  154. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/hgitaly/stub/server_pb2.py +0 -0
  155. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/hgitaly/stub/server_pb2_grpc.py +0 -0
  156. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/hgitaly/stub/shared_pb2.py +0 -0
  157. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/hgitaly/stub/shared_pb2_grpc.py +0 -0
  158. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/hgitaly/tag.py +0 -0
  159. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/hgitaly/testing/__init__.py +0 -0
  160. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/hgitaly/testing/bundle.py +0 -0
  161. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/hgitaly/testing/context.py +0 -0
  162. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/hgitaly/testing/data/authorized_keys +0 -0
  163. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/hgitaly/testing/data/backup_additional_no_git.tar +0 -0
  164. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/hgitaly/testing/data/id_ecdsa_user +0 -0
  165. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/hgitaly/testing/data/known_hosts +0 -0
  166. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/hgitaly/testing/data/ssh_host_ecdsa_key +0 -0
  167. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/hgitaly/testing/data/ssh_host_ecdsa_key.pub +0 -0
  168. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/hgitaly/testing/data/ssh_host_ed25519 +0 -0
  169. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/hgitaly/testing/data/ssh_host_ed25519.pub +0 -0
  170. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/hgitaly/testing/data/sshd_config +0 -0
  171. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/hgitaly/testing/grpc.py +0 -0
  172. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/hgitaly/testing/ssh.py +0 -0
  173. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/hgitaly/testing/sshd.py +0 -0
  174. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/hgitaly/testing/storage.py +0 -0
  175. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/hgitaly/testing/tests/__init__.py +0 -0
  176. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/hgitaly/testing/tests/test_sshd.py +0 -0
  177. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/hgitaly/tests/__init__.py +0 -0
  178. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/hgitaly/tests/common.py +0 -0
  179. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/hgitaly/tests/test_branch.py +0 -0
  180. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/hgitaly/tests/test_diff.py +0 -0
  181. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/hgitaly/tests/test_errors.py +0 -0
  182. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/hgitaly/tests/test_feature.py +0 -0
  183. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/hgitaly/tests/test_file_context.py +0 -0
  184. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/hgitaly/tests/test_gitlab_ref.py +0 -0
  185. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/hgitaly/tests/test_license_detector.py +0 -0
  186. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/hgitaly/tests/test_linguist.py +0 -0
  187. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/hgitaly/tests/test_manifest.py +0 -0
  188. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/hgitaly/tests/test_messages.py +0 -0
  189. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/hgitaly/tests/test_oid.py +0 -0
  190. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/hgitaly/tests/test_peer.py +0 -0
  191. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/hgitaly/tests/test_repository.py +0 -0
  192. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/hgitaly/tests/test_revision.py +0 -0
  193. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/hgitaly/tests/test_revset.py +0 -0
  194. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/hgitaly/tests/test_servicer.py +0 -0
  195. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/hgitaly/tests/test_stream.py +0 -0
  196. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/hgitaly/tests/test_tag.py +0 -0
  197. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/hgitaly/util.py +0 -0
  198. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/hgitaly.egg-info/dependency_links.txt +0 -0
  199. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/hgitaly.egg-info/entry_points.txt +0 -0
  200. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/hgitaly.egg-info/requires.txt +0 -0
  201. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/hgitaly.egg-info/top_level.txt +0 -0
  202. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/install-requirements.txt +0 -0
  203. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/lint +0 -0
  204. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/protos/analysis.proto +0 -0
  205. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/protos/blob.proto +0 -0
  206. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/protos/cleanup.proto +0 -0
  207. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/protos/commit.proto +0 -0
  208. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/protos/conflicts.proto +0 -0
  209. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/protos/diff.proto +0 -0
  210. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/protos/errors.proto +0 -0
  211. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/protos/hook.proto +0 -0
  212. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/protos/internal.proto +0 -0
  213. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/protos/lint.proto +0 -0
  214. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/protos/mercurial-changeset.proto +0 -0
  215. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/protos/mercurial-repository.proto +0 -0
  216. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/protos/namespace.proto +0 -0
  217. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/protos/objectpool.proto +0 -0
  218. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/protos/operations.proto +0 -0
  219. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/protos/packfile.proto +0 -0
  220. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/protos/partition.proto +0 -0
  221. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/protos/praefect.proto +0 -0
  222. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/protos/ref.proto +0 -0
  223. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/protos/remote.proto +0 -0
  224. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/protos/server.proto +0 -0
  225. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/protos/service_config.proto +0 -0
  226. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/protos/shared.proto +0 -0
  227. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/protos/smarthttp.proto +0 -0
  228. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/protos/ssh.proto +0 -0
  229. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/protos/transaction.proto +0 -0
  230. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/protos/wiki.proto +0 -0
  231. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/ruby/.ruby-version +0 -0
  232. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/ruby/Gemfile +0 -0
  233. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/ruby/README.md +0 -0
  234. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/ruby/generate-grpc-lib +0 -0
  235. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/ruby/hgitaly.gemspec +0 -0
  236. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/ruby/lib/hgitaly/mercurial-changeset_pb.rb +0 -0
  237. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/ruby/lib/hgitaly/mercurial-changeset_services_pb.rb +0 -0
  238. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/ruby/lib/hgitaly/mercurial-repository_pb.rb +0 -0
  239. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/ruby/lib/hgitaly/mercurial-repository_services_pb.rb +0 -0
  240. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/ruby/lib/hgitaly.rb +0 -0
  241. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/ruby/run.rb +0 -0
  242. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/run-all-tests +0 -0
  243. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/rust/Cargo.toml +0 -0
  244. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/rust/Makefile +0 -0
  245. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/rust/build-from-tarball.sh +0 -0
  246. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/rust/check-line-width +0 -0
  247. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/rust/dependencies/README.md +0 -0
  248. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/rust/dependencies/mercurial.patch +0 -0
  249. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/rust/dependencies/proto/google/protobuf/any.proto +0 -0
  250. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/rust/dependencies/proto/google/protobuf/api.proto +0 -0
  251. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/rust/dependencies/proto/google/protobuf/compiler/plugin.proto +0 -0
  252. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/rust/dependencies/proto/google/protobuf/descriptor.proto +0 -0
  253. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/rust/dependencies/proto/google/protobuf/duration.proto +0 -0
  254. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/rust/dependencies/proto/google/protobuf/empty.proto +0 -0
  255. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/rust/dependencies/proto/google/protobuf/field_mask.proto +0 -0
  256. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/rust/dependencies/proto/google/protobuf/source_context.proto +0 -0
  257. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/rust/dependencies/proto/google/protobuf/struct.proto +0 -0
  258. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/rust/dependencies/proto/google/protobuf/timestamp.proto +0 -0
  259. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/rust/dependencies/proto/google/protobuf/type.proto +0 -0
  260. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/rust/dependencies/proto/google/protobuf/wrappers.proto +0 -0
  261. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/rust/go-enry.rev +0 -0
  262. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/rust/lint +0 -0
  263. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/rust/mercurial.rev +0 -0
  264. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/rust/rhgitaly/src/errors.rs +0 -0
  265. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/rust/rhgitaly/src/generated/README.md +0 -0
  266. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/rust/rhgitaly/src/git.rs +0 -0
  267. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/rust/rhgitaly/src/gitlab/mod.rs +0 -0
  268. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/rust/rhgitaly/src/gitlab/reference.rs +0 -0
  269. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/rust/rhgitaly/src/gitlab/revision.rs +0 -0
  270. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/rust/rhgitaly/src/gitlab/state.rs +0 -0
  271. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/rust/rhgitaly/src/glob.rs +0 -0
  272. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/rust/rhgitaly/src/main.rs +0 -0
  273. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/rust/rhgitaly/src/mercurial.rs +0 -0
  274. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/rust/rhgitaly/src/message.rs +0 -0
  275. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/rust/rhgitaly/src/metadata.rs +0 -0
  276. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/rust/rhgitaly/src/oid.rs +0 -0
  277. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/rust/rhgitaly/src/process.rs +0 -0
  278. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/rust/rhgitaly/src/repository/spawner.rs +0 -0
  279. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/rust/rhgitaly/src/service/analysis.rs +0 -0
  280. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/rust/rhgitaly/src/service/blob.rs +0 -0
  281. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/rust/rhgitaly/src/service/commit/get_tree_entries.rs +0 -0
  282. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/rust/rhgitaly/src/service/commit/last_commits.rs +0 -0
  283. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/rust/rhgitaly/src/service/commit/tree_entry.rs +0 -0
  284. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/rust/rhgitaly/src/service/diff.rs +0 -0
  285. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/rust/rhgitaly/src/service/mercurial_repository.rs +0 -0
  286. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/rust/rhgitaly/src/service/mod.rs +0 -0
  287. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/rust/rhgitaly/src/service/ref.rs +0 -0
  288. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/rust/rhgitaly/src/service/remote.rs +0 -0
  289. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/rust/rhgitaly/src/service/repository.rs +0 -0
  290. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/rust/rhgitaly/src/service/server.rs +0 -0
  291. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/rust/rhgitaly/src/sidecar.rs +0 -0
  292. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/rust/rhgitaly/src/ssh.rs +0 -0
  293. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/rust/rhgitaly/src/streaming.rs +0 -0
  294. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/rust/rhgitaly/src/util.rs +0 -0
  295. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/rust/rs-enry.rev +0 -0
  296. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/setup.cfg +0 -0
  297. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/setup.py +0 -0
  298. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/test-requirements.txt +0 -0
  299. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/tests_with_gitaly/__init__.py +0 -0
  300. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/tests_with_gitaly/comparison.py +0 -0
  301. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/tests_with_gitaly/conftest.py +0 -0
  302. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/tests_with_gitaly/gitaly.py +0 -0
  303. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/tests_with_gitaly/hgitaly_rhgitaly_comparison.py +0 -0
  304. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/tests_with_gitaly/test_blob_tree.py +0 -0
  305. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/tests_with_gitaly/test_comparison.py +0 -0
  306. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/tests_with_gitaly/test_diff.py +0 -0
  307. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/tests_with_gitaly/test_gitaly_server.py +0 -0
  308. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/tests_with_gitaly/test_mercurial_aux_git.py +0 -0
  309. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/tests_with_gitaly/test_mercurial_repository.py +0 -0
  310. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/tests_with_gitaly/test_operations.py +0 -0
  311. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/tests_with_gitaly/test_ref.py +0 -0
  312. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/tests_with_gitaly/test_remote.py +0 -0
  313. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/tests_with_gitaly/test_repository_service.py +0 -0
  314. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/tests_with_gitaly/test_rhgitaly_server.py +0 -0
  315. {hgitaly-17.10.0a0 → hgitaly-17.11.0}/tests_with_gitaly/test_server.py +0 -0
@@ -138,3 +138,5 @@ e9f5b758dbc13eb7dc1f44b8246bbef0dcc74f1a 17.8.3
138
138
  c2dc21a71ccd0cbe8c33ae9b8ff28128e0d977bd 17.8.4
139
139
  ac2aa9b92e0d157d1d51cc7864ed4658a2ecdb32 17.9.0
140
140
  1febbc24f370e41ac50979a84fdc36a8eef85a41 17.9.1
141
+ 138820967edc1ffa23f49bf4101fb7a703baccb3 17.10.0a0
142
+ fdf0201ab1df3afbb372f4dd1005009ca37be713 17.11.0a0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: hgitaly
3
- Version: 17.10.0a0
3
+ Version: 17.11.0
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
@@ -19,6 +19,7 @@ from mercurial import (
19
19
 
20
20
  demandimport.disable()
21
21
 
22
+ from hgitaly.identification import ensure_client_id
22
23
  from hgitaly.server import (
23
24
  run_forever,
24
25
  UnsupportedUrlScheme,
@@ -108,6 +109,9 @@ def serve(ui, **opts):
108
109
  b"'heptapod.repositories-root'. Please define it or run "
109
110
  b"the command with the --repositories-root option."
110
111
  ))
112
+ config_root = os.fsdecode(ui.config(b'hgitaly', b'configuration-root',
113
+ default=repos_root))
114
+ ensure_client_id(config_root)
111
115
  nb_workers = ui.configint(b'hgitaly', b'workers')
112
116
  run_opts = dict(nb_workers=nb_workers,
113
117
  restart_done_workers=True,
@@ -50,14 +50,19 @@ def mock_run_forever(tmpdir, monkeypatch, config=None):
50
50
  return ui, records
51
51
 
52
52
 
53
+ def repos_root(tmpdir):
54
+ return os.fsencode(tmpdir / 'repos')
55
+
56
+
53
57
  def test_serve_default_url(tmpdir, monkeypatch):
54
58
  ui, records = mock_run_forever(tmpdir, monkeypatch)
55
- hgitaly_ext.serve(ui, listen=[], repositories_root=b'/some/path')
59
+ repositories_root = repos_root(tmpdir)
60
+ hgitaly_ext.serve(ui, listen=[], repositories_root=repositories_root)
56
61
  (listen_urls, storages), kwargs = records[0]
57
62
 
58
63
  # we have no bytes in the inner call
59
64
  assert listen_urls == [DEFAULT_LISTEN_URL_STR]
60
- assert storages == dict(default=b'/some/path')
65
+ assert storages == dict(default=repositories_root)
61
66
 
62
67
  # default for workers is also expected to be ``None``
63
68
  # (be it explicitely passed or not)
@@ -65,8 +70,11 @@ def test_serve_default_url(tmpdir, monkeypatch):
65
70
 
66
71
 
67
72
  def test_serve_workers_config(tmpdir, monkeypatch):
68
- ui, records = mock_run_forever(tmpdir, monkeypatch,
69
- config=dict(hgitaly=dict(workers='47')))
73
+ ui, records = mock_run_forever(
74
+ tmpdir, monkeypatch,
75
+ config=dict(hgitaly={'workers': '47',
76
+ 'configuration-root': str(tmpdir / 'config')}),
77
+ )
70
78
  hgitaly_ext.serve(ui, listen=[], repositories_root=b'/some/path')
71
79
  kwargs = records[0][1]
72
80
  assert kwargs.get('nb_workers') == 47
@@ -76,7 +84,8 @@ def test_serve_max_rss_mb(tmpdir, monkeypatch):
76
84
  ui, records = mock_run_forever(
77
85
  tmpdir, monkeypatch,
78
86
  config=dict(hgitaly={'worker.max-rss-mib': '128'}))
79
- hgitaly_ext.serve(ui, listen=[], repositories_root=b'/some/path')
87
+ repositories_root = repos_root(tmpdir)
88
+ hgitaly_ext.serve(ui, listen=[], repositories_root=repositories_root)
80
89
  kwargs = records[0][1]
81
90
  assert kwargs.get('max_rss_mib') == 128
82
91
 
@@ -85,7 +94,8 @@ def test_serve_monitoring_interval(tmpdir, monkeypatch):
85
94
  ui, records = mock_run_forever(
86
95
  tmpdir, monkeypatch,
87
96
  config=dict(hgitaly={'worker.monitoring-interval-seconds': '13'}))
88
- hgitaly_ext.serve(ui, listen=[], repositories_root=b'/some/path')
97
+ repositories_root = repos_root(tmpdir)
98
+ hgitaly_ext.serve(ui, listen=[], repositories_root=repositories_root)
89
99
  kwargs = records[0][1]
90
100
  assert kwargs.get('monitoring_interval') == 13
91
101
 
@@ -95,20 +105,22 @@ def test_serve_graceful_shutdown(tmpdir, monkeypatch):
95
105
  tmpdir, monkeypatch,
96
106
  config=dict(hgitaly={'worker.graceful-shutdown-timeout-seconds': '18'
97
107
  }))
98
- hgitaly_ext.serve(ui, listen=[], repositories_root=b'/some/path')
108
+ repositories_root = repos_root(tmpdir)
109
+ hgitaly_ext.serve(ui, listen=[], repositories_root=repositories_root)
99
110
  kwargs = records[0][1]
100
111
  assert kwargs.get('graceful_shutdown_timeout_seconds') == 18
101
112
 
102
113
 
103
114
  def test_serve_config_repositories_root(tmpdir, monkeypatch):
104
115
  ui, records = mock_run_forever(tmpdir, monkeypatch)
105
- ui.setconfig(b'heptapod', b'repositories-root', b'/explicit/path')
116
+ repositories_root = repos_root(tmpdir)
117
+ ui.setconfig(b'heptapod', b'repositories-root', repositories_root)
106
118
  hgitaly_ext.serve(ui, listen=[])
107
119
  listen_urls, storages = records[0][0]
108
120
 
109
121
  # we have no bytes in the inner call
110
122
  assert listen_urls == [DEFAULT_LISTEN_URL_STR]
111
- assert storages == dict(default=b'/explicit/path')
123
+ assert storages == dict(default=repositories_root)
112
124
 
113
125
 
114
126
  def test_missing_repos_root():
@@ -118,17 +130,17 @@ def test_missing_repos_root():
118
130
  assert b'repositories-root' in exc_info.value.args[0]
119
131
 
120
132
 
121
- def test_reraising():
133
+ def test_reraising(tmpdir):
122
134
  # the point here is that we don't mock run_forever() , instead
123
135
  # we test the whole loop from bad arguments, leading hgitaly.server.init()
124
136
  # to raise exceptions and we test the final conversions of the latter.
125
137
  ui = make_ui(None, config=activating_config())
126
- repos_root = b'/some/path'
138
+ repositories_root = repos_root(tmpdir)
127
139
 
128
140
  invalid_ipv6_url = b'tcp://[::'
129
141
  with pytest.raises(error.Abort) as exc_info:
130
142
  hgitaly_ext.serve(ui, listen=[invalid_ipv6_url],
131
- repositories_root=repos_root)
143
+ repositories_root=repositories_root)
132
144
  message = exc_info.value.args[0]
133
145
  assert invalid_ipv6_url in message
134
146
  assert b'Invalid IPv6 URL' in message # explanation from urlparse()
@@ -136,14 +148,14 @@ def test_reraising():
136
148
  unsupported_scheme_url = b'exotic://localhost:1234'
137
149
  with pytest.raises(error.Abort) as exc_info:
138
150
  hgitaly_ext.serve(ui, listen=[unsupported_scheme_url],
139
- repositories_root=repos_root)
151
+ repositories_root=repositories_root)
140
152
  message = exc_info.value.args[0]
141
153
  assert b"scheme: 'exotic'" in message
142
154
 
143
155
  cant_bind_url = b'tcp://unresolvable-or-youre-kidding-me:1234'
144
156
  with pytest.raises(error.Abort) as exc_info:
145
157
  hgitaly_ext.serve(ui, listen=[cant_bind_url],
146
- repositories_root=repos_root)
158
+ repositories_root=repositories_root)
147
159
  message = exc_info.value.args[0]
148
160
  assert cant_bind_url in message
149
161
  assert b'could not listen' in message
@@ -0,0 +1 @@
1
+ 17.11.0
@@ -0,0 +1,46 @@
1
+ # Copyright 2025 Georges Racinet <georges.racinet@cloudcrane.io>
2
+ #
3
+ # This software may be used and distributed according to the terms of the
4
+ # GNU General Public License version 2 or any later version.
5
+ #
6
+ # SPDX-License-Identifier: GPL-2.0-or-later
7
+ """Utilities for identificaton of servers and client.
8
+
9
+ An HGitaly client always have a pair of identifiers:
10
+
11
+ - the Client ID is a globally unique and persistent identifier
12
+ - the Incarnation ID is volatile. It is convenient for it to be the UNIX
13
+ timestamp in seconds, serialized as a decimal string, but that is not
14
+ mandatory.
15
+
16
+ If an operation records some Client / Incarnation ID pair, a subsequent
17
+ change of the Incarnation ID for the same client means that the client has
18
+ restarted since the recording, and thus that the operation is obsolete
19
+ (whether it finished normally or not, the latter including having been harshly
20
+ killed).
21
+
22
+ An HGitaly server is always consider to be its own client, even if it accesses
23
+ the resources flagged with these IDs in-process rathere than through gRPC.
24
+ """
25
+ from pathlib import Path
26
+ import time
27
+ import uuid
28
+
29
+ INCARNATION_ID = str(int(time.time()))
30
+ CLIENT_ID_SLUG = '+hgitaly/self-client.uuid'
31
+ CLIENT_ID = None # initialized at startup
32
+
33
+
34
+ def ensure_client_id(config_root):
35
+ """To be used in startup sequence, before any concurrency is possible."""
36
+ global CLIENT_ID
37
+
38
+ path = Path(config_root) / CLIENT_ID_SLUG
39
+ if path.exists():
40
+ CLIENT_ID = path.read_text().strip()
41
+ return
42
+
43
+ client_id = str(uuid.uuid4())
44
+ path.parent.mkdir(parents=True, exist_ok=True)
45
+ path.write_text(client_id)
46
+ CLIENT_ID = client_id
@@ -5,7 +5,10 @@
5
5
  #
6
6
  # SPDX-License-Identifier: GPL-2.0-or-later
7
7
  import multiprocessing
8
+ import os
9
+ import psutil
8
10
  import pytest
11
+ import random
9
12
  import signal
10
13
  import socket
11
14
  import sys
@@ -14,6 +17,9 @@ from socket import (
14
17
  )
15
18
  import time
16
19
 
20
+ from hgitaly.procutil import is_current_service_process
21
+ from hgitaly.testing.multiprocessing import assert_recv
22
+
17
23
  from .. import prefork as server
18
24
  from ..worker import WorkerProcess
19
25
 
@@ -142,6 +148,81 @@ def test_run_forever(monkeypatch, tmpdir):
142
148
  assert len(workers[tcp_url]) >= 2
143
149
 
144
150
 
151
+ def test_siblings_recognition():
152
+
153
+ def worker_callable(wid, pipe, **kw): # pragma no cover
154
+ from hgitaly import procutil
155
+ procutil.IS_CHILD_PROCESS = wid != 2
156
+ pipe.send("started")
157
+
158
+ while True:
159
+ pipe.poll(timeout=1)
160
+ requested_pid = pipe.recv()
161
+ print(f"Worker {wid} got {requested_pid}")
162
+ res = is_current_service_process(requested_pid)
163
+ print(f"Worker {wid} says {res}")
164
+ pipe.send(is_current_service_process(requested_pid))
165
+
166
+ pipes = [multiprocessing.Pipe() for _ in range(3)]
167
+ parent_pipes = [p[0] for p in pipes]
168
+ child_pipes = [p[1] for p in pipes]
169
+
170
+ workers = [WorkerProcess(process_args=(wid, child_pipes[wid]),
171
+ process_callable=worker_callable)
172
+ for wid in range(3)]
173
+
174
+ try:
175
+ for wp in workers:
176
+ wp.init_process()
177
+
178
+ for wid, worker in enumerate(workers):
179
+ worker.start()
180
+ assert_recv(parent_pipes[wid], "started")
181
+
182
+ # sanity check: boolean change in child does not leak to parent
183
+ from hgitaly import procutil
184
+ assert not procutil.IS_CHILD_PROCESS
185
+
186
+ # workers are siblings of themselves
187
+ parent_pipes[0].send(workers[0].pid)
188
+ assert_recv(parent_pipes[0], True)
189
+
190
+ # other sibling is recognized
191
+ parent_pipes[0].send(workers[1].pid)
192
+ assert_recv(parent_pipes[0], True)
193
+
194
+ parent_pipes[1].send(workers[0].pid)
195
+ assert_recv(parent_pipes[1], True)
196
+
197
+ # the manager is not a sibling
198
+ parent_pipes[0].send(os.getpid())
199
+ assert_recv(parent_pipes[0], False)
200
+
201
+ # PID 1 is never a sibling
202
+ parent_pipes[0].send(1)
203
+ assert_recv(parent_pipes[0], False)
204
+
205
+ # non-existing process cannot be a sibling
206
+ while True:
207
+ unknown_pid = random.randint(10000, 1 << 31)
208
+ if not psutil.pid_exists(unknown_pid):
209
+ parent_pipes[1].send(unknown_pid)
210
+ assert_recv(parent_pipes[1], False)
211
+ break
212
+
213
+ # worker 3 considers itself to be standalone
214
+ parent_pipes[2].send(workers[0].pid)
215
+ assert_recv(parent_pipes[2], False)
216
+ parent_pipes[2].send(workers[2].pid)
217
+ assert_recv(parent_pipes[2], True)
218
+ finally:
219
+ for worker in workers:
220
+ if worker.process.is_alive():
221
+ # kill() would prevent coverage collection
222
+ worker.process.terminate()
223
+ worker.join()
224
+
225
+
145
226
  def test_terminate_workers(monkeypatch, tmpdir):
146
227
 
147
228
  def worker_callable(wid, queue, **kw): # pragma no cover
@@ -56,6 +56,10 @@ class WorkerProcess:
56
56
  wp.start()
57
57
  return wp
58
58
 
59
+ @property
60
+ def pid(self):
61
+ return self.process.pid
62
+
59
63
  def __str__(self):
60
64
  pid = 'no process' if self.process is None else self.process.pid
61
65
  return f"Worker {self.process_args[0]} (pid: {pid})"
@@ -6,6 +6,7 @@
6
6
  # SPDX-License-Identifier: GPL-2.0-or-later
7
7
  from grpc import StatusCode
8
8
  import logging
9
+ import os
9
10
  import time
10
11
 
11
12
  from mercurial.merge import merge
@@ -39,6 +40,11 @@ from ..revision import (
39
40
  gitlab_revision_changeset,
40
41
  validate_oid,
41
42
  )
43
+ from ..workdir import (
44
+ ClientMismatch,
45
+ reserve_prepare_workdir,
46
+ release_workdir_by_id,
47
+ )
42
48
  from ..stub.errors_pb2 import (
43
49
  MergeConflictError,
44
50
  ReferenceUpdateError,
@@ -56,6 +62,10 @@ from ..stub.mercurial_operations_pb2 import (
56
62
  PublishChangesetError,
57
63
  PublishChangesetRequest,
58
64
  PublishChangesetResponse,
65
+ ReleaseWorkingDirectoryRequest,
66
+ ReleaseWorkingDirectoryResponse,
67
+ GetWorkingDirectoryRequest,
68
+ GetWorkingDirectoryResponse,
59
69
  )
60
70
  from ..stub.mercurial_operations_pb2_grpc import (
61
71
  MercurialOperationsServiceServicer,
@@ -85,6 +95,42 @@ class MercurialOperationsServicer(MercurialOperationsServiceServicer,
85
95
  The ordering of methods in this source file is the same as in the proto
86
96
  file.
87
97
  """
98
+ def GetWorkingDirectory(self,
99
+ request: GetWorkingDirectoryRequest,
100
+ context) -> GetWorkingDirectoryResponse:
101
+ gl_repo = request.repository
102
+ rev = request.revision
103
+ repo = self.load_repo(gl_repo, context)
104
+ workdirs_root = self.repo_workdirs_root(gl_repo, context)
105
+ changeset = gitlab_revision_changeset(repo, rev)
106
+ if changeset is None:
107
+ context.abort(StatusCode.NOT_FOUND, "Revision not found")
108
+
109
+ wd = reserve_prepare_workdir(workdirs_root, repo,
110
+ client_id=request.client_id,
111
+ incarnation_id=request.incarnation_id,
112
+ changeset=changeset)
113
+ repos_root = os.fsdecode(self.storages[gl_repo.storage_name])
114
+ wd_rpath = str(wd.path.relative_to(repos_root))
115
+
116
+ return GetWorkingDirectoryResponse(working_directory_id=wd.id,
117
+ relative_path=wd_rpath)
118
+
119
+ def ReleaseWorkingDirectory(self,
120
+ request: ReleaseWorkingDirectoryRequest,
121
+ context) -> ReleaseWorkingDirectoryResponse:
122
+ gl_repo = request.repository
123
+ repo = self.load_repo(gl_repo, context)
124
+ wd_id = request.working_directory_id
125
+ try:
126
+ release_workdir_by_id(repo, wd_id, request.client_id)
127
+ except ClientMismatch:
128
+ context.abort(
129
+ StatusCode.PERMISSION_DENIED,
130
+ f"Not the owner of the lease on working directory {wd_id}"
131
+ )
132
+ return ReleaseWorkingDirectoryResponse()
133
+
88
134
  def MergeAnalysis(self,
89
135
  request: MergeAnalysisRequest,
90
136
  context) -> MergeAnalysisResponse:
@@ -9,11 +9,13 @@ from grpc import (
9
9
  StatusCode,
10
10
  )
11
11
  import pytest
12
+ import uuid
12
13
 
13
14
  from mercurial import (
14
15
  error as hg_error,
15
16
  phases,
16
17
  )
18
+ from mercurial_testhelpers import RepoWrapper
17
19
 
18
20
  from google.protobuf.timestamp_pb2 import Timestamp
19
21
 
@@ -25,6 +27,10 @@ from hgitaly.changelog import ancestor
25
27
  from hgitaly.errors import (
26
28
  parse_assert_structured_error,
27
29
  )
30
+ from hgitaly.identification import INCARNATION_ID
31
+ from hgitaly.servicer import (
32
+ PY_HEPTAPOD_SKIP_HOOKS,
33
+ )
28
34
  from hgitaly.stub.errors_pb2 import (
29
35
  ReferenceUpdateError,
30
36
  )
@@ -37,6 +43,8 @@ from hgitaly.stub.mercurial_operations_pb2 import (
37
43
  PublishChangesetRequest,
38
44
  MergeAnalysisRequest,
39
45
  MergeAnalysisResponse,
46
+ GetWorkingDirectoryRequest,
47
+ ReleaseWorkingDirectoryRequest,
40
48
  )
41
49
  from hgitaly.stub.mercurial_operations_pb2_grpc import (
42
50
  MercurialOperationsServiceStub,
@@ -54,6 +62,8 @@ class OperationsFixture(MutationServiceFixture):
54
62
 
55
63
  stub_cls = MercurialOperationsServiceStub
56
64
 
65
+ client_id = str(uuid.uuid4())
66
+
57
67
  def merge_analysis(self, **kw):
58
68
  return self.stub.MergeAnalysis(MergeAnalysisRequest(
59
69
  repository=self.grpc_repo, **kw))
@@ -76,6 +86,19 @@ class OperationsFixture(MutationServiceFixture):
76
86
  return self.stub.MergeBranch(MergeBranchRequest(**kw),
77
87
  metadata=self.grpc_metadata())
78
88
 
89
+ def get_workdir(self, **kw):
90
+ kw.setdefault('client_id', self.client_id)
91
+ kw.setdefault('incarnation_id', INCARNATION_ID)
92
+ kw.setdefault('repository', self.grpc_repo)
93
+ return self.stub.GetWorkingDirectory(
94
+ GetWorkingDirectoryRequest(**kw))
95
+
96
+ def release_workdir(self, **kw):
97
+ kw.setdefault('client_id', self.client_id)
98
+ kw.setdefault('repository', self.grpc_repo)
99
+ return self.stub.ReleaseWorkingDirectory(
100
+ ReleaseWorkingDirectoryRequest(**kw))
101
+
79
102
 
80
103
  @pytest.fixture
81
104
  def operations_fixture(grpc_channel, server_repos_root):
@@ -603,3 +626,47 @@ def test_censor(operations_fixture, project_mode):
603
626
  assert exc.code() == StatusCode.INVALID_ARGUMENT
604
627
  assert 'changeset' in exc.details().lower()
605
628
  assert 'not found' in exc.details().lower()
629
+
630
+
631
+ def test_working_directories(operations_fixture, server_repos_root):
632
+ fixture = operations_fixture
633
+ gl_rev = b'branch/default'
634
+ wrapper = fixture.repo_wrapper
635
+ cs0 = wrapper.commit_file('foo')
636
+
637
+ resp = fixture.get_workdir(revision=gl_rev)
638
+ wd_id = resp.working_directory_id
639
+ wd_path = server_repos_root / 'default' / resp.relative_path
640
+
641
+ # let us check that the working directory works by committing a file
642
+ # in there and retrieve it from the main repo
643
+ wd_wrapper = RepoWrapper.load(wd_path)
644
+ wd_wrapper.repo.ui.environ[PY_HEPTAPOD_SKIP_HOOKS] = b'yes'
645
+ cs_done_in_wd = wd_wrapper.commit_file('bar', "done in wd")
646
+ wrapper.reload()
647
+ cs_in_main = wrapper.repo[cs_done_in_wd.hex()]
648
+ assert cs_in_main.description() == b'done in wd'
649
+ assert cs_in_main.p1() == cs0
650
+
651
+ # releasing without being the correct client
652
+ with pytest.raises(RpcError) as exc_info:
653
+ fixture.release_workdir(working_directory_id=wd_id,
654
+ client_id='some other client')
655
+ exc = exc_info.value
656
+ assert exc.code() == StatusCode.PERMISSION_DENIED
657
+
658
+ wd_id2 = fixture.get_workdir(revision=gl_rev).working_directory_id
659
+ assert wd_id2 != wd_id
660
+
661
+ # releasing for good
662
+ fixture.release_workdir(working_directory_id=wd_id)
663
+
664
+ # reuse of first workdir (also tests that no revison ends up selecting
665
+ # the same Mercurial branch as `branch/default`, hence `default`
666
+ assert fixture.get_workdir().working_directory_id == wd_id
667
+
668
+ # unknown revision
669
+ with pytest.raises(RpcError) as exc_info:
670
+ fixture.get_workdir(revision=b'ca34fe12')
671
+ exc = exc_info.value
672
+ assert exc.code() == StatusCode.NOT_FOUND
@@ -32,6 +32,7 @@ from hgext3rd.heptapod.keep_around import (
32
32
 
33
33
  from mercurial_testhelpers import RepoWrapper
34
34
 
35
+ from hgitaly.identification import CLIENT_ID, INCARNATION_ID
35
36
  from hgitaly.license_detector import license_content
36
37
  from hgitaly.revision import ZERO_SHA
37
38
  from hgitaly.stream import WRITE_BUFFER_SIZE
@@ -880,7 +881,10 @@ def test_remove_repository(fixture_with_repo, wds_success):
880
881
  working_dirs_roster_path = repo.vfs.join(WDS_ROSTER_FILE_NAME)
881
882
  os.symlink(working_dirs_roster_path, working_dirs_roster_path)
882
883
  else:
883
- with working_directory(wds_root, repo):
884
+ with working_directory(wds_root, repo,
885
+ client_id=CLIENT_ID,
886
+ incarnation_id=INCARNATION_ID,
887
+ ):
884
888
  pass
885
889
 
886
890
  fixture.remove_repository()
@@ -23,6 +23,7 @@ from mercurial import (
23
23
  from mercurial.repoview import _filteredrepotypes
24
24
 
25
25
  from .errors import ServiceError
26
+ from .identification import CLIENT_ID, INCARNATION_ID
26
27
  from .logging import LoggerAdapter
27
28
  from .workdir import working_directory
28
29
  from .stub.shared_pb2 import (
@@ -375,6 +376,8 @@ class HGitalyServicer:
375
376
 
376
377
  with working_directory(self.repo_workdirs_root(gl_repo, context),
377
378
  repo,
379
+ client_id=CLIENT_ID,
380
+ incarnation_id=INCARNATION_ID,
378
381
  changeset=changeset) as wd:
379
382
  # sadly, even passing repo.ui in share creation is not enough
380
383
  # for transient config items to be forwarded. Seems to be
@@ -19,7 +19,7 @@ from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__
19
19
  from . import operations_pb2 as operations__pb2
20
20
 
21
21
 
22
- DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1amercurial-operations.proto\x12\x07hgitaly\x1a\x0c\x65rrors.proto\x1a\nlint.proto\x1a\x0cshared.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x10operations.proto\"\x94\x01\n\x14MergeAnalysisRequest\x12,\n\nrepository\x18\x01 \x01(\x0b\x32\x12.gitaly.RepositoryB\x04\x98\xc6,\x01\x12\x17\n\x0fsource_revision\x18\x02 \x01(\x0c\x12\x17\n\x0ftarget_revision\x18\x03 \x01(\x0c\x12\x1c\n\x14skip_conflicts_check\x18\x04 \x01(\x08\"\xad\x02\n\x15MergeAnalysisResponse\x12\x17\n\x0fis_fast_forward\x18\x01 \x01(\x08\x12\x1f\n\x17has_obsolete_changesets\x18\x02 \x01(\x08\x12\x1f\n\x17has_unstable_changesets\x18\x03 \x01(\x08\x12\x15\n\rhas_conflicts\x18\x04 \x01(\x08\x12\x18\n\x10target_is_public\x18\x05 \x01(\x08\x12\x16\n\x0etarget_node_id\x18\x06 \x01(\t\x12\x15\n\rtarget_branch\x18\x07 \x01(\x0c\x12\x14\n\x0ctarget_topic\x18\x08 \x01(\x0c\x12\x16\n\x0esource_node_id\x18\t \x01(\t\x12\x15\n\rsource_branch\x18\n \x01(\x0c\x12\x14\n\x0csource_topic\x18\x0b \x01(\x0c\"\xad\x01\n\x17PublishChangesetRequest\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/\n\x08hg_perms\x18\x03 \x01(\x0e\x32\x1d.hgitaly.MercurialPermissions\x12\x17\n\x0fgitlab_revision\x18\x04 \x01(\x0c\"\x1a\n\x18PublishChangesetResponse\"P\n\x15PublishChangesetError\x12.\n\x0bgitlab_hook\x18\x01 \x01(\x0b\x32\x17.gitaly.CustomHookErrorH\x00\x42\x07\n\x05\x65rror\"\xa1\x02\n\x12MergeBranchRequest\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/\n\x08hg_perms\x18\x03 \x01(\x0e\x32\x1d.hgitaly.MercurialPermissions\x12\x11\n\tcommit_id\x18\x04 \x01(\t\x12\x0e\n\x06\x62ranch\x18\x05 \x01(\x0c\x12\x0f\n\x07message\x18\x06 \x01(\x0c\x12-\n\ttimestamp\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x18\n\x10\x65xpected_old_oid\x18\x08 \x01(\t\x12\x13\n\x0bsemi_linear\x18\t \x01(\x08\"K\n\x13MergeBranchResponse\x12\x34\n\rbranch_update\x18\x01 \x01(\x0b\x32\x1d.gitaly.OperationBranchUpdate\"\xe7\x01\n\x10MergeBranchError\x12.\n\x0bgitlab_hook\x18\x01 \x01(\x0b\x32\x17.gitaly.CustomHookErrorH\x00\x12.\n\x08\x63onflict\x18\x02 \x01(\x0b\x32\x1a.gitaly.MergeConflictErrorH\x00\x12\x37\n\x0freference_check\x18\x03 \x01(\x0b\x32\x1c.gitaly.ReferenceUpdateErrorH\x00\x12\x31\n\tpre_check\x18\x04 \x01(\x0e\x32\x1c.hgitaly.PreCheckUpdateErrorH\x00\x42\x07\n\x05\x65rror\"\x9a\x01\n\rCensorRequest\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\x19\n\x11\x63hangeset_node_id\x18\x03 \x01(\t\x12\x11\n\tfile_path\x18\x04 \x01(\x0c\x12\x11\n\ttombstone\x18\x05 \x01(\x0c\"\x10\n\x0e\x43\x65nsorResponse*8\n\x14MercurialPermissions\x12\x08\n\x04READ\x10\x00\x12\t\n\x05WRITE\x10\x01\x12\x0b\n\x07PUBLISH\x10\x02*k\n\x13PreCheckUpdateError\x12\x0e\n\nNO_PROBLEM\x10\x00\x12\x14\n\x10NOT_FAST_FORWARD\x10\x01\x12\x16\n\x12OBSOLETE_CHANGESET\x10\x02\x12\x16\n\x12UNSTABLE_CHANGESET\x10\x03\x32\xea\x02\n\x1aMercurialOperationsService\x12V\n\rMergeAnalysis\x12\x1d.hgitaly.MergeAnalysisRequest\x1a\x1e.hgitaly.MergeAnalysisResponse\"\x06\xfa\x97(\x02\x08\x02\x12_\n\x10PublishChangeset\x12 .hgitaly.PublishChangesetRequest\x1a!.hgitaly.PublishChangesetResponse\"\x06\xfa\x97(\x02\x08\x01\x12\x41\n\x06\x43\x65nsor\x12\x16.hgitaly.CensorRequest\x1a\x17.hgitaly.CensorResponse\"\x06\xfa\x97(\x02\x08\x01\x12P\n\x0bMergeBranch\x12\x1b.hgitaly.MergeBranchRequest\x1a\x1c.hgitaly.MergeBranchResponse\"\x06\xfa\x97(\x02\x08\x01\x62\x06proto3')
22
+ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1amercurial-operations.proto\x12\x07hgitaly\x1a\x0c\x65rrors.proto\x1a\nlint.proto\x1a\x0cshared.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x10operations.proto\"\x94\x01\n\x14MergeAnalysisRequest\x12,\n\nrepository\x18\x01 \x01(\x0b\x32\x12.gitaly.RepositoryB\x04\x98\xc6,\x01\x12\x17\n\x0fsource_revision\x18\x02 \x01(\x0c\x12\x17\n\x0ftarget_revision\x18\x03 \x01(\x0c\x12\x1c\n\x14skip_conflicts_check\x18\x04 \x01(\x08\"\xad\x02\n\x15MergeAnalysisResponse\x12\x17\n\x0fis_fast_forward\x18\x01 \x01(\x08\x12\x1f\n\x17has_obsolete_changesets\x18\x02 \x01(\x08\x12\x1f\n\x17has_unstable_changesets\x18\x03 \x01(\x08\x12\x15\n\rhas_conflicts\x18\x04 \x01(\x08\x12\x18\n\x10target_is_public\x18\x05 \x01(\x08\x12\x16\n\x0etarget_node_id\x18\x06 \x01(\t\x12\x15\n\rtarget_branch\x18\x07 \x01(\x0c\x12\x14\n\x0ctarget_topic\x18\x08 \x01(\x0c\x12\x16\n\x0esource_node_id\x18\t \x01(\t\x12\x15\n\rsource_branch\x18\n \x01(\x0c\x12\x14\n\x0csource_topic\x18\x0b \x01(\x0c\"\xad\x01\n\x17PublishChangesetRequest\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/\n\x08hg_perms\x18\x03 \x01(\x0e\x32\x1d.hgitaly.MercurialPermissions\x12\x17\n\x0fgitlab_revision\x18\x04 \x01(\x0c\"\x1a\n\x18PublishChangesetResponse\"P\n\x15PublishChangesetError\x12.\n\x0bgitlab_hook\x18\x01 \x01(\x0b\x32\x17.gitaly.CustomHookErrorH\x00\x42\x07\n\x05\x65rror\"\xa1\x02\n\x12MergeBranchRequest\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/\n\x08hg_perms\x18\x03 \x01(\x0e\x32\x1d.hgitaly.MercurialPermissions\x12\x11\n\tcommit_id\x18\x04 \x01(\t\x12\x0e\n\x06\x62ranch\x18\x05 \x01(\x0c\x12\x0f\n\x07message\x18\x06 \x01(\x0c\x12-\n\ttimestamp\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x18\n\x10\x65xpected_old_oid\x18\x08 \x01(\t\x12\x13\n\x0bsemi_linear\x18\t \x01(\x08\"K\n\x13MergeBranchResponse\x12\x34\n\rbranch_update\x18\x01 \x01(\x0b\x32\x1d.gitaly.OperationBranchUpdate\"\xe7\x01\n\x10MergeBranchError\x12.\n\x0bgitlab_hook\x18\x01 \x01(\x0b\x32\x17.gitaly.CustomHookErrorH\x00\x12.\n\x08\x63onflict\x18\x02 \x01(\x0b\x32\x1a.gitaly.MergeConflictErrorH\x00\x12\x37\n\x0freference_check\x18\x03 \x01(\x0b\x32\x1c.gitaly.ReferenceUpdateErrorH\x00\x12\x31\n\tpre_check\x18\x04 \x01(\x0e\x32\x1c.hgitaly.PreCheckUpdateErrorH\x00\x42\x07\n\x05\x65rror\"\x9a\x01\n\rCensorRequest\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\x19\n\x11\x63hangeset_node_id\x18\x03 \x01(\t\x12\x11\n\tfile_path\x18\x04 \x01(\x0c\x12\x11\n\ttombstone\x18\x05 \x01(\x0c\"\x10\n\x0e\x43\x65nsorResponse\"\x87\x01\n\x1aGetWorkingDirectoryRequest\x12,\n\nrepository\x18\x01 \x01(\x0b\x32\x12.gitaly.RepositoryB\x04\x98\xc6,\x01\x12\x11\n\tclient_id\x18\x02 \x01(\t\x12\x16\n\x0eincarnation_id\x18\x03 \x01(\t\x12\x10\n\x08revision\x18\x04 \x01(\x0c\"R\n\x1bGetWorkingDirectoryResponse\x12\x1c\n\x14working_directory_id\x18\x01 \x01(\r\x12\x15\n\rrelative_path\x18\x02 \x01(\t\"\x97\x01\n\x1eReleaseWorkingDirectoryRequest\x12,\n\nrepository\x18\x01 \x01(\x0b\x32\x12.gitaly.RepositoryB\x04\x98\xc6,\x01\x12\x11\n\tclient_id\x18\x02 \x01(\t\x12\x16\n\x0eincarnation_id\x18\x03 \x01(\t\x12\x1c\n\x14working_directory_id\x18\x04 \x01(\r\"!\n\x1fReleaseWorkingDirectoryResponse*8\n\x14MercurialPermissions\x12\x08\n\x04READ\x10\x00\x12\t\n\x05WRITE\x10\x01\x12\x0b\n\x07PUBLISH\x10\x02*k\n\x13PreCheckUpdateError\x12\x0e\n\nNO_PROBLEM\x10\x00\x12\x14\n\x10NOT_FAST_FORWARD\x10\x01\x12\x16\n\x12OBSOLETE_CHANGESET\x10\x02\x12\x16\n\x12UNSTABLE_CHANGESET\x10\x03\x32\xca\x04\n\x1aMercurialOperationsService\x12V\n\rMergeAnalysis\x12\x1d.hgitaly.MergeAnalysisRequest\x1a\x1e.hgitaly.MergeAnalysisResponse\"\x06\xfa\x97(\x02\x08\x02\x12_\n\x10PublishChangeset\x12 .hgitaly.PublishChangesetRequest\x1a!.hgitaly.PublishChangesetResponse\"\x06\xfa\x97(\x02\x08\x01\x12\x41\n\x06\x43\x65nsor\x12\x16.hgitaly.CensorRequest\x1a\x17.hgitaly.CensorResponse\"\x06\xfa\x97(\x02\x08\x01\x12P\n\x0bMergeBranch\x12\x1b.hgitaly.MergeBranchRequest\x1a\x1c.hgitaly.MergeBranchResponse\"\x06\xfa\x97(\x02\x08\x01\x12h\n\x13GetWorkingDirectory\x12#.hgitaly.GetWorkingDirectoryRequest\x1a$.hgitaly.GetWorkingDirectoryResponse\"\x06\xfa\x97(\x02\x08\x01\x12t\n\x17ReleaseWorkingDirectory\x12\'.hgitaly.ReleaseWorkingDirectoryRequest\x1a(.hgitaly.ReleaseWorkingDirectoryResponse\"\x06\xfa\x97(\x02\x08\x01\x62\x06proto3')
23
23
 
24
24
  _globals = globals()
25
25
  _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
@@ -34,6 +34,10 @@ if not _descriptor._USE_C_DESCRIPTORS:
34
34
  _globals['_MERGEBRANCHREQUEST'].fields_by_name['repository']._serialized_options = b'\230\306,\001'
35
35
  _globals['_CENSORREQUEST'].fields_by_name['repository']._loaded_options = None
36
36
  _globals['_CENSORREQUEST'].fields_by_name['repository']._serialized_options = b'\230\306,\001'
37
+ _globals['_GETWORKINGDIRECTORYREQUEST'].fields_by_name['repository']._loaded_options = None
38
+ _globals['_GETWORKINGDIRECTORYREQUEST'].fields_by_name['repository']._serialized_options = b'\230\306,\001'
39
+ _globals['_RELEASEWORKINGDIRECTORYREQUEST'].fields_by_name['repository']._loaded_options = None
40
+ _globals['_RELEASEWORKINGDIRECTORYREQUEST'].fields_by_name['repository']._serialized_options = b'\230\306,\001'
37
41
  _globals['_MERCURIALOPERATIONSSERVICE'].methods_by_name['MergeAnalysis']._loaded_options = None
38
42
  _globals['_MERCURIALOPERATIONSSERVICE'].methods_by_name['MergeAnalysis']._serialized_options = b'\372\227(\002\010\002'
39
43
  _globals['_MERCURIALOPERATIONSSERVICE'].methods_by_name['PublishChangeset']._loaded_options = None
@@ -42,10 +46,14 @@ if not _descriptor._USE_C_DESCRIPTORS:
42
46
  _globals['_MERCURIALOPERATIONSSERVICE'].methods_by_name['Censor']._serialized_options = b'\372\227(\002\010\001'
43
47
  _globals['_MERCURIALOPERATIONSSERVICE'].methods_by_name['MergeBranch']._loaded_options = None
44
48
  _globals['_MERCURIALOPERATIONSSERVICE'].methods_by_name['MergeBranch']._serialized_options = b'\372\227(\002\010\001'
45
- _globals['_MERCURIALPERMISSIONS']._serialized_start=1649
46
- _globals['_MERCURIALPERMISSIONS']._serialized_end=1705
47
- _globals['_PRECHECKUPDATEERROR']._serialized_start=1707
48
- _globals['_PRECHECKUPDATEERROR']._serialized_end=1814
49
+ _globals['_MERCURIALOPERATIONSSERVICE'].methods_by_name['GetWorkingDirectory']._loaded_options = None
50
+ _globals['_MERCURIALOPERATIONSSERVICE'].methods_by_name['GetWorkingDirectory']._serialized_options = b'\372\227(\002\010\001'
51
+ _globals['_MERCURIALOPERATIONSSERVICE'].methods_by_name['ReleaseWorkingDirectory']._loaded_options = None
52
+ _globals['_MERCURIALOPERATIONSSERVICE'].methods_by_name['ReleaseWorkingDirectory']._serialized_options = b'\372\227(\002\010\001'
53
+ _globals['_MERCURIALPERMISSIONS']._serialized_start=2060
54
+ _globals['_MERCURIALPERMISSIONS']._serialized_end=2116
55
+ _globals['_PRECHECKUPDATEERROR']._serialized_start=2118
56
+ _globals['_PRECHECKUPDATEERROR']._serialized_end=2225
49
57
  _globals['_MERGEANALYSISREQUEST']._serialized_start=131
50
58
  _globals['_MERGEANALYSISREQUEST']._serialized_end=279
51
59
  _globals['_MERGEANALYSISRESPONSE']._serialized_start=282
@@ -66,6 +74,14 @@ if not _descriptor._USE_C_DESCRIPTORS:
66
74
  _globals['_CENSORREQUEST']._serialized_end=1629
67
75
  _globals['_CENSORRESPONSE']._serialized_start=1631
68
76
  _globals['_CENSORRESPONSE']._serialized_end=1647
69
- _globals['_MERCURIALOPERATIONSSERVICE']._serialized_start=1817
70
- _globals['_MERCURIALOPERATIONSSERVICE']._serialized_end=2179
77
+ _globals['_GETWORKINGDIRECTORYREQUEST']._serialized_start=1650
78
+ _globals['_GETWORKINGDIRECTORYREQUEST']._serialized_end=1785
79
+ _globals['_GETWORKINGDIRECTORYRESPONSE']._serialized_start=1787
80
+ _globals['_GETWORKINGDIRECTORYRESPONSE']._serialized_end=1869
81
+ _globals['_RELEASEWORKINGDIRECTORYREQUEST']._serialized_start=1872
82
+ _globals['_RELEASEWORKINGDIRECTORYREQUEST']._serialized_end=2023
83
+ _globals['_RELEASEWORKINGDIRECTORYRESPONSE']._serialized_start=2025
84
+ _globals['_RELEASEWORKINGDIRECTORYRESPONSE']._serialized_end=2058
85
+ _globals['_MERCURIALOPERATIONSSERVICE']._serialized_start=2228
86
+ _globals['_MERCURIALOPERATIONSSERVICE']._serialized_end=2814
71
87
  # @@protoc_insertion_point(module_scope)