Commit 4154036f authored by Georges Racinet's avatar Georges Racinet 🦑
Browse files

doc: HGitaly specific protocol and language libraries

also adapted the Gitaly protocol upgrade procedure to
avoid removing the HGitaly specific `proto` files.
I don't honestly remember why this `rm` was there. Could have been
general concern in case an upstream proto file actually has
to disappear (not likely, we'll deal it manually if that happens)
parent e36cba66fb29
Pipeline #24910 passed with stages
in 1 minute and 7 seconds
......@@ -189,7 +189,6 @@ The virtualenv has to be activated
Example in a HDK context:
```
rm protos/*.proto
cp ../gitaly/proto/*.proto protos/ # we dont want the `go` subdir
```
......@@ -199,6 +198,50 @@ The virtualenv has to be activated
5. perform necessary `hg add` after close inspection of `hg status`
## Updating the HGitaly specific gRPC protocol
This package defines and implements an additional gRPC protocol, with
gRPC services and methods that are specific to Mercurial, or more generally
Heptapod.
### Protocol specification
The sources are `proto` files in the `protos/` directory, same as for the
Gitaly protocol.
They distinguish themselves by this declaration:
```
package hgitaly;
```
Each time a change is made to the protocol, the libraries for all
provided programming languages have to be regenerated and committed, ideally
together with the protocol change.
### Python library
It has a special status, being versioned together with the protocol and the
server implementation. It is provided as the [hgitaly.stub](hgitaly/stub)
package.
The Python stubs are produced by the same script that takes care of Gitaly
`proto` files:
```
./generate-stubs
```
### Ruby library
See [the separate documentation](ruby/README.md)
### Other languages
A Go library will probably be necessary quite soon for Workhorse or perhaps
Heptapod Shell.
A Rust library would be nice to have
[mercurial-testhelpers]: https://pypi.org/project/mercurial-testhelpers/
[grpcio]: https://pypi.org/project/grpcio/
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment