mirror of
https://github.com/facebook/sapling.git
synced 2024-12-26 06:21:48 +03:00
ae1dae6b96
Summary: Add an option `experimental:use-edenapi` to `EdenConfig`. See the next diff for usage. Reviewed By: chadaustin Differential Revision: D18605549 fbshipit-source-id: 2786c21bb38a76229078662cc5c1ddf906d1be4a
37 lines
811 B
C++
37 lines
811 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 <folly/Range.h>
|
|
#include <memory>
|
|
|
|
#include "eden/scm/lib/backingstore/c_api/RustBackingStore.h"
|
|
|
|
namespace folly {
|
|
class IOBuf;
|
|
} // namespace folly
|
|
|
|
namespace facebook {
|
|
namespace eden {
|
|
|
|
class HgNativeBackingStore {
|
|
public:
|
|
HgNativeBackingStore(folly::StringPiece repository, bool useEdenApi);
|
|
|
|
std::unique_ptr<folly::IOBuf> getBlob(
|
|
folly::ByteRange name,
|
|
folly::ByteRange node);
|
|
|
|
std::shared_ptr<RustTree> getTree(folly::ByteRange node);
|
|
|
|
private:
|
|
std::unique_ptr<RustBackingStore, std::function<void(RustBackingStore*)>>
|
|
store_;
|
|
};
|
|
} // namespace eden
|
|
} // namespace facebook
|