about summary refs log tree commit diff
path: root/src/nix
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2017-01-19T17·21+0100
committerGitHub <noreply@github.com>2017-01-19T17·21+0100
commit8af062f372ae5db6a90700641f15d98505b4a839 (patch)
tree1c4f61be3cca82b3a03255557d9e5f3d87107018 /src/nix
parent21948deed99a3295e4d5666e027a6ca42dc00b40 (diff)
parent28db29786277ce6790ffb1567f9e679c62737b96 (diff)
Merge pull request #981 from shlevy/build-remote-c++
build-remote: Implement in C++
Diffstat (limited to 'src/nix')
-rw-r--r--src/nix/copy.cc28
1 files changed, 1 insertions, 27 deletions
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<Store> srcStore = srcUri.empty() ? store : openStore(srcUri);
         ref<Store> dstStore = dstUri.empty() ? store : openStore(dstUri);
 
-        std::string copiedLabel = "copied";
-
-        logger->setExpected(copiedLabel, storePaths.size());
-
-        ThreadPool pool;
-
-        processGraph<Path>(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);
     }
 };