mirror of
https://github.com/facebook/sapling.git
synced 2025-01-06 04:43:19 +03:00
mononoke: remove Arc<BlobRepo> from hook tailer
Summary: Fix TODO, BlobRepo is cloneable and there is no reason to use Arc<BlobRepo> Reviewed By: ikostia Differential Revision: D13607214 fbshipit-source-id: ba280823e8b232d4bf6e62ac2ce8d8cd3ee64c96
This commit is contained in:
parent
be6d9bf347
commit
29d1b9e5a0
@ -66,7 +66,6 @@ use std::fmt;
|
||||
use std::io;
|
||||
use std::path::PathBuf;
|
||||
use std::str::FromStr;
|
||||
use std::sync::Arc;
|
||||
use std::time::Duration;
|
||||
use tailer::Tailer;
|
||||
use tokio_timer::sleep;
|
||||
@ -122,8 +121,7 @@ fn main() -> Result<()> {
|
||||
let tailer = Tailer::new(
|
||||
ctx,
|
||||
repo_name.to_string(),
|
||||
// TODO (T32873881): Arc<BlobRepo> should become BlobRepo
|
||||
Arc::new(blobrepo),
|
||||
blobrepo,
|
||||
config.clone(),
|
||||
bookmark,
|
||||
manifold_client.clone(),
|
||||
|
@ -25,7 +25,7 @@ use std::sync::Arc;
|
||||
|
||||
pub struct Tailer {
|
||||
ctx: CoreContext,
|
||||
repo: Arc<BlobRepo>,
|
||||
repo: BlobRepo,
|
||||
hook_manager: Arc<HookManager>,
|
||||
bookmark: Bookmark,
|
||||
last_rev_key: String,
|
||||
@ -37,14 +37,14 @@ impl Tailer {
|
||||
pub fn new(
|
||||
ctx: CoreContext,
|
||||
repo_name: String,
|
||||
repo: Arc<BlobRepo>,
|
||||
repo: BlobRepo,
|
||||
config: RepoConfig,
|
||||
bookmark: Bookmark,
|
||||
manifold_client: ManifoldHttpClient,
|
||||
logger: Logger,
|
||||
) -> Result<Tailer> {
|
||||
let changeset_store = BlobRepoChangesetStore::new((*repo).clone());
|
||||
let content_store = BlobRepoFileContentStore::new((*repo).clone());
|
||||
let changeset_store = BlobRepoChangesetStore::new(repo.clone());
|
||||
let content_store = BlobRepoFileContentStore::new(repo.clone());
|
||||
|
||||
let mut hook_manager = HookManager::new(
|
||||
ctx.clone(),
|
||||
@ -77,7 +77,7 @@ impl Tailer {
|
||||
|
||||
fn run_in_range0(
|
||||
ctx: CoreContext,
|
||||
repo: Arc<BlobRepo>,
|
||||
repo: BlobRepo,
|
||||
hm: Arc<HookManager>,
|
||||
last_rev: HgNodeHash,
|
||||
end_rev: HgNodeHash,
|
||||
@ -215,7 +215,7 @@ impl Tailer {
|
||||
|
||||
fn nodehash_to_bonsai(
|
||||
ctx: CoreContext,
|
||||
repo: &Arc<BlobRepo>,
|
||||
repo: &BlobRepo,
|
||||
node: HgNodeHash,
|
||||
) -> impl Future<Item = ChangesetId, Error = Error> {
|
||||
let hg_cs = HgChangesetId::new(node);
|
||||
@ -225,7 +225,7 @@ fn nodehash_to_bonsai(
|
||||
|
||||
fn run_hooks_for_changeset(
|
||||
ctx: CoreContext,
|
||||
repo: Arc<BlobRepo>,
|
||||
repo: BlobRepo,
|
||||
hm: Arc<HookManager>,
|
||||
bm: Bookmark,
|
||||
cs: ChangesetId,
|
||||
|
Loading…
Reference in New Issue
Block a user