Commit Graph

10 Commits

Author SHA1 Message Date
Pavel Aslanov
a257f82f7c remove some extern crates and #[macro_use]
Summary:
Convert to `2018` version and remove `#[macro_use]` and `extern crate` from following folders:
- blobrepo
- blobstore
- mercurial_types
- mononoke_types

Reviewed By: StanislavGlebik

Differential Revision: D14827294

fbshipit-source-id: 4b8a2edb5d9ad1fe75083e172cd0da359fa6dc2e
2019-05-21 12:25:03 -07:00
Stanislau Hlebik
eb67262de4 mononoke: return HgEntryId in find_path_in_manifest
Summary:
It's cheap so let's return it. It will be used in the next diffs

Context:
There are some commit cloud commits that take ages to compute. For some reason
commit cloud sends too many manifests, which mononoke doesn't filter out and
does a lot of unnecessary checks, which take ages. This stack fixes it.

Reviewed By: farnz

Differential Revision: D14666306

fbshipit-source-id: 75e39f7d88e139f3558825faec5d4e94f6987050
2019-05-21 12:24:57 -07:00
Arun Kulshreshtha
cb1ef172ff Add batch data fetching endpoints for Eden API
Summary: Add new API server endpoints for performing batch fetches of data and history. The requests and responses are currently serialized as JSON, though the format can be trivially changed later to something like CBOR (or any other format supported by serde).

Reviewed By: xavierd

Differential Revision: D14573735

fbshipit-source-id: ac46aa8a55db44b695c53f9e32cc4ea2e17504c8
2019-05-21 12:24:56 -07:00
Stanislau Hlebik
34e77e6d94 mononoke: append metadata in getpackv1
Summary:
getpackv1 needs to return copy metadata together with the content. This diff
fixes it

Reviewed By: kulshrax

Differential Revision: D14668319

fbshipit-source-id: 56a6ea2eb3a116433446773fa4fbe1f5a66c5746
2019-05-21 12:24:53 -07:00
Laurence Emms
491abcd4a8 Removed HgNodeHash from known()/lookup()/heads()/between() methods in
Summary:
Removed references to HgNodeHash in repo_client in the specified functions. In
addition, updated other files due to type related dependencies.

Reviewed By: StanislavGlebik

Differential Revision: D14543934

fbshipit-source-id: b0d860fe7085ed4b91a62ab1e27fb2907a642a1d
2019-05-21 12:24:52 -07:00
Arun Kulshreshtha
4e019aff10 types: rename LooseHistoryEntry and PackHistoryEntry
Summary: `LooseHistoryEntry` and `PackHistoryEntry` aren't the best names for these types, since the latter is what most users should use, whereas the former should only typically used for data transmission. As such, we should rename these to clarify the intent.

Differential Revision: D14512749

fbshipit-source-id: 5293df89766825077b2ba07224297b958bf46002
2019-03-18 19:49:12 -07:00
Stanislau Hlebik
2e7a787a11 mononoke: handle getpackv1 request on Mononkoe
Summary:
The diff adds support for getpackv1 request. Supporting this request is
necessary because hg client will stop using getfiles soon.

There are two main differences between getfiles and getpackv1. getfiles returns
loose files formats, while getpackv1 returns wirepack pack file (same format as
used by gettreepack). getpackv1 supports fetching more than one filenode per
file.

Differential Revision: D14404234

fbshipit-source-id: cfaef6a2ebb76da2df68c05e838d89690f56a9f0
2019-03-15 11:52:38 -07:00
Igor Abramov
a70e6d30c6 mononoke: remove HgNodeHash from hook_tailer
Summary: Replacing the usage of deprecated HgNodeHash with HgChangesetId.

Reviewed By: StanislavGlebik

Differential Revision: D14455700

fbshipit-source-id: 326f6b3bcea67062769093c037306f9a21bbbfa4
2019-03-14 14:22:08 -07:00
Stanislau Hlebik
e6c8ef00aa mononoke: fix computing of changed files
Summary:
The problem was in using `file_changes()` of a bonsai object. If a file
replaces a directory, then it just returns an added file, but not a removed
directory.

However `changed_entry_stream` didn't return an entry if just it's mode was changed (i.e. file became executable, or file became a symlink). This diff fixes it as well

Let's use the same computing changing files method instead of `file_changes()`.

Differential Revision: D14279470

fbshipit-source-id: 976b0abd93646f7d68137c83cb07a8564922ce17
2019-03-08 06:28:49 -08:00
Kostia Balytskyi
e561682ecd mononoke: rename crates to contain underscores instead of dashes
Summary: Let's not use dashes in crate names.

Reviewed By: StanislavGlebik

Differential Revision: D14341596

fbshipit-source-id: 85a7ded60cf2e326997ac70ee47a29116af97590
2019-03-06 07:18:28 -08:00