diff options
author | John Ericson <John.Ericson@Obsidian.Systems> | 2020-06-18 23:01:58 +0000 |
---|---|---|
committer | John Ericson <John.Ericson@Obsidian.Systems> | 2020-06-18 23:01:58 +0000 |
commit | 3f8dcfe3fd8372ee8fc1b3233c7e9982d1a6915d (patch) | |
tree | 5a104db035aede46168326978dd3bc387f9e49a7 /src/libfetchers/mercurial.cc | |
parent | d614166cb6864f2448b9e03f8dccccf301dc541e (diff) | |
parent | 669c3992e883414269d850bba5f00c59a1b207d0 (diff) |
Merge branch 'validPathInfo-temp' into validPathInfo-ca-proper-datatype
Diffstat (limited to 'src/libfetchers/mercurial.cc')
-rw-r--r-- | src/libfetchers/mercurial.cc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/libfetchers/mercurial.cc b/src/libfetchers/mercurial.cc index feffc48d6..2e0d4bf4d 100644 --- a/src/libfetchers/mercurial.cc +++ b/src/libfetchers/mercurial.cc @@ -114,7 +114,7 @@ struct MercurialInput : Input return files.count(file); }; - auto storePath = store->addToStore("source", actualUrl, FileIngestionMethod::Recursive, HashType::SHA256, filter); + auto storePath = store->addToStore("source", actualUrl, FileIngestionMethod::Recursive, htSHA256, filter); return {Tree { .actualPath = store->printStorePath(storePath), @@ -167,14 +167,14 @@ struct MercurialInput : Input }); if (auto res = getCache()->lookup(store, mutableAttrs)) { - auto rev2 = Hash(getStrAttr(res->first, "rev"), HashType::SHA1); + auto rev2 = Hash(getStrAttr(res->first, "rev"), htSHA1); if (!rev || rev == rev2) { input->rev = rev2; return makeResult(res->first, std::move(res->second)); } } - Path cacheDir = fmt("%s/nix/hg/%s", getCacheDir(), hashString(HashType::SHA256, actualUrl).to_string(Base::Base32, false)); + Path cacheDir = fmt("%s/nix/hg/%s", getCacheDir(), hashString(htSHA256, actualUrl).to_string(Base32, false)); /* If this is a commit hash that we already have, we don't have to pull again. */ @@ -184,7 +184,7 @@ struct MercurialInput : Input RunOptions("hg", { "log", "-R", cacheDir, "-r", input->rev->gitRev(), "--template", "1" }) .killStderr(true)).second == "1")) { - Activity act(*logger, Verbosity::Talkative, ActivityType::Unknown, fmt("fetching Mercurial repository '%s'", actualUrl)); + Activity act(*logger, lvlTalkative, actUnknown, fmt("fetching Mercurial repository '%s'", actualUrl)); if (pathExists(cacheDir)) { try { @@ -210,7 +210,7 @@ struct MercurialInput : Input runProgram("hg", true, { "log", "-R", cacheDir, "-r", revOrRef, "--template", "{node} {rev} {branch}" })); assert(tokens.size() == 3); - input->rev = Hash(tokens[0], HashType::SHA1); + input->rev = Hash(tokens[0], htSHA1); auto revCount = std::stoull(tokens[1]); input->ref = tokens[2]; @@ -293,7 +293,7 @@ struct MercurialInputScheme : InputScheme input->ref = *ref; } if (auto rev = maybeGetStrAttr(attrs, "rev")) - input->rev = Hash(*rev, HashType::SHA1); + input->rev = Hash(*rev, htSHA1); return input; } }; |