Commit Graph

204 Commits

Author SHA1 Message Date
Arun Kulshreshtha
5f10031e48 Add integration test for mononokeapi
Summary:
Add an integration test that talks to the API server from remotefilelog.

Since this involves running a local instance of Mononoke and the API server, I've added it to Mononoke's integration tests rather than Mercurial's integration tests in order to re-use the setup code from Mononoke's tests. Since the server is running locally, and would use a different SSL setup that the VIP that hg would normally access it through, the local API server is run without SSL enabled.

Reviewed By: Anastasiya-Zhyrkevich, farnz

Differential Revision: D13089196

fbshipit-source-id: 01f415d8ee7173f7f2ab3a234565fd79d618126e
2018-12-03 17:50:16 -08:00
Stanislau Hlebik
a9d81657d0 mononoke: fix test
Summary: test-init.t and test-lfs-to-mononoke.t were failing. This diff fixes them

Differential Revision: D13301143

fbshipit-source-id: 1f8060d4c6b641c555ba8a5cdcfe4cb14ac89d0a
2018-12-03 02:17:29 -08:00
Stanislau Hlebik
0780682c9c mononoke: fix tests
Summary: SSLLockTypes disappeared again.

Reviewed By: HarveyHunt

Differential Revision: D13176693

fbshipit-source-id: 30acd08cc07726e891f83b25837ddfbb4e4b9c86
2018-11-23 02:20:41 -08:00
Anastasiya Zhyrkevich
d713993c60 mononoke: [lfs] upload blake2 ->sha256 mapping on fetch
Summary:
According to [Git-LFS Plan](https://www.mercurial-scm.org/wiki/LfsPlan), `getfiles` instead of file content should return file in the [following format](https://www.mercurial-scm.org/wiki/LfsPlan#Metadata_format)
```
oid: sha256.SHA256HASH
size: size_int
```

Hg client requests files using sha1 hgfilenode hash. To calculate sha256 of the content, Mononoke is fetching the file from blobstore to memory, and calculate sha256.
It does not give any profit in time and memory consumptions, comparing to non-LFS transfer of Mononoke.

*Solution:*
To put a `key-value` to blobstore, after first request of the file. This means, that after hg client requested sha256 of the file for the first time, after calculation, put it to the blobstore.
Next request of the sha256 of the file content avoid recalcualtion of sha256 in Mononoke. It return sha256 saved in the blob.

Reviewed By: StanislavGlebik

Differential Revision: D13021826

fbshipit-source-id: 692e01e212e7d716bd822fa968e87abed5103aa7
2018-11-22 10:27:46 -08:00
Anastasiya Zhyrkevich
97c0bbb3ad optimization of getting file of a certain revision
Summary:
The file of some revision is the initial file content with applied deltas
Delta is a vector of Fragments.
Fragment is a sequential change of the file (old part of the content -> new content)

This diff is representing the implementation of optimization of the process of getting a file content of some revision.

Reviewed By: lukaspiatkowski

Differential Revision: D12928138

fbshipit-source-id: fcc28e2d0e0acf83e17887092f6593e155431c1b
2018-11-20 05:17:27 -08:00
Stanislau Hlebik
73f0c8e282 mononoke: fix integration tests
Summary:
Update test certificates, because they expired. Set next expiration date in 10
years.

```
stash@devvm3292
/data/users/stash/fbsource/fbcode/scm/mononoke/tests/integration
(eab3173|remote/master) $ openssl req -x509 -nodes -days 3650 -newkey rsa:2
048 -keyout testcert.key -out testcert.crt
Generating a 2048 bit RSA private key
.............+++
.....................................................................................................................+++
writing new private key to 'testcert.key'
-----
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
Country Name (2 letter code) [XX]:uk
State or Province Name (full name) []:
Locality Name (eg, city) [Default City]:
Organization Name (eg, company) [Default Company Ltd]:
Organizational Unit Name (eg, section) []:
Common Name (eg, your name or your server's hostname) []:localhost
Email Address []:
```

Also update the warning in some tests

Reviewed By: farnz

Differential Revision: D13082351

fbshipit-source-id: 8636e711e82113e692ecd146154cbe4796b33a59
2018-11-15 05:13:24 -08:00
Tim Fox
b7a8069530 verify_integrity hook
Summary: Port verify_integrity hook to Mononoke

Reviewed By: StanislavGlebik

Differential Revision: D12839290

fbshipit-source-id: a04cdb96e534ba61d359008bef3f327b1758f8ee
2018-11-13 09:37:23 -08:00
Stanislau Hlebik
ad122a6f02 mononoke: fix tests
Summary:
New debug line started to show up. Hard to track where it comes from, but let's
add it to the test.

Reviewed By: farnz

Differential Revision: D13042463

fbshipit-source-id: 0901920d127099b4f27c242df4f6c3814d701a08
2018-11-13 08:14:39 -08:00
Stanislau Hlebik
59fa2bb650 mononoke: fix test
Reviewed By: lukaspiatkowski, farnz

Differential Revision: D13024053

fbshipit-source-id: 2d7d255deed313e98895ac25933a04052b3c5276
2018-11-12 07:14:21 -08:00
Simon Farnsworth
d47b9d8aee Support configuring a repo as read-only
Summary:
As part of our read path rollout, we want to block user error from
creating new commits that will confuse blobimport. Make it possible to
configure a read-only repo

Reviewed By: StanislavGlebik

Differential Revision: D12945024

fbshipit-source-id: 4265bf57f8adac7965117b710b8285bac483b8ee
2018-11-08 04:10:09 -08:00
Anastasiya Zhyrkevich
3919c0eb4c LFS verification tool
Summary:
Purpose:
- Sha256 alias link to file_content is a required part of LFS getfiles works correct.
LFS protocol uses SHA-256 to refer to the file content. Mononoke uses Blake2.
To support LFS in Mononoke we need to set up a link from SHA-256 hash of the content to blake2 of the content.
These links are called aliases.

- Aliases are uploading together with file content blobs.
But only for new push operations.
- If repo is blobimported from somewhere, we need to make sure, that all the links are in blobstore.
If repo was blobimported before aliases were added then it may miss aliases for some blobs.
- This tool can be used to
   - find if any aliases are missing
   - fill missing aliases.

Implementation:
- Run in repo.
- Iterate through all changesets.
- Go through all the file_content blobs in the changesets
- Verify/generate alias256 links to file_content blobs.

Mode supported:
- verify, count the number of errors and print to console
- generate, if blob is missing to add it to the blobstore

Reviewed By: StanislavGlebik

Differential Revision: D10461827

fbshipit-source-id: c2673c139e2f2991081c4024db7b85953d2c5e35
2018-11-08 03:41:40 -08:00
Arun Kulshreshtha
ae7b8debd4 Remove /status endpoint
Summary: Now that Tupperware is using `/health_check`, there are no users of `/status`, so remove this endpoint.

Reviewed By: StanislavGlebik

Differential Revision: D12908785

fbshipit-source-id: be9bfae9453143a6f4b26f7fc6cbc68a3f1adc5c
2018-11-07 10:56:07 -08:00
Anastasiya Zhyrkevich
3170c13b38 retrieve host from HttpRequest headers
Summary:
Mononoke-apiserver now will parse http header in order to get "host" url.

Based on that Host url, batch request will return the link to the same host.

Requirement:
LFS protocol consists of two parts:
- "batch" request, GET request
  - HG client sends ids of the file it wants to download/upload
- API server should return valid url for downloading and uploading objects
"upload/download" request.
  - Actual upload/download of the file

This diff allows API Server to return the link to itself on "batch" request. So Hg client will go to API Server again for uploading and downloading files.

Reviewed By: kulshrax

Differential Revision: D12941635

fbshipit-source-id: e56453b0d6239daa3848c285a1df09a4a869f2c8
2018-11-07 02:56:22 -08:00
Simon Farnsworth
0e82cb3711 Advertise tree-only nature in our caps string
Summary:
We are a tree-only server; advertising this in our caps should ensure
that when we're source of truth at Facebook, anyone with pre-treemanifest
versions of Mercurial gets an insta-fail on connect, rather than a weird error
when they start exchanging data with us.

Reviewed By: HarveyHunt

Differential Revision: D12927232

fbshipit-source-id: 52c15c8a0f1842b6ca023f97228277d0fd9e8e38
2018-11-06 04:03:15 -08:00
Stanislau Hlebik
ab1c7572cd mononoke: do not panic in blobimport
Summary:
Panic is useless here. It produces huge stack trace which just contains the
main function and makes it harder to debug the actual problem.

Let's just exit in case of errors.

Reviewed By: farnz

Differential Revision: D12912198

fbshipit-source-id: 1faeacfb96765ce047a801f6b072112f10b50b7b
2018-11-03 06:16:53 -07:00
Wez Furlong
b0150038f8 mononoke: apiserver: augment /tree method with size and content sha1 fields
Summary:
This augments `/tree` to yields the size and content sha1 hash for the entries.
This is important for Eden and avoids additional round trips to the server.

The content hashing is the portion that I expect some push back on,
because it doesn't appear to be cached today and the implementation
here does a simplistic fetch and hash.  By doing this we hope to
squash out a potential later fetch of the entire contents when
buck build is run.

Differential Revision: D10865588

fbshipit-source-id: c020ef07b99d8a5e8b2f8f7b699bf15e750d60a5
2018-11-02 08:21:18 -07:00
Stanislau Hlebik
449db419c0 mononoke: move hooks
Reviewed By: farnz

Differential Revision: D10867650

fbshipit-source-id: 253c7c0bd87504430481399e7dbfbe8445f25bbd
2018-11-01 04:51:36 -07:00
Stanislau Hlebik
281e157410 mononoke: fix test-hooks.t
Reviewed By: lukaspiatkowski, HarveyHunt

Differential Revision: D12863783

fbshipit-source-id: 64b283b15b78aa999b7ca643a209cfc94e8e5377
2018-10-31 10:30:19 -07:00
Stanislau Hlebik
b37ee8bd4a mononoke: fix integration tests
Reviewed By: quark-zju

Differential Revision: D12826248

fbshipit-source-id: 87e04e2a2fb5fbfa9a754b798a39098986b6428b
2018-10-29 11:41:42 -07:00
Anastasiya Zhyrkevich
a7232825a8 new filename encoding blobimport fix on www
Summary:
Recently there was a change in core hg that changed the way we encode filenames - D9967059. However, it wasn't reflected in Mononoke blobimport code, so the job is constantly fails

This diff change the filename encoding process according to Mercurial

Encoding process is in 3 steps:
1. (Capital -> _lowercaseletter) + ( _ -> __).
If new file name is > 255, than go to step 2, otherwise exit
2. (Capital -> Capital) + (_ -> __)
if new filename is > 255, then got to step 3, otherwise exit
3. (Capitals -> Capitals) + (_ -> : )

Reviewed By: StanislavGlebik

Differential Revision: D10851634

fbshipit-source-id: 28b7503b2601729113326a18ede3e93c04572c6d
2018-10-25 07:32:53 -07:00
Anastasiya Zhyrkevich
99010fdb55 sha1 check for lfs
Summary:
On push from hg client, require sha1 check on any type of the upload

If data is provided, sha1 will be calculated from bytes [sha1 calculation place](https://fburl.com/noa99y37)
If LFSMetaData is provided, sha1 will be calculated by fetching the file from blobstore [fetching place](https://fburl.com/boj4s74f)

Reviewed By: StanislavGlebik

Differential Revision: D10509331

fbshipit-source-id: 216f59541b8adf8ab87026612e735ac1527e7cc2
2018-10-25 05:56:21 -07:00
Stanislau Hlebik
d72dff8d99 mononoke: fix tests
Summary:
1) fbamend was replaced with amend
2) Looks like test-hooks.t was printing incorrect hash

Reviewed By: lukaspiatkowski

Differential Revision: D10508709

fbshipit-source-id: fe11b2fd0f996edc92323e0b0a6882bdd71203fb
2018-10-23 11:13:31 -07:00
Harvey Hunt
cd626265bf mononoke: Display hash of commit that failed a hook
Summary:
Display the hash of the commit that didn't pass a hook,
which is a common occurrence in fbsource hooks using $HG_NODE.

I fixed up the tests, but test-hooks.t is broken from
the hg amend/fbamend fallout and also has some other issues. I tried to only add
the changes relevant to this commit.

Reviewed By: StanislavGlebik

Differential Revision: D10466395

fbshipit-source-id: dd1cdc994171a014c3d4806804ace14e85e726d4
2018-10-23 03:08:09 -07:00
Harvey Hunt
59e414668c mononoke: Rename hook tests
Summary: Rename hook tests to be consistent

Reviewed By: StanislavGlebik

Differential Revision: D10466396

fbshipit-source-id: 85da5938d59e1bd2b20f164b679ca44fdf7f0cf3
2018-10-23 02:46:41 -07:00
Anastasiya Zhyrkevich
262c4b8cfa lfs-url as a separate command line argument
Summary:
Background:
According to [git lfs protocol](https://github.com/git-lfs/git-lfs/blob/master/docs/api/batch.md) HTTP POST "batch" request should return a link to
the look-aside server.

In our case Mononoke API server is a look-aside server, and process both "batch" request and "upload/download" requests.

So it need to return a link to itself.

New approach requests a separate lfs-url for "batch" request.

The previous approach requested attributes --http-host and --http-port to make a link to the instance of API server running.

Reviewed By: StanislavGlebik

Differential Revision: D10488586

fbshipit-source-id: ed9d78ee9bc78bdcec5eea813bd9aaa6e4590a5c
2018-10-22 09:11:16 -07:00
Anastasiya Zhyrkevich
e82dcdbc15 add new health check request
Summary:
For unification with commit cloud vip configuration apiserver should support the same health check api
Request needed for corp2prod

The same as : D10488369

Reviewed By: liubov-dmitrieva

Differential Revision: D10488494

fbshipit-source-id: 50b4024295c596342a8080474383de850bb7754a
2018-10-22 08:12:00 -07:00
Stanislau Hlebik
6cb08f46ef mononoke: limit_filesize hook
Reviewed By: farnz

Differential Revision: D10361931

fbshipit-source-id: 2d2ca13a3f021cbf05d85dc9898a3d797037d085
2018-10-22 05:22:20 -07:00
Lukas Piatkowski
bf6c409298 hooks: add no_buck_managed_project_files
Reviewed By: StanislavGlebik

Differential Revision: D10452623

fbshipit-source-id: 053b9914e43b2842086ce76c1ad799a34e130643
2018-10-19 17:51:17 -07:00
Stanislau Hlebik
bba987bf19 mononoke: fix conflict_markers hook
Summary:
It was broken because it only matched conflict markers that were on the first
line. This diff fixes it by splitting the file content by \n first

Reviewed By: farnz

Differential Revision: D10447393

fbshipit-source-id: a2091f6bc43e8bb9a77c63536e749432d524bbff
2018-10-19 02:41:22 -07:00
Michael Bolin
82e2435704 Port gitattributes-textdirectives hook to Mononoke
Summary:
This hook is designed to prevent text directives in .gitattributes
from making it into the repo.

As noted in the integration test, our regex may be too loose,
but it's probably OK, in practice.

For better or worse, for now, we're just trying to maintain the
behavior of the existing hook (though perhaps the existing hook
would have been a bit stricter if it wren't written in Bash).

For easy reference, here are the Git docs on gitattributes:
https://git-scm.com/docs/gitattributes/

Reviewed By: StanislavGlebik

Differential Revision: D10387336

fbshipit-source-id: c58f689ecc0648c2cc359a818c92d701258e8f46
2018-10-19 00:50:00 -07:00
Simon Farnsworth
2d3bc65e05 Add a deny_files hook, like the one in Mercurial
Summary:
We want to deny landing files whose path contains magic strings. Add a
hook to do this, with some predefined examples of how to write patterns

Reviewed By: StanislavGlebik

Differential Revision: D10446531

fbshipit-source-id: 67f1a712d923345288c8d0a4f3e5da1e8f4e29f8
2018-10-18 13:32:00 -07:00
Tim Fox
880dd6b125 Add tp2_symlinks_only hook
Summary: ${title}

Reviewed By: StanislavGlebik

Differential Revision: D10423277

fbshipit-source-id: 3246530b6e1011e4d21fa2c088b51b73174368fb
2018-10-17 07:23:19 -07:00
Anastasiya Zhyrkevich
d2a4f4e042 getfiles, config lfs threshold
Summary:
getfiles implementation for lfs

The implementation is the following:
- get file size from file envelope  (retrieve from manifold by HgNodeId)
- if file size > threshold from lfs config
   - fetch file to memory, get sha256 of the file, will be fixed later, as this approach consumes a lot of memory, but we don't have any mapping from sha256 - blake2 [T35239107](https://our.intern.facebook.com/intern/tasks/?t=35239107)
   - generate lfs metadata file according to [LfsPlan](https://www.mercurial-scm.org/wiki/LfsPlan)
   - set metakeyflag (REVID_STORED_EXT) in the file header
- if file size < threshold, process usual way

Reviewed By: StanislavGlebik

Differential Revision: D10335988

fbshipit-source-id: 6a1ba671bae46159bcc16613f99a0e21cf3b5e3a
2018-10-17 02:20:06 -07:00
Anastasiya Zhyrkevich
885960087e LFS push: processing files in metadata format from hg client
Summary:
According to [Mercurial Lfs Plan](https://www.mercurial-scm.org/wiki/LfsPlan), on push, for files which size is above the threshold (lfs.threshold config) hg client is sending LFS metadata instead of actual files contents. The main part of LFS metadata is SHA-256 of the file content (oid).

The format requires the following mandatory fields: version, oid, size.

When lfs metadata is sent instead of a real file content then lfs_ext_stored flag is in the request's revflags.
If this flag is set, We are ignoring sha-1 hash verification inconsistency.
Later check that the content is actually loaded to the blobstore and create filenode envelope from it, load the envelope to the blobstore.

Filenode envelope requires the following info:
- size - retrieved on fetching the actual data from blobstore.
- copy_from - retrieved from the file, sent by hg client.

Mononoke still does the same checks for LFS push as for non-lfs push (i.e. checks that all the necessary manifests/filelogs were uploaded by a client)

Reviewed By: StanislavGlebik

Differential Revision: D10255314

fbshipit-source-id: efc8dac4c9f6d6f9eb3275d21b7b0cbfd354a736
2018-10-16 04:24:20 -07:00
Anastasiya Zhyrkevich
629a272a00 apiserver test fix for different http versions
Summary:
Fix apiserver output for different HTTP/*
Caused by adding new rust crates for http2

Connected to constant test failing
https://our.intern.facebook.com/intern/testinfra/testconsole/testrun/1125899967685079/

Reviewed By: kulshrax

Differential Revision: D10379812

fbshipit-source-id: 7200242bb0f1a96e4f6bec0b3c714005a28a77ec
2018-10-15 09:37:36 -07:00
Tim Fox
11d3616891 block_cross_repo_commits hook
Summary: Implement $title

Reviewed By: farnz

Differential Revision: D10378242

fbshipit-source-id: b6ca253b32a77e0b63c84dc5c16698cc69cd4713
2018-10-15 04:25:51 -07:00
Lowik Chanussot
33c25691f3 Make ManifestMissing error accept HgManifestId
Summary:
- ManifestMissing accepts HgManifestId instead of HgNodeHash
- Update calls to ManifestMissing
- Update unit test accordingly

Reviewed By: StanislavGlebik

Differential Revision: D10337392

fbshipit-source-id: b70ac6381043cbf64ec7cdafbf338c2af1e00076
2018-10-11 14:20:42 -07:00
Stanislau Hlebik
b298a691ca mononoke: fix changed file calculation
Summary:
One brainless idiot decided to prune all trees from changed files calcualation.
Since it also prunes subtrees, that leaves with just files in the root
directory.

Reviewed By: lukaspiatkowski

Differential Revision: D10302299

fbshipit-source-id: 8fe2c4ad8de998dfd4083d97cd816d85b5fec604
2018-10-11 05:50:48 -07:00
Stanislau Hlebik
382c1e8d31 mononoke: conflict_markers hook
Summary:
Hooks that makes sure that there are no conflict markers in file contents.
This hook is bypassable.

Reviewed By: purplefox

Differential Revision: D10260230

fbshipit-source-id: b9d69e757f18ed3f4f889a01032ef7360cba6867
2018-10-11 05:50:48 -07:00
Stanislau Hlebik
d5a8790a56 mononoke: slightly better printing of hook failures
Summary: Not a final version for sure, just a small improvement

Reviewed By: lukaspiatkowski

Differential Revision: D10260231

fbshipit-source-id: 9f9f61f23da5ac9a5d1abc9ad2f50900ca434326
2018-10-11 05:50:48 -07:00
Stanislau Hlebik
a79d9d4a25 mononoke: add pushvars bypasses
Summary: Pushvars is a one more way to bypass hooks. This diff implements it

Reviewed By: purplefox

Differential Revision: D10257602

fbshipit-source-id: 1bd188239878ff917ded7db995ea2453da9f64c4
2018-10-11 05:50:48 -07:00
Stanislau Hlebik
ceba87afec mononoke: add commit message bypasses
Summary:
Let's add a logic to allow users to bypass hooks.

We'll have two ways to bypass hooks. One is via a string in commit message,
another is via pushvars.
This diff implements the first one.

Reviewed By: purplefox

Differential Revision: D10255378

fbshipit-source-id: 31e803a58e2f4798294f7c807933c8e26de3cfaf
2018-10-11 05:50:47 -07:00
Stanislau Hlebik
f9cdae09c6 mononoke: replace PerFile hook with PerAddedOrModified
Summary:
That's a bit controversial, however I think it's worth it. Many file hooks
should be run only on files that exist in the repo (for example,
https://fburl.com/1cj8wm3p, https://fburl.com/t06fjwak). If you want to do
anything on deleted files then just write a changeset hook.

Reviewed By: jsgf

Differential Revision: D10239186

fbshipit-source-id: 3cb563b81ec51298623cecaf976b5a8fe50dc71c
2018-10-09 02:05:55 -07:00
Anastasiya Zhyrkevich
c4f7fae0bb LFS test from hg client to Mononoke server, with large files through
Summary:
Test is failing, as Mononoke server lfs support is not implemented yet.
Integration test for commands from hg client to Mononoke server.

\s(re) lines are added as after auto-save, the test script is formatted, and delete spaces at the empty lines.
In order to keep such lines, \s(re) could be added
In comparison of such line, pattern \s(re) is deleted and not compared.
See to mononoke/tests/integration/third_party/hg_run_tests.py for more information about comparison of the output lines.

Reviewed By: StanislavGlebik

Differential Revision: D10089289

fbshipit-source-id: 2962e80d919c21801d08990be190f2574c48646d
2018-10-08 16:05:59 -07:00
Stanislau Hlebik
c3b5ee6854 mononoke: add (re) for lines ending with whitespace in integration tests
Summary:
Many editors remove trailing whitespaces on save. That makes modifying these
files annoying. Adding ` (re)` mitigates the issue

Reviewed By: farnz

Differential Revision: D10237590

fbshipit-source-id: 1473f35023b878f21ff22bd5a5ccb5f11884cef3
2018-10-08 09:06:26 -07:00
Simon Farnsworth
6e2455a12e Hook up (untested) support for streaming clones
Summary:
We now have a way for a MySQL database to tell us how to send
streaming clones to the client. Hook it all up, so that (with any luck), once
we have data in MySQL and the blobstore, we'll see working streaming clones.

Reviewed By: StanislavGlebik

Differential Revision: D10130774

fbshipit-source-id: b22ffb642d0a54b09545889779f79e7a0f81acd7
2018-10-04 11:37:46 -07:00
Stanislau Hlebik
836414034d mononoke: speed up integration tests
Summary: cachelib takes a lot of times to init, and it's not used in the tests.

Reviewed By: farnz

Differential Revision: D10123692

fbshipit-source-id: bce82af3f56aa8829127bf4c605a1d472735126a
2018-10-01 03:38:19 -07:00
Stanislau Hlebik
d924fc849d mononoke: print error message in tests if blobimport fails in tests
Summary:
It makes it clear why blobimport failed. Before it required modification to the
tests to run `cat FILENAME`, now it's done automatically

Reviewed By: farnz

Differential Revision: D9850279

fbshipit-source-id: b9a252f50b6dcf4906c24aca70fa37a2cec84e46
2018-10-01 03:38:19 -07:00
Stanislau Hlebik
54b1af68e4 mononoke: fix integration tests
Summary: Because of D9926967

Reviewed By: farnz

Differential Revision: D10108576

fbshipit-source-id: 6fa68db1f955bc8edfd12da0e7924f51ae8a9513
2018-09-28 11:06:56 -07:00
Anastasiya Zhyrkevich
0f6bba1de0 PUT request upload to mononoke API
Summary:
PUT request upload to mononoke API
hg client sends a PUT request to store a file into blobstore during push supporting LFS

Upload file by alias is divied into 2 parts:
- Put alias : blobstore key
- Put blobstore_key: contents

Keep in mind, that file content is thrift encoded

host_address for batch request is from command line flags -H for host, -p for port

Reviewed By: StanislavGlebik

Differential Revision: D10026683

fbshipit-source-id: 6c2726c7fee2fb171582bdcf7ce86b22b0130660
2018-09-27 11:20:46 -07:00