A Scalable, User-Friendly Source Control System.
Go to file
Thomas Orozco 0b3cd11c26 mononoke: verify bookmark namespace even during pushrebase
Summary:
We accidentally were not verifying the bookmark namespace (with regard to infinitepush) when performing a pushrebase.

This is a problem, because it means if a pushrebase was performed into the infinitepush namespace, then the push would be allowed. This could happen by accident (the earlier diff in this stack fixes a Mercurial bug that did this), or simply if the end-user changes their infinitepush branchpattern.

This patch fixes the bug, and extracts the "do basic checks for whether this bookmark can move" logic into a single function to minimize the potential for this validation logic diverging again between pushrebase and push.

Reviewed By: ikostia

Differential Revision: D15576198

fbshipit-source-id: 24cf9999a7370503e5e0173e34185d9aa57903f7
2019-05-31 08:57:06 -07:00
apiserver mononoke: support non-publishing / non-pull_default Bookmarks 2019-05-30 07:14:32 -07:00
async-compression Convert //common/rust/async-compression:async-compression to Rust 2018 2019-05-23 00:09:32 -07:00
asyncmemo Convert //common/rust/asyncmemo:asyncmemo to Rust 2018 2019-05-22 01:00:42 -07:00
benchmark mononoke: fix broken build (racing diffs) 2019-05-21 12:25:53 -07:00
blobimport_lib/src mononoke: support non-publishing / non-pull_default Bookmarks 2019-05-30 07:14:32 -07:00
blobrepo Blacklisted keys verification 2019-05-31 03:41:48 -07:00
blobrepo_utils Convert scm/mononoke/blobrepo_utils to Rust 2018 2019-05-28 15:19:49 -07:00
blobstore Blacklisted keys verification 2019-05-31 03:41:48 -07:00
blobstore_sync_queue mononoke: do not panic if stream has ended 2019-05-21 12:25:53 -07:00
bonsai_hg_mapping Convert scm/mononoke/bonsai_hg_mapping to Rust 2018 2019-05-23 14:26:32 -07:00
bonsai_utils Convert scm/mononoke/bonsai_utils to Rust 2018 2019-05-24 10:07:44 -07:00
bookmarks mononoke: Track dirty state of CachedBookmarksTransaction 2019-05-31 04:37:36 -07:00
bundle2_resolver mononoke: verify bookmark namespace even during pushrebase 2019-05-31 08:57:06 -07:00
bytes-ext Convert //common/rust/bytes-ext:bytes-ext to Rust 2018 2019-05-22 01:13:28 -07:00
cache_warmup/src Convert scm/mononoke/cache_warmup to Rust 2018 2019-05-24 09:53:42 -07:00
changesets mononoke: cache in CachingChangesets::get_many 2019-05-21 12:25:50 -07:00
cmdlib/src add reporducability under load test for memory_manifest 2019-05-21 12:25:52 -07:00
cmds Factor repetition in checker tasks 2019-05-30 08:02:45 -07:00
common Convert scm/mononoke/common/rust/sql_ext to Rust 2018 2019-05-28 15:19:49 -07:00
failure_ext Convert //common/rust/failure_ext:failure_ext to Rust 2018 2019-05-22 01:05:40 -07:00
filenodes Convert scm/mononoke/filenodes to Rust 2018 2019-05-28 15:14:57 -07:00
futures-ext RFC: mononoke: memory limited getpackv1 stream 2019-05-29 09:39:04 -07:00
hgcli Convert scm/mononoke/hgcli to Rust 2018 2019-05-28 15:09:33 -07:00
hgproto tp2/rust: update to Rust 1.35.0 2019-05-28 14:28:48 -07:00
hook_tailer mononoke: Rename Bookmark to BookmarkName 2019-05-21 12:26:02 -07:00
hooks mononoke: limit match count in list_all_bookmarks_with_prefix 2019-05-30 07:14:33 -07:00
mercurial tp2/rust: update to Rust 1.35.0 2019-05-28 14:28:48 -07:00
mercurial_bundles mononoke: create scratch bookmarks from B2xInfinitepush 2019-05-30 07:14:32 -07:00
mercurial_types update to Rust 1.34.0 2019-05-21 12:25:14 -07:00
metaconfig mononoke: limit match count in list_all_bookmarks_with_prefix 2019-05-30 07:14:33 -07:00
mononoke_api/src mononoke: Rename Bookmark to BookmarkName 2019-05-21 12:26:02 -07:00
mononoke_types add benchmark for get_hg_from_bonsai_changeset 2019-05-21 12:25:51 -07:00
netstring rust/netstring: convert to Rust 2018 2019-02-12 08:43:24 -08:00
phases mononoke: support non-publishing / non-pull_default Bookmarks 2019-05-30 07:14:32 -07:00
py_tar_utils move tar_utils.py from update_rust into an open sourceable location 2017-09-14 13:52:23 -07:00
reachabilityindex mononoke: Rename Bookmark to BookmarkName 2019-05-21 12:26:02 -07:00
ready_state/src server: split server binary crate into 4 separate crates 2018-07-17 04:54:58 -07:00
repo_client mononoke: limit match count in list_all_bookmarks_with_prefix 2019-05-30 07:14:33 -07:00
revset Convert scm/mononoke/revset to Rust 2018 2019-05-28 15:14:57 -07:00
server mononoke: limit match count in list_all_bookmarks_with_prefix 2019-05-30 07:14:33 -07:00
sshrelay Convert scm/mononoke/sshrelay to Rust 2018 2019-05-23 00:30:31 -07:00
tests mononoke: verify bookmark namespace even during pushrebase 2019-05-31 08:57:06 -07:00
.gitignore add .gitignore 2018-03-13 11:58:20 -07:00
.travis.yml Add travis-CI integration by adding .travis.yml file. 2018-07-26 10:09:32 -07:00
Cargo.toml mononoke: rename crates to contain underscores instead of dashes 2019-03-06 07:18:28 -08:00
CONTRIBUTING.md Initial commit 2017-07-27 18:00:19 -07:00
LICENSE Initial commit 2017-07-27 18:00:19 -07:00
packman.yml fb-mononoke-admin: scm/mononoke/packman.yml: add 'packager: ONCALL' line (trivial) 2019-03-12 19:15:27 -07:00
README.md mononoke: simple useless change 2019-05-21 12:25:10 -07:00
rustfmt.toml provide edition in .rustfmt.toml 2019-05-29 19:55:37 -07: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 such as Eden.

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