mirror of
https://github.com/facebook/sapling.git
synced 2024-10-07 07:17:55 +03:00
mononoke: replace mononoke_x_repo_sync_job with the new one
Summary: This is basically just hg rm/hg mv, updates of the tests and tw spec. Reviewed By: farnz Differential Revision: D19429700 fbshipit-source-id: 0b5464ca254211bcfda5d252a2ee98fe904dd3ce
This commit is contained in:
parent
191aea0e68
commit
2821b29da6
@ -115,29 +115,12 @@ function mononoke_walker {
|
||||
"$@"
|
||||
}
|
||||
|
||||
function mononoke_x_repo_sync_once() {
|
||||
function mononoke_x_repo_sync() {
|
||||
source_repo_id=$1
|
||||
target_repo_id=$2
|
||||
target_bookmark=$3
|
||||
shift
|
||||
shift
|
||||
shift
|
||||
GLOG_minloglevel=5 "$MONONOKE_X_REPO_SYNC" \
|
||||
"${COMMON_ARGS[@]}" \
|
||||
--mononoke-config-path "$TESTTMP/mononoke-config" \
|
||||
--source-repo-id "$source_repo_id" \
|
||||
--target-repo-id "$target_repo_id" \
|
||||
--target-bookmark "$target_bookmark" \
|
||||
"$@"
|
||||
}
|
||||
|
||||
|
||||
function new_mononoke_x_repo_sync_once() {
|
||||
source_repo_id=$1
|
||||
target_repo_id=$2
|
||||
shift
|
||||
shift
|
||||
GLOG_minloglevel=5 "$NEW_MONONOKE_X_REPO_SYNC" \
|
||||
"${COMMON_ARGS[@]}" \
|
||||
--mononoke-config-path "$TESTTMP/mononoke-config" \
|
||||
--source-repo-id "$source_repo_id" \
|
||||
|
@ -63,7 +63,7 @@ start mononoke server
|
||||
$ wait_for_mononoke
|
||||
|
||||
run the sync, expected to fail, as parent of the synced commit is not present in the mapping
|
||||
$ new_mononoke_x_repo_sync_once 1 0 once --target-bookmark master_bookamrk --commit fbsource_master
|
||||
$ mononoke_x_repo_sync 1 0 once --target-bookmark master_bookamrk --commit fbsource_master
|
||||
* using repo "fbs-mon" repoid RepositoryId(1) (glob)
|
||||
* using repo "meg-mon" repoid RepositoryId(0) (glob)
|
||||
* changeset resolved as: ChangesetId(Blake2(*)) (glob)
|
||||
@ -78,7 +78,7 @@ insert sync mapping entry
|
||||
$ add_synced_commit_mapping_entry 1 $FBSOURCE_C1_BONSAI 0 $MEGAREPO_MERGE_BONSAI
|
||||
|
||||
run the sync again
|
||||
$ new_mononoke_x_repo_sync_once 1 0 once --target-bookmark bookmarktomerge --commit "$TOMERGE"
|
||||
$ mononoke_x_repo_sync 1 0 once --target-bookmark bookmarktomerge --commit "$TOMERGE"
|
||||
* using repo "fbs-mon" repoid RepositoryId(1) (glob)
|
||||
* using repo "meg-mon" repoid RepositoryId(0) (glob)
|
||||
* changeset resolved as: ChangesetId(Blake2(*)) (glob)
|
||||
@ -87,7 +87,7 @@ run the sync again
|
||||
* syncing 6d7f84d613e4cccb4ec27259b7b59335573cdd65ee5dc78887056a5eeb6e6a47 (glob)
|
||||
* changeset 6d7f84d613e4cccb4ec27259b7b59335573cdd65ee5dc78887056a5eeb6e6a47 synced as fa8f65693524f78f5e0a40099d10acdc3001d6d472c62baabf03231e51b109c7 in * (glob)
|
||||
* successful sync (glob)
|
||||
$ new_mononoke_x_repo_sync_once 1 0 once --target-bookmark master_bookmark --commit fbsource_master
|
||||
$ mononoke_x_repo_sync 1 0 once --target-bookmark master_bookmark --commit fbsource_master
|
||||
* using repo "fbs-mon" repoid RepositoryId(1) (glob)
|
||||
* using repo "meg-mon" repoid RepositoryId(0) (glob)
|
||||
* changeset resolved as: ChangesetId(Blake2(*)) (glob)
|
||||
|
@ -130,7 +130,7 @@ Disable bookmarks cache because bookmarks are modified by two separate processes
|
||||
|
||||
-- sync fbsource
|
||||
$ sqlite3 "$TESTTMP/monsql/sqlite_dbs" "INSERT INTO mutable_counters (repo_id, name, value) VALUES (0, 'xreposync_from_1', 2)";
|
||||
$ new_mononoke_x_repo_sync_once 1 0 tail --catch-up-once |& grep processing
|
||||
$ mononoke_x_repo_sync 1 0 tail --catch-up-once |& grep processing
|
||||
* processing log entry * (glob)
|
||||
* processing log entry * (glob)
|
||||
* processing log entry * (glob)
|
||||
@ -140,7 +140,7 @@ Disable bookmarks cache because bookmarks are modified by two separate processes
|
||||
|
||||
-- sync ovrsource
|
||||
$ sqlite3 "$TESTTMP/monsql/sqlite_dbs" "INSERT INTO mutable_counters (repo_id, name, value) VALUES (0, 'xreposync_from_2', 2)";
|
||||
$ new_mononoke_x_repo_sync_once 2 0 tail --catch-up-once |& grep processing
|
||||
$ mononoke_x_repo_sync 2 0 tail --catch-up-once |& grep processing
|
||||
* processing log entry * (glob)
|
||||
* processing log entry * (glob)
|
||||
$ REPOIDLARGE=0 REPOIDSMALL=2 verify_wc master_bookmark
|
||||
@ -151,7 +151,7 @@ Disable bookmarks cache because bookmarks are modified by two separate processes
|
||||
$ createfile fbcode/resume
|
||||
$ hg -q ci -m "fbsource commit resume"
|
||||
$ REPONAME=fbs-mon hgmn push -r . --to master_bookmark -q
|
||||
$ new_mononoke_x_repo_sync_once 1 0 tail --catch-up-once |& grep processing
|
||||
$ mononoke_x_repo_sync 1 0 tail --catch-up-once |& grep processing
|
||||
* processing log entry * (glob)
|
||||
|
||||
$ cd "$TESTTMP/meg-hg-cnt"
|
||||
|
@ -157,7 +157,7 @@ At the same time, the tailed repo gets new commits
|
||||
$ hg ci -qm "Post-merge commit 1"
|
||||
$ REPONAME=small-mon-2 hgmn push --to master_bookmark -q
|
||||
-- tailer puts this commit into a large repo
|
||||
$ new_mononoke_x_repo_sync_once $REPOIDSMALL2 $REPOIDLARGE once --target-bookmark master_bookmark --commit master_bookmark 2>&1 | grep "synced as"
|
||||
$ mononoke_x_repo_sync $REPOIDSMALL2 $REPOIDLARGE once --target-bookmark master_bookmark --commit master_bookmark 2>&1 | grep "synced as"
|
||||
* changeset 46d7f49c05a72a305692183a11274a0fbbdc4f8a4b53ca759fb3d257ba54184e synced as 3a9ffb4771519f86b79729a543da084c6a70ff385933aed540e2112a049a0697 * (glob)
|
||||
|
||||
Force pushrebase should fail, because it pushes to a shared bookmark
|
||||
|
Loading…
Reference in New Issue
Block a user