aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/binary-cache-store.cc
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2016-11-26 00:37:43 +0100
committerEelco Dolstra <edolstra@gmail.com>2016-11-26 00:38:01 +0100
commit215b70f51e5abd350c9b7db656aedac9d96d0046 (patch)
tree95778448ecdfbc1d8f4c254813cc5d91ed62a832 /src/libstore/binary-cache-store.cc
parentf78126bfd6b6c8477fcdbc09b2f98772dbe9a1e7 (diff)
Revert "Get rid of unicode quotes (#1140)"
This reverts commit f78126bfd6b6c8477fcdbc09b2f98772dbe9a1e7. There really is no need for such a massive change...
Diffstat (limited to 'src/libstore/binary-cache-store.cc')
-rw-r--r--src/libstore/binary-cache-store.cc18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/libstore/binary-cache-store.cc b/src/libstore/binary-cache-store.cc
index 34a73f002..3e07a2aa2 100644
--- a/src/libstore/binary-cache-store.cc
+++ b/src/libstore/binary-cache-store.cc
@@ -39,7 +39,7 @@ struct BinaryCacheStoreAccessor : public FSAccessor
std::string restPath = std::string(path, storePath.size());
if (!store->isValidPath(storePath))
- throw InvalidPath(format("path '%1%' is not a valid store path") % storePath);
+ throw InvalidPath(format("path ‘%1%’ is not a valid store path") % storePath);
auto i = nars.find(storePath);
if (i != nars.end()) return {i->second, restPath};
@@ -106,7 +106,7 @@ void BinaryCacheStore::init()
auto value = trim(line.substr(colon + 1, std::string::npos));
if (name == "StoreDir") {
if (value != storeDir)
- throw Error(format("binary cache '%s' is for Nix stores with prefix '%s', not '%s'")
+ throw Error(format("binary cache ‘%s’ is for Nix stores with prefix ‘%s’, not ‘%s’")
% getUri() % value % storeDir);
} else if (name == "WantMassQuery") {
wantMassQuery_ = value == "1";
@@ -153,7 +153,7 @@ void BinaryCacheStore::addToStore(const ValidPathInfo & info, const ref<std::str
if (ref != info.path)
queryPathInfo(ref);
} catch (InvalidPath &) {
- throw Error(format("cannot add '%s' to the binary cache because the reference '%s' is not valid")
+ throw Error(format("cannot add ‘%s’ to the binary cache because the reference ‘%s’ is not valid")
% info.path % ref);
}
@@ -167,7 +167,7 @@ void BinaryCacheStore::addToStore(const ValidPathInfo & info, const ref<std::str
narInfo->narHash = hashString(htSHA256, *nar);
if (info.narHash && info.narHash != narInfo->narHash)
- throw Error(format("refusing to copy corrupted path '%1%' to binary cache") % info.path);
+ throw Error(format("refusing to copy corrupted path ‘%1%’ to binary cache") % info.path);
auto accessor_ = std::dynamic_pointer_cast<BinaryCacheStoreAccessor>(accessor);
@@ -241,7 +241,7 @@ void BinaryCacheStore::addToStore(const ValidPathInfo & info, const ref<std::str
narInfo->fileSize = narCompressed->size();
auto duration = std::chrono::duration_cast<std::chrono::milliseconds>(now2 - now1).count();
- printMsg(lvlTalkative, format("copying path '%1%' (%2% bytes, compressed %3$.1f%% in %4% ms) to binary cache")
+ printMsg(lvlTalkative, format("copying path ‘%1%’ (%2% bytes, compressed %3$.1f%% in %4% ms) to binary cache")
% narInfo->path % narInfo->narSize
% ((1.0 - (double) narCompressed->size() / nar->size()) * 100.0)
% duration);
@@ -282,7 +282,7 @@ void BinaryCacheStore::addToStore(const ValidPathInfo & info, const ref<std::str
bool BinaryCacheStore::isValidPathUncached(const Path & storePath)
{
// FIXME: this only checks whether a .narinfo with a matching hash
- // part exists. So 'f4kb...-foo' matches 'f4kb...-bar', even
+ // part exists. So ‘f4kb...-foo’ matches ‘f4kb...-bar’, even
// though they shouldn't. Not easily fixed.
return fileExists(narInfoFileFor(storePath));
}
@@ -293,7 +293,7 @@ void BinaryCacheStore::narFromPath(const Path & storePath, Sink & sink)
auto nar = getFile(info->url);
- if (!nar) throw Error(format("file '%s' missing from binary cache") % info->url);
+ if (!nar) throw Error(format("file ‘%s’ missing from binary cache") % info->url);
stats.narRead++;
stats.narReadCompressedBytes += nar->size();
@@ -303,13 +303,13 @@ void BinaryCacheStore::narFromPath(const Path & storePath, Sink & sink)
try {
nar = decompress(info->compression, *nar);
} catch (UnknownCompressionMethod &) {
- throw Error(format("binary cache path '%s' uses unknown compression method '%s'")
+ throw Error(format("binary cache path ‘%s’ uses unknown compression method ‘%s’")
% storePath % info->compression);
}
stats.narReadBytes += nar->size();
- printMsg(lvlTalkative, format("exporting path '%1%' (%2% bytes)") % storePath % nar->size());
+ printMsg(lvlTalkative, format("exporting path ‘%1%’ (%2% bytes)") % storePath % nar->size());
assert(nar->size() % 8 == 0);