sapling/eden/mononoke
Kostia Balytskyi 2035a34a0e commit_rewriting: do not create accidental Preserved syncs
Summary:
Our higher-level goal is to get rid of `CommitSyncOutcome::Preserved` altogether. This diff is a step in that direction. Specifically, this diff removes the creation of "accidental" Preserved commits: the ones where the hashes are identical, although a `Mover` of some version have been applied. There are a few sides to this fix:
- `get_commit_sync_outcome` now returns `Preserved` only when the source and target hashes are identical, plus stored version is `None` (previously it would only look at hashes).
- `sync_commit_no_parents` now records the `Mover` version it used to rewrite the commit (previously it did not, which would sometimes create `Preserved` roots)
- there are now just two ways to sync commits as `Preserved`:
  - `unsafe_preserve_commit` (when the caller explicitly asks for it). The idea is to only remove it once we remove the callers of this methods, of course.
  - `sync_commit_single_parent` when the parent is also `Preserved`. Note that automatically upgrading from `Preserved` parent to a rewritten changeset is incorrect for now: `Preserved` does not have an associated version by definition, so we would have to use a current version, which may corrupt the repo. Once we get rid of `Preserved`, this case will naturally go away.
- as we now have `update_mapping_with_version` and `update_mapping` (which consumes current version), we need to add explicit `update_mapping_no_version` for preserved commits we are still creating (again, recording a current version is a mistake here, same reason as above)

NB: I've added/changed a bunch of `println`s in tests, leaving them here, as they are genuinely useful IMO and not harmful.

Reviewed By: StanislavGlebik

Differential Revision: D24142837

