sapling/eden/mononoke
Thomas Orozco 41216b7530 mononoke/fastreplay: handle JSON-encoded strings in command args
Summary:
If we e.g. a getpack for path like "foo\"bar", then we can't decode it into a
`&str` because we need to allocate a new `String` to hold it. At the same time,
if the path is "foo bar", then having a reference into the JSON we received is
nicer.

Right now, we expect a `&str`, so the latter case. But, if we find command args
from the first case, we can't deserialize them. To fix this, let's use
`Cow<...>`, which lets us either have a referenced or an owned string.

Also, let's add tests to confirm this works.

Reviewed By: ikostia

Differential Revision: D19767689

fbshipit-source-id: bf9e06d4a885638073c819a25a68810ff44f2546
2020-02-07 01:26:19 -08:00
..
apiserver mononoke: add x_repo_lookup to scsc 2020-02-06 07:26:14 -08:00
benchmark mononoke: move the codebase under eden/ directory 2020-02-06 13:46:04 +01:00
blobimport_lib/src mononoke: move the codebase under eden/ directory 2020-02-06 13:46:04 +01:00
blobrepo blobrepo: don't fetch Hg Changeset IDs sequentially 2020-02-06 12:11:22 -08:00
blobrepo_utils mononoke: move the codebase under eden/ directory 2020-02-06 13:46:04 +01:00
blobstore mononoke/multiplexedblob: make sampling rate configurable 2020-02-06 12:08:43 -08:00
blobstore_sync_queue mononoke: move the codebase under eden/ directory 2020-02-06 13:46:04 +01:00
bonsai_globalrev_mapping mononoke: move the codebase under eden/ directory 2020-02-06 13:46:04 +01:00
bonsai_hg_mapping mononoke: move the codebase under eden/ directory 2020-02-06 13:46:04 +01:00
bookmarks mononoke: move the codebase under eden/ directory 2020-02-06 13:46:04 +01:00
cache_warmup/src mononoke: move the codebase under eden/ directory 2020-02-06 13:46:04 +01:00
changesets mononoke: move the codebase under eden/ directory 2020-02-06 13:46:04 +01:00
cmdlib mononoke: commit sync thrift api 2020-02-06 07:26:14 -08:00
cmds mononoke: move the codebase under eden/ directory 2020-02-06 13:46:04 +01:00
commit_rewriting mononoke: remove compat() methods 2020-02-06 08:00:16 -08:00
common mononoke: move the codebase under eden/ directory 2020-02-06 13:46:04 +01:00
derived_data mononoke: move the codebase under eden/ directory 2020-02-06 13:46:04 +01:00
edenapi_server/src mononoke: move the codebase under eden/ directory 2020-02-06 13:46:04 +01:00
fastreplay/src mononoke/fastreplay: handle JSON-encoded strings in command args 2020-02-07 01:26:19 -08:00
filenodes mononoke: move the codebase under eden/ directory 2020-02-06 13:46:04 +01:00
filestore/src mononoke: move the codebase under eden/ directory 2020-02-06 13:46:04 +01:00
git mononoke: move the codebase under eden/ directory 2020-02-06 13:46:04 +01:00
gotham_ext/src mononoke: move the codebase under eden/ directory 2020-02-06 13:46:04 +01:00
hgcli mononoke: move the codebase under eden/ directory 2020-02-06 13:46:04 +01:00
hgproto mononoke: move the codebase under eden/ directory 2020-02-06 13:46:04 +01:00
hook_tailer mononoke: move the codebase under eden/ directory 2020-02-06 13:46:04 +01:00
hooks mononoke: move the codebase under eden/ directory 2020-02-06 13:46:04 +01:00
lfs_import_lib/src mononoke: move the codebase under eden/ directory 2020-02-06 13:46:04 +01:00
lfs_protocol/src mononoke: move the codebase under eden/ directory 2020-02-06 13:46:04 +01:00
lfs_server/src mononoke: move the codebase under eden/ directory 2020-02-06 13:46:04 +01:00
manifest mononoke: move the codebase under eden/ directory 2020-02-06 13:46:04 +01:00
mercurial Short hashes lookup: implement suggestions the same way as in Mercurial. 2020-02-06 07:43:51 -08:00
metaconfig mononoke/multiplexedblob: make sampling rate configurable 2020-02-06 12:08:43 -08:00
mononoke_api/src mononoke_api: requests for blame information for rejected blames are a request error 2020-02-06 08:33:59 -08:00
mononoke_types mononoke: move the codebase under eden/ directory 2020-02-06 13:46:04 +01:00
phases mononoke: move the codebase under eden/ directory 2020-02-06 13:46:04 +01:00
pushrebase/src mononoke: move the codebase under eden/ directory 2020-02-06 13:46:04 +01:00
reachabilityindex mononoke: move the codebase under eden/ directory 2020-02-06 13:46:04 +01:00
repo_client getbundle_response: don't fetch Hg Changeset IDs sequentially 2020-02-06 12:11:21 -08:00
revset mononoke: move the codebase under eden/ directory 2020-02-06 13:46:04 +01:00
scs_server/src scs_server: remove compat around Mononoke::new 2020-02-06 09:14:05 -08:00
segmented_changelog/src mononoke: move the codebase under eden/ directory 2020-02-06 13:46:04 +01:00
server mononoke: move the codebase under eden/ directory 2020-02-06 13:46:04 +01:00
sshrelay mononoke: move the codebase under eden/ directory 2020-02-06 13:46:04 +01:00
tests Short hashes lookup: implement suggestions the same way as in Mercurial. 2020-02-06 07:43:51 -08:00
walker/src mononoke/multiplexedblob: make sampling rate configurable 2020-02-06 12:08:43 -08:00