about summary refs log tree commit diff
path: root/src/libstore/remote-store.cc
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2010-11-17T12·08+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2010-11-17T12·08+0000
commit1db6259076b1b8f667451da8d2e44a55ece19056 (patch)
tree38a730f554924b1186514b5e8ed787cf967bd0c0 /src/libstore/remote-store.cc
parenta3883cbd28057a3dd2573f77dcda9a26faaac555 (diff)
* Implement RemoteStore::queryPathInfo().
Diffstat (limited to 'src/libstore/remote-store.cc')
-rw-r--r--src/libstore/remote-store.cc14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/libstore/remote-store.cc b/src/libstore/remote-store.cc
index 517c886b4f9b..08969a623d14 100644
--- a/src/libstore/remote-store.cc
+++ b/src/libstore/remote-store.cc
@@ -249,7 +249,19 @@ bool RemoteStore::querySubstitutablePathInfo(const Path & path,
 
 ValidPathInfo RemoteStore::queryPathInfo(const Path & path)
 {
-    throw Error("not implemented");
+    openConnection();
+    writeInt(wopQueryPathInfo, to);
+    writeString(path, to);
+    processStderr();
+    ValidPathInfo info;
+    info.path = path;
+    info.deriver = readString(from);
+    if (info.deriver != "") assertStorePath(info.deriver);
+    info.hash = parseHash(htSHA256, readString(from));
+    info.references = readStorePaths(from);
+    info.registrationTime = readInt(from);
+    info.narSize = readLongLong(from);
+    return info;
 }