diff --git a/eden/fs/store/hg/HgBackingStore.cpp b/eden/fs/store/hg/HgBackingStore.cpp index 704859036c..052b754480 100644 --- a/eden/fs/store/hg/HgBackingStore.cpp +++ b/eden/fs/store/hg/HgBackingStore.cpp @@ -133,6 +133,7 @@ class HgImporterTestExecutor : public folly::InlineExecutor { } }; +#if EDEN_HAVE_HG_TREEMANIFEST // A helper function to avoid repeating noisy casts/conversions when // loading data from a UnionDatapackStore instance. template @@ -144,6 +145,7 @@ unionStoreGet(UnionStore&& unionStore, StringPiece name, const Hash& id) { (const char*)id.getBytes().data(), id.getBytes().size())); } +#endif // EDEN_HAVE_HG_TREEMANIFEST } // namespace @@ -282,10 +284,11 @@ Future> HgBackingStore::getTree(const Hash& id) { return tree; }); #else - return Future(make_exception_wrapper(folly::to( + return Future>(folly::make_exception_wrapper< + std::domain_error>(folly::to( "requested to import subtree ", id.toString(), - " but flatmanifest import should have already imported all subtrees")); + " but flatmanifest import should have already imported all subtrees"))); #endif } @@ -553,6 +556,7 @@ Future> HgBackingStore::getBlob(const Hash& id) { // which we need to import the data from mercurial HgProxyHash hgInfo(localStore_, id, "importFileContents"); +#if EDEN_HAVE_HG_TREEMANIFEST #ifndef EDEN_WIN_NOMONONOKE if (mononoke_) { XLOG(DBG5) << "requesting file contents of '" << hgInfo.path() << "', " @@ -576,6 +580,7 @@ Future> HgBackingStore::getBlob(const Hash& id) { }); } #endif // EDEN_WIN_NOMONONOKE +#endif // EDEN_HAVE_HG_TREEMANIFEST return folly::via( importThreadPool_.get(), diff --git a/eden/fs/store/hg/HgImporter.cpp b/eden/fs/store/hg/HgImporter.cpp index aa17af2841..5be55422b3 100644 --- a/eden/fs/store/hg/HgImporter.cpp +++ b/eden/fs/store/hg/HgImporter.cpp @@ -43,8 +43,10 @@ #include "eden/fs/utils/PathFuncs.h" #include "eden/fs/utils/TimeUtil.h" +#if EDEN_HAVE_HG_TREEMANIFEST // Needed for MissingKeyError #include "hgext/extlib/cstore/uniondatapackstore.h" // @manual=//scm/hg:datapack +#endif // EDEN_HAVE_HG_TREEMANIFEST using folly::ByteRange; using folly::Endian;