mirror of
https://github.com/facebook/sapling.git
synced 2024-10-10 16:57:49 +03:00
504a255355
Summary: Adds a function which takes both the manifestID and the commitID to get a Tree. This will be used in `checkOutRevision()` and this allows us to skip looking up the manifestID since the caller can just pass it in themselves. Reviewed By: wez Differential Revision: D18719405 fbshipit-source-id: 919f0a7c84bff4a2f0bc20110c45bd272f9e9107
34 lines
905 B
C++
34 lines
905 B
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.
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include "BackingStore.h"
|
|
|
|
namespace facebook {
|
|
namespace eden {
|
|
|
|
/*
|
|
* A dummy BackingStore implementation, that always throws std::domain_error
|
|
* for any ID that is looked up.
|
|
*/
|
|
class EmptyBackingStore : public BackingStore {
|
|
public:
|
|
EmptyBackingStore();
|
|
~EmptyBackingStore() override;
|
|
|
|
folly::Future<std::unique_ptr<Tree>> getTree(const Hash& id) override;
|
|
folly::Future<std::unique_ptr<Blob>> getBlob(const Hash& id) override;
|
|
folly::Future<std::unique_ptr<Tree>> getTreeForCommit(
|
|
const Hash& commitID) override;
|
|
folly::Future<std::unique_ptr<Tree>> getTreeForManifest(
|
|
const Hash& commitID,
|
|
const Hash& manifestID) override;
|
|
};
|
|
} // namespace eden
|
|
} // namespace facebook
|