mirror of
https://github.com/facebook/sapling.git
synced 2024-10-10 08:47:12 +03:00
2da686d315
Summary: This diff adds `Priority` added in the previous diff to the `BackingStore` interface with the default value set to `Priority::Normal`. Reviewed By: chadaustin Differential Revision: D20197071 fbshipit-source-id: a92f1b49bb82e3478042e5e3b79b047d834755ea
54 lines
1.4 KiB
C++
54 lines
1.4 KiB
C++
/*
|
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
*
|
|
* This software may be used and distributed according to the terms of the
|
|
* GNU General Public License version 2.
|
|
*/
|
|
|
|
#include "eden/fs/store/EmptyBackingStore.h"
|
|
|
|
#include <folly/futures/Future.h>
|
|
#include "eden/fs/model/Blob.h"
|
|
#include "eden/fs/model/Hash.h"
|
|
#include "eden/fs/model/Tree.h"
|
|
|
|
using folly::makeSemiFuture;
|
|
using folly::SemiFuture;
|
|
using std::unique_ptr;
|
|
|
|
namespace facebook {
|
|
namespace eden {
|
|
|
|
EmptyBackingStore::EmptyBackingStore() {}
|
|
|
|
EmptyBackingStore::~EmptyBackingStore() {}
|
|
|
|
SemiFuture<unique_ptr<Tree>> EmptyBackingStore::getTree(
|
|
const Hash& /* id */,
|
|
ImportPriority /* priority */) {
|
|
return makeSemiFuture<unique_ptr<Tree>>(
|
|
std::domain_error("empty backing store"));
|
|
}
|
|
|
|
SemiFuture<unique_ptr<Blob>> EmptyBackingStore::getBlob(
|
|
const Hash& /* id */,
|
|
ImportPriority /* priority */) {
|
|
return makeSemiFuture<unique_ptr<Blob>>(
|
|
std::domain_error("empty backing store"));
|
|
}
|
|
|
|
SemiFuture<unique_ptr<Tree>> EmptyBackingStore::getTreeForCommit(
|
|
const Hash& /* commitID */) {
|
|
return makeSemiFuture<unique_ptr<Tree>>(
|
|
std::domain_error("empty backing store"));
|
|
}
|
|
|
|
SemiFuture<std::unique_ptr<Tree>> EmptyBackingStore::getTreeForManifest(
|
|
const Hash& /* commitID */,
|
|
const Hash& /* manifestID */) {
|
|
return makeSemiFuture<unique_ptr<Tree>>(
|
|
std::domain_error("empty backing store"));
|
|
}
|
|
} // namespace eden
|
|
} // namespace facebook
|