sapling/eden/fs/store/EmptyBackingStore.cpp
Xavier Deguillard e8c214db57 store: support fetching aux data via ObjectStore
Summary:
Now that the Mercurial backingstore knows how to fetch aux data, let's thread
this through the ObjectStore.

Reviewed By: kmancini

Differential Revision: D44110102

fbshipit-source-id: c57da05066d80fee199e45b4a4223168a196e3de
2023-03-29 15:35:52 -07:00

71 lines
2.1 KiB
C++

/*
* Copyright (c) Meta Platforms, Inc. and 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"
#include "eden/fs/store/ObjectFetchContext.h"
using folly::makeSemiFuture;
using folly::SemiFuture;
using std::unique_ptr;
namespace facebook::eden {
EmptyBackingStore::EmptyBackingStore() {}
EmptyBackingStore::~EmptyBackingStore() {}
RootId EmptyBackingStore::parseRootId(folly::StringPiece /*rootId*/) {
throw std::domain_error("empty backing store");
}
std::string EmptyBackingStore::renderRootId(const RootId& /*rootId*/) {
throw std::domain_error("empty backing store");
}
ObjectId EmptyBackingStore::parseObjectId(folly::StringPiece /*objectId*/) {
throw std::domain_error("empty backing store");
}
std::string EmptyBackingStore::renderObjectId(const ObjectId& /*objectId*/) {
throw std::domain_error("empty backing store");
}
ImmediateFuture<unique_ptr<Tree>> EmptyBackingStore::getRootTree(
const RootId& /* rootId */,
const ObjectFetchContextPtr& /* context */) {
return makeSemiFuture<unique_ptr<Tree>>(
std::domain_error("empty backing store"));
}
SemiFuture<BackingStore::GetTreeResult> EmptyBackingStore::getTree(
const ObjectId& /* id */,
const ObjectFetchContextPtr& /* context */) {
return makeSemiFuture<GetTreeResult>(
std::domain_error("empty backing store"));
}
SemiFuture<BackingStore::GetBlobResult> EmptyBackingStore::getBlob(
const ObjectId& /* id */,
const ObjectFetchContextPtr& /* context */) {
return makeSemiFuture<GetBlobResult>(
std::domain_error("empty backing store"));
}
SemiFuture<BackingStore::GetBlobMetaResult> EmptyBackingStore::getBlobMetadata(
const ObjectId& /* id */,
const ObjectFetchContextPtr& /* context */) {
return makeSemiFuture<GetBlobMetaResult>(
std::domain_error("empty backing store"));
}
} // namespace facebook::eden