about summary refs log tree commit diff
path: root/src/libstore/remote-store.cc
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2012-07-18T14·47-0400
committerEelco Dolstra <eelco.dolstra@logicblox.com>2012-07-18T14·47-0400
commitfe241ece2932492866693d268d02a7912e766ac7 (patch)
tree2cb24a4d45f563e32946bf34d878969bd05263ec /src/libstore/remote-store.cc
parenta6f348599c94d8a5f7b41c7d8e43658dc6407be7 (diff)
parentccc52adfb2121ade510d35dc9b91193af9fa731e (diff)
Merge branch 'master' into no-manifests
Diffstat (limited to 'src/libstore/remote-store.cc')
-rw-r--r--src/libstore/remote-store.cc12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/libstore/remote-store.cc b/src/libstore/remote-store.cc
index 2232720c2bfd..35530acab1af 100644
--- a/src/libstore/remote-store.cc
+++ b/src/libstore/remote-store.cc
@@ -395,6 +395,18 @@ PathSet RemoteStore::queryDerivationOutputNames(const Path & path)
 }
 
 
+Path RemoteStore::queryPathFromHashPart(const string & hashPart)
+{
+    openConnection();
+    writeInt(wopQueryPathFromHashPart, to);
+    writeString(hashPart, to);
+    processStderr();
+    Path path = readString(from);
+    if (!path.empty()) assertStorePath(path);
+    return path;
+}
+
+
 Path RemoteStore::addToStore(const Path & _srcPath,
     bool recursive, HashType hashAlgo, PathFilter & filter)
 {