1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-28 22:01:15 +02:00

copyPaths(): Use queryValidPaths() to reduce SSH latency

This commit is contained in:
Eelco Dolstra 2017-03-16 13:50:01 +01:00
parent 91d67692cf
commit c5b83d8913
No known key found for this signature in database
GPG key ID: 8170B4726D7198DE
10 changed files with 45 additions and 37 deletions

View file

@ -324,8 +324,10 @@ protected:
public:
/* Query which of the given paths is valid. */
virtual PathSet queryValidPaths(const PathSet & paths);
/* Query which of the given paths is valid. Optionally, try to
substitute missing paths. */
virtual PathSet queryValidPaths(const PathSet & paths,
bool maybeSubstitute = false);
/* Query the set of all valid paths. Note that for some store
backends, the name part of store paths may be omitted
@ -653,7 +655,7 @@ ref<Store> openStore(const std::string & uri = getEnv("NIX_REMOTE"));
ref<Store> openStore(const std::string & uri, const Store::Params & params);
void copyPaths(ref<Store> from, ref<Store> to, const Paths & storePaths, bool substitute = false);
void copyPaths(ref<Store> from, ref<Store> to, const PathSet & storePaths, bool substitute = false);
enum StoreType {
tDaemon,