diff --git a/eden/fs/store/Diff.cpp b/eden/fs/store/Diff.cpp index 49fa366ebc..6abdafb63d 100644 --- a/eden/fs/store/Diff.cpp +++ b/eden/fs/store/Diff.cpp @@ -113,9 +113,9 @@ Future TreeDiffer::diffCommits(Hash hash1, Hash hash2) { auto future1 = store_->getTreeForCommit(hash1); auto future2 = store_->getTreeForCommit(hash2); return collect(future1, future2) - .then([this](std::tuple< - std::shared_ptr, - std::shared_ptr>&& tup) { + .thenValue([this](std::tuple< + std::shared_ptr, + std::shared_ptr>&& tup) { auto tree1 = std::get<0>(tup); auto tree2 = std::get<1>(tup); return diffTrees(RelativePathPiece{}, *tree1, *tree2); diff --git a/eden/fs/store/LocalStore.cpp b/eden/fs/store/LocalStore.cpp index 05de47c056..412a31f17a 100644 --- a/eden/fs/store/LocalStore.cpp +++ b/eden/fs/store/LocalStore.cpp @@ -170,7 +170,7 @@ folly::Future> LocalStore::getBatch( folly::Future> LocalStore::getTree(const Hash& id) const { return getFuture(KeySpace::TreeFamily, id.getBytes()) - .then([id](StoreResult&& data) { + .thenValue([id](StoreResult&& data) { if (!data.isValid()) { return std::unique_ptr(nullptr); } @@ -180,7 +180,7 @@ folly::Future> LocalStore::getTree(const Hash& id) const { folly::Future> LocalStore::getBlob(const Hash& id) const { return getFuture(KeySpace::BlobFamily, id.getBytes()) - .then([id](StoreResult&& data) { + .thenValue([id](StoreResult&& data) { if (!data.isValid()) { return std::unique_ptr(nullptr); } @@ -192,7 +192,7 @@ folly::Future> LocalStore::getBlob(const Hash& id) const { folly::Future> LocalStore::getBlobMetadata( const Hash& id) const { return getFuture(KeySpace::BlobMetaDataFamily, id.getBytes()) - .then([id](StoreResult&& data) -> Optional { + .thenValue([id](StoreResult&& data) -> Optional { if (!data.isValid()) { return folly::none; } else { diff --git a/eden/fs/store/ObjectStore.cpp b/eden/fs/store/ObjectStore.cpp index 3d6a64cf53..44e9dc7c8b 100644 --- a/eden/fs/store/ObjectStore.cpp +++ b/eden/fs/store/ObjectStore.cpp @@ -64,7 +64,7 @@ Future> ObjectStore::getTree(const Hash& id) const { // this layer. // Load the tree from the BackingStore. - return backingStore->getTree(id).then( + return backingStore->getTree(id).thenValue( [id](unique_ptr loadedTree) { if (!loadedTree) { // TODO: Perhaps we should do some short-term negative caching? @@ -142,7 +142,7 @@ Future> ObjectStore::getTreeForCommit( const Hash& commitID) const { XLOG(DBG3) << "getTreeForCommit(" << commitID << ")"; - return backingStore_->getTreeForCommit(commitID).then( + return backingStore_->getTreeForCommit(commitID).thenValue( [commitID](std::shared_ptr tree) { if (!tree) { throw std::domain_error(folly::to( diff --git a/eden/fs/store/git/GitBackingStore.cpp b/eden/fs/store/git/GitBackingStore.cpp index 1e3711f90a..e6539bb97f 100644 --- a/eden/fs/store/git/GitBackingStore.cpp +++ b/eden/fs/store/git/GitBackingStore.cpp @@ -177,7 +177,7 @@ Future> GitBackingStore::getTreeForCommit( Hash treeID = oid2Hash(git_commit_tree_id(commit)); // Now get the specified tree. - return localStore_->getTree(treeID).then( + return localStore_->getTree(treeID).thenValue( [this, treeID](unique_ptr tree) { if (tree) { return tree; diff --git a/eden/fs/store/hg/HgBackingStore.cpp b/eden/fs/store/hg/HgBackingStore.cpp index ad3222f7bb..f1e0c25730 100644 --- a/eden/fs/store/hg/HgBackingStore.cpp +++ b/eden/fs/store/hg/HgBackingStore.cpp @@ -168,7 +168,7 @@ folly::Future HgBackingStore::prefetchBlobs( const std::vector& ids) const { return HgProxyHash::getBatch(localStore_, ids) .via(importThreadPool_.get()) - .then([](std::vector>&& hgPathHashes) { + .thenValue([](std::vector>&& hgPathHashes) { return getThreadLocalImporter().prefetchFiles(hgPathHashes); }) .via(serverThreadPool_); @@ -185,7 +185,7 @@ folly::Future> HgBackingStore::getTreeForCommitImpl( const Hash& commitID) { return localStore_ ->getFuture(KeySpace::HgCommitToTreeFamily, commitID.getBytes()) - .then( + .thenValue( [this, commitID](StoreResult result) -> folly::Future> { if (!result.isValid()) { @@ -197,7 +197,7 @@ folly::Future> HgBackingStore::getTreeForCommitImpl( << " for mercurial commit " << commitID.toString(); return localStore_->getTree(rootTreeHash) - .then( + .thenValue( [this, rootTreeHash, commitID](std::unique_ptr tree) -> folly::Future> { if (tree) {