sapling/eden/mononoke/repo_import/Cargo.toml
Viet Hung Nguyen 578207d0dc mononoke/repo_import: add hg sync checker
Summary:
Related diff: D22816538 (3abc4312af)

In repo_import tool once we move a bookmark to reveal commits to users, we want to check if hg_sync has received the commits. To do this, we extract the largest log id from bookmarks_update_log to compare it with the mutable_counter value related to hg_sync. If the counter value is larger or equal to the log id, we can move the bookmark to the next batch of commits. Otherwise, we sleep, retry fetching the mutable_counter value and compare the two again.
mutable_counters is an sql table that can track bookmarks log update instances with a counter.
This diff adds the functionality to extract the mutable_counters value for hg_sync.

======================
SQL query fix:
In the previous diff (D22816538 (3abc4312af)) we didn't cover the case where we might not get an ID which should return None. This diff fixes this error.

Reviewed By: StanislavGlebik

Differential Revision: D22864223

fbshipit-source-id: f3690263b4eebfe151e50b01a13b0193009e3bfa
2020-08-03 04:01:27 -07:00

40 lines
1.5 KiB
TOML

[package]
name = "repo_import"
edition = "2018"
version = "0.1.0"
authors = ['Facebook']
license = "GPLv2+"
include = ["src/**/*.rs"]
[dependencies]
blobrepo = { path = "../blobrepo" }
blobrepo_hg = { path = "../blobrepo/blobrepo_hg" }
bookmarks = { path = "../bookmarks" }
cmdlib = { path = "../cmdlib" }
context = { path = "../server/context" }
cross_repo_sync = { path = "../commit_rewriting/cross_repo_sync" }
derived_data_utils = { path = "../derived_data/utils" }
import_tools = { path = "../git/import_tools" }
mercurial_types = { path = "../mercurial/types" }
mononoke_types = { path = "../mononoke_types" }
movers = { path = "../commit_rewriting/movers" }
mutable_counters = { path = "../mutable_counters" }
topo_sort = { path = "../common/topo_sort" }
fbinit = { git = "https://github.com/facebookexperimental/rust-shed.git", branch = "master" }
anyhow = "1.0"
clap = "2.33"
futures = { version = "0.3.5", features = ["async-await", "compat"] }
serde = { version = "1.0", features = ["derive", "rc"] }
serde_json = "1.0"
slog = { version = "2.5", features = ["max_level_debug"] }
tokio = { version = "=0.2.13", features = ["full"] }
[dev-dependencies]
blobrepo_factory = { path = "../blobrepo/factory" }
blobstore = { path = "../blobstore" }
mercurial_types-mocks = { path = "../mercurial/types/mocks" }
mononoke_types-mocks = { path = "../mononoke_types/mocks" }
sql_construct = { path = "../common/sql_construct" }
tests_utils = { path = "../tests/utils" }
tokio-compat = "0.1"