Summary:
I'm not sure why but D14405696 added this `is_ancestor` method with a
duplicate ancestry check implementation which:
* has different behaviour when `ancestor == descendant`
* doesn't log to ODS
Let's just settle on using one implementation now.
Reviewed By: StanislavGlebik
Differential Revision: D21937312
fbshipit-source-id: 0f4e2390cb0b984f92cd4fe645d9313fa4bba70e
Summary: incremental step on the path to modernization of this module
Reviewed By: StanislavGlebik
Differential Revision: D21937311
fbshipit-source-id: 9db84c7cb166084edfc5a0638c1c884964f9984c
Summary: incremental step on the path to modernization of this module
Reviewed By: StanislavGlebik
Differential Revision: D21937309
fbshipit-source-id: 61b1b4302782cea35d3f65e6fe982f530293dd81
Summary:
This will let us serialize and deserialize thrift structures from
non-thrift sources. In my particular case I'll be using it to deserialize json
into hg client config thrift structures that are shared with the backend.
Reviewed By: quark-zju
Differential Revision: D21875371
fbshipit-source-id: 6a85f28e69f2eeb375f6639ed1dcd3c1cd957d99
Summary: The intention of this parameter was to produce human-readable JSON for tests and for manual debugging. In practice, given that the JSON response here is just a (typically short) list, there isn't really much value in prettifying. We weren't using this anyway, so let's remove it to simplify the code.
Reviewed By: xavierd
Differential Revision: D22020784
fbshipit-source-id: 09290cc667cfdb194693e6c05858af2f8905f88e
Summary: Add wrapper functions around `data::data` for files and trees. The intention is to make the code more easily searchable, and also to establish a consistent naming pattern across all the handler functions.
Reviewed By: xavierd
Differential Revision: D22020783
fbshipit-source-id: 5e7c63ff8f366b0c6aa4412d5d04d17ca6cbc6b9
Summary: Reduce the amount of repeated code in the handlers module by defining a macro to wrap async handler functions.
Reviewed By: krallin
Differential Revision: D22015557
fbshipit-source-id: 276dad4112e7019f8d5f5fa74243747a0104e1ca
Summary:
The anyhow error contains the context for the error which will lead to better
error message for the user (and us). What the code previously did was simply
using the Debug trait to print the error, and thus was missing context.
Reviewed By: DurhamG
Differential Revision: D21985745
fbshipit-source-id: 31c603d7f42e79a360541f39e4aaf0fcfbb9a14f
Summary: This diff passes a callback function `progressCallback` from `EdenServer` to make `OverlayChekcer` print fsck messages to stdout.
Reviewed By: fanzeyi
Differential Revision: D21966060
fbshipit-source-id: 317b2c8954c718b51b5295c9f8d7698eb203906e
Summary: Add an `errors` module containing an `ErrorKind` implemented via `thiserror`. All errors in the server's HTTP handles been annotated with an appropriate `ErrorKind` via `anyhow::Context`. Notably, there is specialized handling of `MononokeError`s from the `mononoke_api` crate via a new `MononokeErrorExt` trait.
Reviewed By: krallin
Differential Revision: D22012237
fbshipit-source-id: 5f6948696e4741816636f1c6fee12069ee1a4b32
Summary:
Add trait bounds to ensure that implementors of these trait can be
safely used across threads. This is particularly useful when using these traits
in generic async code -- async code typically requires these trait bounds on
data captured in combinator closures, etc.
Reviewed By: krallin
Differential Revision: D22008466
fbshipit-source-id: 48eac59ca62debc9bd293261f6079a4fa134f331
Summary: Move the `util` module out of `handlers` and split it up into multiple submodules.
Reviewed By: krallin
Differential Revision: D22008148
fbshipit-source-id: 11b286fdef8f9d93fcc10a283ec1b2f42e9c8c04
Summary:
Note: Although this diff looks big, it's all just cutting and pasting code.
Restructure the crate so that the types relevant to each EdenAPI endpoint are grouped in their own module. This means that authors of new endpoints can just add a new module and put their types there, rather than having to make edits throughout the crate.
Reviewed By: quark-zju
Differential Revision: D21983470
fbshipit-source-id: 4901662dc6b5f0a1feca1ab8d914f394114ef233
Summary: Change `HistoryResponse` so that instead of repeatedly sending the file path alongside every history entry, we group the history entries by file and send the path once per group. This will prevent the server from transmitting redundant information.
Reviewed By: quark-zju
Differential Revision: D21982558
fbshipit-source-id: f1c5d2573c97940c7bf1645ed7fef6e1887c0d42
Summary:
This is consistent with what is being done for now in hg for tests that haven't been migrated
to modern configurations yet, and ensures we get stable commit hashes in our tests: D21899139. It's already explicitly turned on on tests that want it.
In the future, this should probably be updated to use "modern configs" like the
Mercurial tests do.
Reviewed By: ikostia
Differential Revision: D22016705
fbshipit-source-id: b27f6423bf4ec5244ef3ce2e7676306165a331a8
Summary: This message is gone we shouldn't expect it anymore: D21913608
Reviewed By: ikostia
Differential Revision: D22016684
fbshipit-source-id: 97d86e9750e775c1bb3a1e75939f506cd35851c0
Summary:
This test broke when this got turned on for all tests (D21899139). It's not
enabled for other commit cloud tests there, so let's be consistent.
Reviewed By: ikostia
Differential Revision: D22016686
fbshipit-source-id: 5f4385b60fd31c89e335e971f262da1226f32254
Summary:
In the Mononoke integration tests (which are .t tests), we've started seeing
this waring show up.
We probably shouldn't have mutation enabled for most of those tests anyway
(save for the tests that actually exercise mutation), so I'm turning that off.
That said, we'd still see the warning. So, this diff refactors mutation a
little bit to only warn if we do have something to send to the server.
Reviewed By: ikostia
Differential Revision: D22016685
fbshipit-source-id: e9e8dbcc44a0fa048dca3ca7ce0961631058a2d6
Summary: Last usage was removed in D20342689.
Reviewed By: xavierd
Differential Revision: D22011195
fbshipit-source-id: 58455ad3dc77438704e80c69eb728a319ee71a39
Summary: In its current state, FORCE is a restart mode that cannot be combined with other modes (specifically `graceful`). Removing this coupling from `force` will allow us to at first attempt a graceful restart, but if the daemon is not healthy, then do a force restart, all within one call.
Reviewed By: wez
Differential Revision: D21873166
fbshipit-source-id: 079a777ff6e7b219198cbef15335244b9865f5f3
Summary:
Move the LFS server's `StreamBody` into `gotham_ext`, along with some changes to decouple it from the LFS server.
In particular, the `Content-Length` header and post-request `Sender` have been made optional fields that can be set via a builder-style interface. The LFS server's `StreamBody` has been renamed to `LfsStreamBody` and is now a thin wrapper around `gotham_ext`'s `StreamBody` that preserves the old behavior.
Reviewed By: krallin
Differential Revision: D21988855
fbshipit-source-id: a9bf9c04bb791388d761fc705ebc38472a713b65
Summary: I would like to use these utilities when building segmented changelog.
Reviewed By: krallin
Differential Revision: D21876432
fbshipit-source-id: 9022627e224bfcb155b47d696371d24e538e6f39
Summary:
Useful for keeping the insert logic working nicely even when we double insert
or have other inconsistencies.
Reviewed By: krallin
Differential Revision: D21853048
fbshipit-source-id: 958cbc0435f330749c5aae1ea0f41ecd03b01468
Summary:
If the caller provides a service identity in `repo_create_commit`, use that to obtain
write access to the repository.
Reviewed By: StanislavGlebik
Differential Revision: D21995724
fbshipit-source-id: ba218e392b979938d598a37494b0ffe496f28722
Summary: Now that apiserver is gone, we can remove the legacy parts of mononoke_api.
Reviewed By: krallin
Differential Revision: D21976615
fbshipit-source-id: 139d7ebd4a7185693f6a4fe4e5c234c143f18498
Summary:
Add the `move_bookmark` method to `mononoke_api`.
This attempts to re-use code from `repo_client`. This code isn't really designed to be called from this API, so the fit is very poor. In a future diff we will fix this up.
The `repo_client` code for force-moving a bookmark does not support running hooks for that bookmark. For now we will prevent API users from moving bookmarks that have hooks configured. This will also be addressed in a future diff.
Reviewed By: krallin
Differential Revision: D21904979
fbshipit-source-id: 42bf840489e5b04f463c69c752bcaa5174630c21
Summary:
There is no need to migrate if the obsstore is a proxy to the mutation store.
This avoids a crash reading the attribute `_all`.
Reviewed By: DurhamG
Differential Revision: D21999245
fbshipit-source-id: bfa6439982834c6835412fc175132526525af548
Summary: The test breaks, let's not enable mutation for it.
Reviewed By: DurhamG
Differential Revision: D21998151
fbshipit-source-id: 9c06485287d906837444f39faf90886933decc9b
Summary:
Some of the hg changeset structures use `comments` as the name for commit
message. But this is confusing - let's rename
Reviewed By: HarveyHunt
Differential Revision: D21974571
fbshipit-source-id: e7c5c5ad8db9b2f1343abe9101fc56a6d4287548
Summary:
Unawaited coroutines are pernicious and not errors by default. In
advance of enabling asynchronous tests, fail our tests when Python
warnings are shown.
We record warnings and report them after the test body instead of
enabling an "error" warning filter because exceptions thrown by
finalizers are silently swallowed, and most important warnings occur
during finalization.
Reviewed By: genevievehelsel
Differential Revision: D21955210
fbshipit-source-id: b1fc52ddfa9f9befbde6800f85f090862af0ef15
Summary:
The remotenames extension was enabled everywhere in production. It is
unsupported if remotenames is disabled.
Ideally the cpp tests should use the in-repo configuration instead of
maintaining its own hardcoded hgrc. For now I just did the minimal change to
unblock tests.
Reviewed By: fanzeyi
Differential Revision: D21986274
fbshipit-source-id: b632da074baf4026f331381ae8f2f8479a34e1b3
Summary:
When kicking off the background process, we were depending on the
current working directory being inside the repo. This is not always true, like
when the current command was invoked like `hg -R xxx log -r .`. Let's invoke the
debugdynamicconfig command with the explicit path.
Reviewed By: quark-zju
Differential Revision: D21983297
fbshipit-source-id: 72981ea596e62dced3918f2fc6272953ab3d84cd
Summary:
Treemanifest was recently enabled in this test, but it breaks the Windows
tests. For now, let's just go back to the previous state and we can investigate
later.
Differential Revision: D21989349
fbshipit-source-id: fb3d3d1315400f56a6166a01112affc0a4d96da6
Summary:
Somehow clone-dst isn't empty which makes the second clone to fail due to it,
let's just clone it elsewhere.
Differential Revision: D21989189
fbshipit-source-id: 125f33f3f498d0c089785018e39ee7c5b795b472
Summary: Those tests only need minor changes to be compatible with mutation.
Reviewed By: sfilipco
Differential Revision: D21913606
fbshipit-source-id: 0a2b0e08cb558960a7d0f938300f375c34457a62