diff options
author | Eelco Dolstra <e.dolstra@tudelft.nl> | 2010-11-17T12·08+0000 |
---|---|---|
committer | Eelco Dolstra <e.dolstra@tudelft.nl> | 2010-11-17T12·08+0000 |
commit | 1db6259076b1b8f667451da8d2e44a55ece19056 (patch) | |
tree | 38a730f554924b1186514b5e8ed787cf967bd0c0 /src/libstore/remote-store.cc | |
parent | a3883cbd28057a3dd2573f77dcda9a26faaac555 (diff) |
* Implement RemoteStore::queryPathInfo().
Diffstat (limited to 'src/libstore/remote-store.cc')
-rw-r--r-- | src/libstore/remote-store.cc | 14 |
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; } |