sapling/eden/mononoke/commit_rewriting
Kostia Balytskyi dd64e842c3 cross_repo_sync: use parent config version when syncing merges
Summary:
This diff fixes how syncing of merge commits decides on the `CommitSyncConfigVersion` to use. Old and incorrect behavior just always uses current version from `LiveCommitSyncConfig`. The desired behavior is to reuse the version with which parent commits are synced, and manually sync commits when version changes are needed.

For merges it is more interesting, as merges have multiple parents. The overarching idea is to force all of the parents to have the same version and bail a merge if this is not the case. However, that is an ideal, and we are not there yet, because:
- there are `NotSyncCandidate` parents, which can (and should at the moment) be safely excluded from the list of parents of the synced commit.
- there are `Preserved` parents (which will turn into the ones synced with a `noop` version)
- there are `RewrittenAs` and `EquivalentWorkingCopy` parents, which don't have an associated version.

So until the problems above are solved:
- absent `RewrittenAs`/`EquivalentWorkingCopy` versions are replaced with the current version
- `Preserved` merge parents cause merge sync to fail.

Reviewed By: StanislavGlebik

Differential Revision: D24033905

fbshipit-source-id: c1c98b3e7097513af980b5a9f00cc62d248fc03b
2020-10-08 02:43:19 -07:00
..
backsyncer commit_rewriting: do not create accidental Preserved syncs 2020-10-08 02:43:19 -07:00
bookmark_renaming add newtype for CommitSyncConfigVersion 2020-06-26 02:45:26 -07:00
bookmarks_validator mononoke: add version to CommitSyncOutcome:: EquivalentWorkingCopyAncestor 2020-09-28 10:20:15 -07:00
commit_validator commit_rewriting: use is_empty() where possible 2020-10-04 10:03:42 -07:00
cross_repo_sync cross_repo_sync: use parent config version when syncing merges 2020-10-08 02:43:19 -07:00
live_commit_sync_config common: add iterhelpers 2020-10-04 23:51:03 -07:00
megarepo commit_rewriting: use is_empty() where possible 2020-10-04 10:03:42 -07:00
mononoke_x_repo_sync_job get rid of synced_commit_mapping::get_one in mononoke_x_repo_sync_job 2020-10-02 07:44:56 -07:00
movers mononoke/repo_import: add rewrite_commit functionality 2020-06-30 11:39:35 -07:00
synced_commit_mapping commit_rewriting: use is_empty() where possible 2020-10-04 10:03:42 -07:00