Skip to content

Commit 0754074

Browse files
mononoke: do not read common bookmarks from commit sync config
Summary: Our current megarepo configuration is in a bit of a mess: 1) We have LiveCommitSyncConfig, which fetches the latest version of configs from configerator and should be used in all cases 2) However we still have an old commit that's stored in mononoke config. It shouldn't really be used at all. Unfortunately there are a few places where #2 is still used. This diff removes one of them. Reviewed By: ikostia Differential Revision: D23845297 fbshipit-source-id: aa2d591223cc4b8fe5ef264147457fcb3d1faad7
1 parent 874cf58 commit 0754074

File tree

1 file changed

+6
-8
lines changed
  • eden/mononoke/commit_rewriting/mononoke_x_repo_sync_job/src

1 file changed

+6
-8
lines changed

eden/mononoke/commit_rewriting/mononoke_x_repo_sync_job/src/main.rs

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -415,14 +415,6 @@ async fn run(
415415
let (_, source_repo_config) = args::get_config_by_repoid(fb, &matches, source_repo_id)?;
416416
let (_, target_repo_config) = args::get_config_by_repoid(fb, &matches, target_repo_id)?;
417417

418-
let common_bookmarks: HashSet<_> = source_repo_config
419-
.commit_sync_config
420-
.clone()
421-
.ok_or(format_err!("commit sync config not found!"))?
422-
.common_pushrebase_bookmarks
423-
.into_iter()
424-
.collect();
425-
426418
let logger = ctx.logger();
427419
let source_repo = args::open_repo_with_repo_id(fb, &logger, source_repo_id, &matches).compat();
428420
let target_repo = args::open_repo_with_repo_id(fb, &logger, target_repo_id, &matches).compat();
@@ -438,6 +430,12 @@ async fn run(
438430
let commit_sync_config =
439431
live_commit_sync_config.get_current_commit_sync_config(&ctx, source_repo.get_repoid())?;
440432

433+
let common_bookmarks: HashSet<_> = commit_sync_config
434+
.common_pushrebase_bookmarks
435+
.clone()
436+
.into_iter()
437+
.collect();
438+
441439
let commit_syncer = commit_syncer_args
442440
.clone()
443441
.try_into_commit_syncer(&commit_sync_config)?;

0 commit comments

Comments
 (0)