sapling/eden/mononoke/bookmarks
Stanislau Hlebik 53360c82dc mononoke: fix backsyncing mapping change via commit extra
Summary:
Yesterday I landed a diff (D25950531 (79c34c5094)) which allows changing a mapping by
landing a commit with a special commit extra. The implementation was done
inside backsyncer.

However, this was incorrect for a few reasons, the main reason being backsyncer
is not the only thing that rewrites commits between repos (x-repo commit lookup
is another thing for example).
So we need to push this implementation down to CommitSyncer level so that
everyone rewrites commits in the same way.

This diff fixes this issue, and moves all the logic of figuring out correct
mapping version down to CommitSyncer level. Doing so allowed me to also
simplify backsyncer to use normal sync_commit() method to backsync commits.

Another important note is about how we handle commits with no parents. We allow
syncing them only if there's an unambiguous version that we can pick. In case
of any ambiguity we don't sync them and return an error, which means that e.g.
merging a new repo and simultaneously changing the mapping is not possible.

Reviewed By: ikostia

Differential Revision: D25975842

fbshipit-source-id: a87fee545ac1305832ac905337610e7b87884477
2021-01-21 09:43:29 -08:00
..
bookmarks_movement mononoke: fix backsyncing mapping change via commit extra 2021-01-21 09:43:29 -08:00
bookmarks_types mononoke: implement FromStr for BookmarkName 2020-11-13 05:25:58 -08:00
dbbookmarks mononoke/cmds/admin: Add entry_id to admin bookmark log 2021-01-15 14:38:28 -08:00
src mononoke/cmds/admin: Add entry_id to admin bookmark log 2021-01-15 14:38:28 -08:00
warm_bookmarks_cache Make tokio-0.2 include test-util feature 2021-01-18 10:38:08 -08:00
Cargo.toml Make tokio-0.2 include test-util feature 2021-01-18 10:38:08 -08:00