sapling/eden/mononoke/mononoke_api_hg
Yan Soares Couto 4bde7b7488 Use bonsai changeset upload on client
Summary:
## High level goal

This stack aims to add a way to upload commits directly using the bonsai format via edenapi, instead of using the hg format and converting on server.

The reason this is necessary is that snapshots will be uploaded on bonsai format directly, as hg format doesn't support them. So this is a stepping stone to do that, first being implemented on commit cloud upload, as that code already uses eden api, and later will be used by the snapshotting commands.

## This diff

This diff actually ties everything together from the stack and makes it work end to end. By creating the following client side changes:
- Add some config to use the bonsai format when uploading via EdenApi. The config is disabled by default.
- Add wrapper around new uploadfileblobs method (from D29799484 (8586ae1077))
- Getting the correct data to call the bonsai changeset upload endpoint created on D29849963 (b6548a10cb)
  - Some fields are String and not bytes
  - Some fields are renamed
  - File size and type can be acquired from file context. file content id, which is also required, is obtained as a response from the uploadfileblobs method: Behaviour added on D29879617 (9aae11a5ab)

Reviewed By: liubov-dmitrieva

Differential Revision: D29849964

fbshipit-source-id: a039159f927f49bbc45d4e0160ec1d3a01334eca
2021-07-28 02:16:35 -07:00
..
src Use bonsai changeset upload on client 2021-07-28 02:16:35 -07:00
Cargo.toml Use bonsai changeset upload on client 2021-07-28 02:16:35 -07:00