mirror of
https://github.com/facebook/sapling.git
synced 2024-10-10 08:47:12 +03:00
mononoke: add create_repo_unredatected to the args helper
Summary: We need this to accomodate `blobimport`'s needs of using (opening(D16914875) and creating(this)) unredacted repos. Note: this is nearly identical to D16914875. Reviewed By: StanislavGlebik Differential Revision: D16915557 fbshipit-source-id: 6b522e6fcee4582870df27cf66e8ad55e91235fe
This commit is contained in:
parent
83065085fd
commit
496749e2a7
@ -316,6 +316,23 @@ pub fn create_repo<'a>(
|
||||
)
|
||||
}
|
||||
|
||||
/// Create a new `BlobRepo` -- for local instances, expect its contents to be empty.
|
||||
/// Make sure that the opened repo has redaction disabled
|
||||
#[inline]
|
||||
pub fn create_repo_unredacted<'a>(
|
||||
logger: &Logger,
|
||||
matches: &ArgMatches<'a>,
|
||||
) -> impl Future<Item = BlobRepo, Error = Error> {
|
||||
open_repo_internal(
|
||||
logger,
|
||||
matches,
|
||||
true,
|
||||
parse_caching(matches),
|
||||
Scrubbing::Disabled,
|
||||
Some(Redaction::Disabled),
|
||||
)
|
||||
}
|
||||
|
||||
/// Open an existing `BlobRepo` -- for local instances, expect contents to already be there.
|
||||
#[inline]
|
||||
pub fn open_repo<'a>(
|
||||
|
@ -95,7 +95,7 @@ fn main() -> Result<()> {
|
||||
let blobrepo = if matches.is_present("no-create") {
|
||||
args::open_repo_unredacted(&ctx.logger(), &matches).left_future()
|
||||
} else {
|
||||
args::create_repo(&ctx.logger(), &matches).right_future()
|
||||
args::create_repo_unredacted(&ctx.logger(), &matches).right_future()
|
||||
};
|
||||
|
||||
let blobimport = blobrepo
|
||||
|
Loading…
Reference in New Issue
Block a user