diff options
author | John Ericson <John.Ericson@Obsidian.Systems> | 2020-06-18 22:09:22 +0000 |
---|---|---|
committer | John Ericson <John.Ericson@Obsidian.Systems> | 2020-06-18 22:11:26 +0000 |
commit | 15abb2aa2ba7de06a86e05511f81633616e17d87 (patch) | |
tree | 077cb0b6fe627e04aee10c93ed45f402996ebe70 /src/libstore/export-import.cc | |
parent | bbbf3602a323538b8da38f1a2c7ce136a20f74c6 (diff) |
Revert the `enum struct` change
Not a regular git revert as there have been many merges and things.
Diffstat (limited to 'src/libstore/export-import.cc')
-rw-r--r-- | src/libstore/export-import.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/libstore/export-import.cc b/src/libstore/export-import.cc index f948d0f9a..57b7e9590 100644 --- a/src/libstore/export-import.cc +++ b/src/libstore/export-import.cc @@ -11,7 +11,7 @@ struct HashAndWriteSink : Sink { Sink & writeSink; HashSink hashSink; - HashAndWriteSink(Sink & writeSink) : writeSink(writeSink), hashSink(HashType::SHA256) + HashAndWriteSink(Sink & writeSink) : writeSink(writeSink), hashSink(htSHA256) { } virtual void operator () (const unsigned char * data, size_t len) @@ -34,7 +34,7 @@ void Store::exportPaths(const StorePathSet & paths, Sink & sink) //logger->incExpected(doneLabel, sorted.size()); for (auto & path : sorted) { - //Activity act(*logger, Verbosity::Info, format("exporting path '%s'") % path); + //Activity act(*logger, lvlInfo, format("exporting path '%s'") % path); sink << 1; exportPath(path, sink); //logger->incProgress(doneLabel); @@ -57,7 +57,7 @@ void Store::exportPath(const StorePath & path, Sink & sink) Hash hash = hashAndWriteSink.currentHash(); if (hash != info->narHash && info->narHash != Hash(*info->narHash.type)) throw Error("hash of path '%s' has changed from '%s' to '%s'!", - printStorePath(path), info->narHash.to_string(Base::Base32, true), hash.to_string(Base::Base32, true)); + printStorePath(path), info->narHash.to_string(Base32, true), hash.to_string(Base32, true)); hashAndWriteSink << exportMagic @@ -86,7 +86,7 @@ StorePaths Store::importPaths(Source & source, std::shared_ptr<FSAccessor> acces ValidPathInfo info(parseStorePath(readString(source))); - //Activity act(*logger, Verbosity::Info, format("importing path '%s'") % info.path); + //Activity act(*logger, lvlInfo, format("importing path '%s'") % info.path); info.references = readStorePaths<StorePathSet>(*this, source); @@ -94,7 +94,7 @@ StorePaths Store::importPaths(Source & source, std::shared_ptr<FSAccessor> acces if (deriver != "") info.deriver = parseStorePath(deriver); - info.narHash = hashString(HashType::SHA256, *tee.source.data); + info.narHash = hashString(htSHA256, *tee.source.data); info.narSize = tee.source.data->size(); // Ignore optional legacy signature. |