sapling/eden/mononoke/tests/integration/commitsyncmap.toml
Kostia Balytskyi 5cd4583c5a cross_repo: record sync map version_name in synced_commit_mapping
Summary:
Out `CommitSyncConfig` struct now contains a `version_name` field, which is intended to be used as an identifier of an individual version of the `commitsyncmap` in use. We want to record this value in the `synced_commit_mapping` table, so that later it is possible to attribute a commit sync map to a given commit sync.

This is part of a broader goal of adding support for sync map versioning. The broader goal is important, as it allows us to move faster (and troubleshoot better) when sync maps need changing.

Note that when commit is preserved across repos, we set `version_name` to `NULL`, as it makes no sense to attribute commit sync maps to those case.

Reviewed By: farnz

Differential Revision: D21765408

fbshipit-source-id: 11a77cc4d926e4a4d72322b51675cb78eabcedee
2020-06-01 07:16:52 -07:00

49 lines
1.7 KiB
TOML

# Common definition for commit sync path mapping
#
# A top-level config must have a name and a repo-id of a large repo
# It may have multiple subconfigs, named `<top-level-name>.small_repos`
# Each of the the `small_repos` configs MUST have:
# - a repo id
# - a bookmark prefix to prepend to every bookmark name
# - a default path syncing action. Is used when none of the
# "map" values matches a path. Can be one of:
# - "preserve": keep this path as it is when syncing
# - "prepend_prefix": prepend the "default_prefix" to this path
# when syncing
# Each of the `small_repos` configs MAY have:
# - a map of prefixes to new prefixes, key "map"
#
# Note: config is written from the "bottom-up" perspective, e.g.
# it contains mappings, needed to sync small repos into a
# a large repo. This mapping needs to be reversable
# (and is reversed when the sync happens in a large-to-small
# direction)
[megarepo_test]
large_repo_id = 0
common_pushrebase_bookmarks = ["master_bookmark"]
version_name = "TEST_VERSION_NAME"
[[megarepo_test.small_repos]]
repoid = 1
bookmark_prefix = "fbsource/"
default_action = "preserve"
direction = "small_to_large"
[megarepo_test.small_repos.mapping]
"arvr" = ".fbsource-rest/arvr"
[[megarepo_test.small_repos]]
repoid = 2
bookmark_prefix = "ovrsource/"
default_action = "prepend_prefix"
default_prefix = "arvr-legacy"
direction = "small_to_large"
[megarepo_test.small_repos.mapping]
"arvr" = "arvr"
"fbcode" = ".ovrsource-rest/fbcode"
"fbandroid" = ".ovrsource-rest/fbandroid"
"fbobjc" = ".ovrsource-rest/fbobjc"
"xplat" = ".ovrsource-rest/xplat"