From 167d12b02cc8cadfaf7c28959532030d65687a8f Mon Sep 17 00:00:00 2001 From: Shea Levy Date: Mon, 18 Jul 2016 18:50:27 -0400 Subject: build-remote: Implement in C++ --- src/nix/copy.cc | 28 +--------------------------- 1 file changed, 1 insertion(+), 27 deletions(-) (limited to 'src/nix') diff --git a/src/nix/copy.cc b/src/nix/copy.cc index e8317dc393fd..976b0d3e0b81 100644 --- a/src/nix/copy.cc +++ b/src/nix/copy.cc @@ -46,33 +46,7 @@ struct CmdCopy : StorePathsCommand ref srcStore = srcUri.empty() ? store : openStore(srcUri); ref dstStore = dstUri.empty() ? store : openStore(dstUri); - std::string copiedLabel = "copied"; - - logger->setExpected(copiedLabel, storePaths.size()); - - ThreadPool pool; - - processGraph(pool, - PathSet(storePaths.begin(), storePaths.end()), - - [&](const Path & storePath) { - return srcStore->queryPathInfo(storePath)->references; - }, - - [&](const Path & storePath) { - checkInterrupt(); - - if (!dstStore->isValidPath(storePath)) { - Activity act(*logger, lvlInfo, format("copying ā€˜%sā€™...") % storePath); - - copyStorePath(srcStore, dstStore, storePath); - - logger->incProgress(copiedLabel); - } else - logger->incExpected(copiedLabel, -1); - }); - - pool.process(); + copyPaths(srcStore, dstStore, storePaths); } }; -- cgit 1.4.1