fbshipit-source-id: 2153d3c5cc406b3410eadbdfca370f79d01471f9
2020-10-08 02:43:19 -07:00
..
benchmark mononoke: update Memblob::new callsites to ::default() 2020-10-07 12:11:10 -07:00
blobimport_lib Update formatter to rustfmt 2.0 2020-09-09 07:52:33 -07:00
blobrepo mononoke: update Memblob::new callsites to ::default() 2020-10-07 12:11:10 -07:00
blobrepo_utils move existing changeset derivation logic to mercurial_derived_data 2020-09-09 07:56:32 -07:00
blobstore mononoke: implement BlobstorePutOps for S3Blob 2020-10-07 12:11:11 -07:00
blobstore_sync_queue commit_rewriting: use is_empty() where possible 2020-10-04 10:03:42 -07:00
bonsai_git_mapping improve error messages for mapping length errors 2020-09-21 08:39:12 -07:00
bonsai_globalrev_mapping improve error messages for mapping length errors 2020-09-21 08:39:12 -07:00
bonsai_hg_mapping Update formatter to rustfmt 2.0 2020-09-09 07:52:33 -07:00
bookmarks bookmarks_movement: add pushvars for delete_bookmark 2020-10-07 07:09:39 -07:00
bulkops Regenerate all Cargo.tomls after upgrade to futures 0.3.5 2020-07-06 20:49:43 -07:00
cache_warmup Regenerate all Cargo.tomls after upgrade to futures 0.3.5 2020-07-06 20:49:43 -07:00
changesets Update formatter to rustfmt 2.0 2020-09-09 07:52:33 -07:00
cmdlib mononoke: add put behaviour to BlobstoreOptions 2020-10-07 12:11:10 -07:00
cmds mononoke: update Memblob::new callsites to ::default() 2020-10-07 12:11:10 -07:00
commit_rewriting commit_rewriting: do not create accidental Preserved syncs 2020-10-08 02:43:19 -07:00
common add variant of bounded_traversal_stream which accepts children in the form of a stream 2020-10-07 03:38:28 -07:00
derived_data mononoke: remove get_fsnode_id 2020-09-18 02:52:47 -07:00
edenapi_server edenapi_server: log client username to scuba 2020-10-07 08:17:59 -07:00
fastreplay mononoke: deprecate preamble in favor of metadata 2020-09-15 10:28:38 -07:00
filenodes Remove crate_root from Rust dependency info 2020-08-31 14:43:24 -07:00
filestore mononoke: update Memblob::new callsites to ::default() 2020-10-07 12:11:10 -07:00
git move existing changeset derivation logic to mercurial_derived_data 2020-09-09 07:56:32 -07:00
gotham_ext gotham_ext: add method to get username from client identity 2020-10-07 08:17:59 -07:00
hgcli mononoke/hgcli: log hgcli server data to Scuba 2020-10-01 05:22:47 -07:00
hgproto commit_rewriting: use is_empty() where possible 2020-10-04 10:03:42 -07:00
hook_tailer move interngraph token from disk to keychain service 2020-10-02 06:56:49 -07:00
hooks commit_rewriting: use is_empty() where possible 2020-10-04 10:03:42 -07:00
lfs_import_lib autocargo: regenerate 2020-05-19 16:08:40 -07:00
lfs_protocol mononoke: try to compress values if they above cachelib limit 2020-06-20 01:05:54 -07:00
lfs_server gotham_ext: make StreamBody take an infallible byte stream 2020-09-18 22:49:55 -07:00
load_limiter Regenerate all Cargo.tomls after upgrade to futures 0.3.5 2020-07-06 20:49:43 -07:00
manifest mononoke: update Memblob::new callsites to ::default() 2020-10-07 12:11:10 -07:00
mercurial commit_rewriting: use is_empty() where possible 2020-10-04 10:03:42 -07:00
metaconfig Added S3 blobstore 2020-09-22 04:15:34 -07:00
microwave mononoke: allow logging censored scuba accesses to file 2020-09-04 07:37:14 -07:00
mononoke_api scs_server: add pushvar support 2020-10-07 07:09:40 -07:00
mononoke_commitcloud_bookmarks_filler migrate sync_bookmark to new-style futures 2020-10-07 05:08:40 -07:00
mononoke_hg_sync_job commit_rewriting: use is_empty() where possible 2020-10-04 10:03:42 -07:00
mononoke_types third-party/rust: bump third-party code versions 2020-09-26 18:13:40 +02:00
mutable_counters mononoke: read mutable_counters from replica in blobimport warmer 2020-10-07 05:24:30 -07:00
newfilenodes commit_rewriting: use is_empty() where possible 2020-10-04 10:03:42 -07:00
permission_checker mononoke: deprecate preamble in favor of metadata 2020-09-15 10:28:38 -07:00
phases shed/sql: make queries! macros work with new Rust mysql client 2020-09-11 06:33:37 -07:00
pushrebase mononoke: allow adding an extra that fails all pushrebase across a commit 2020-10-06 13:31:39 -07:00
reachabilityindex impl LCAHint for Arc<impl LCAHint> 2020-09-11 16:56:13 -07:00
regenerate_hg_filenodes mononoke/regenerate_hg_filenodes: make regenerate_hg_filenodes public (#39) 2020-07-30 06:50:54 -07:00
repo_client bookmarks_movement: add pushvars for delete_bookmark 2020-10-07 07:09:39 -07:00
repo_import commit_rewriting: use is_empty() where possible 2020-10-04 10:03:42 -07:00
revset Prepare for rustfmt 2.0 2020-09-08 07:33:16 -07:00
scs_server scs_server: add pushvar support 2020-10-07 07:09:40 -07:00
segmented_changelog Update formatter to rustfmt 2.0 2020-09-09 07:52:33 -07:00
server adding per repo ACL checking 2020-09-24 08:12:35 -07:00
sshrelay commit_rewriting: use is_empty() where possible 2020-10-04 10:03:42 -07:00
tests scs_server: add pushvar support 2020-10-07 07:09:40 -07:00
time_window_counter mononoke/lfs_server: popularity: add ODS counters, timeouts and tests 2020-07-15 03:39:23 -07:00
tunables mononoke: add a tunable for ratio of master fallbacks 2020-10-01 01:06:28 -07:00
unbundle_replay move interngraph token from disk to keychain service 2020-10-02 06:56:49 -07:00
walker mononoke: add error context to file content scrub 2020-09-22 05:26:23 -07:00
Cargo.toml common: add iterhelpers 2020-10-04 23:51:03 -07:00
README.md mononoke: add README.md and the missing pieces for supporting cargo (#13) 2020-02-13 00:12:36 -08:00

Mononoke

Mononoke is a next-generation server for the Mercurial source control system, meant to scale up to accepting thousands of commits every hour across millions of files. It is primarily written in the Rust programming language.

Caveat Emptor

Mononoke is still in early stages of development. We are making it available now because we plan to start making references to it from our other open source projects.

The version that we provide on GitHub does not build yet.

This is because the code is exported verbatim from an internal repository at Facebook, and not all of the scaffolding from our internal repository can be easily extracted. The key areas where we need to shore things up are:

  • Full support for a standard cargo build.
  • Open source replacements for Facebook-internal services (blob store, logging etc).

The current goal is to get Mononoke working on Linux. Other Unix-like OSes may be supported in the future