mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-24 14:56:15 +02:00
Remove Input::hasAllInfo()
This commit is contained in:
parent
90e9f50a66
commit
3b45475f75
8 changed files with 0 additions and 52 deletions
|
@ -101,11 +101,6 @@ std::optional<CanonPath> Input::isRelative() const
|
||||||
return scheme->isRelative(*this);
|
return scheme->isRelative(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Input::hasAllInfo() const
|
|
||||||
{
|
|
||||||
return getNarHash() && scheme && scheme->hasAllInfo(*this);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool Input::operator ==(const Input & other) const
|
bool Input::operator ==(const Input & other) const
|
||||||
{
|
{
|
||||||
return attrs == other.attrs;
|
return attrs == other.attrs;
|
||||||
|
@ -170,11 +165,6 @@ void Input::checkLocks(Input & input) const
|
||||||
throw Error("'revCount' attribute mismatch in input '%s', expected %d",
|
throw Error("'revCount' attribute mismatch in input '%s', expected %d",
|
||||||
input.to_string(), *prevRevCount);
|
input.to_string(), *prevRevCount);
|
||||||
}
|
}
|
||||||
|
|
||||||
// FIXME
|
|
||||||
#if 0
|
|
||||||
assert(input.hasAllInfo());
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
std::pair<ref<InputAccessor>, Input> Input::getAccessor(ref<Store> store) const
|
std::pair<ref<InputAccessor>, Input> Input::getAccessor(ref<Store> store) const
|
||||||
|
|
|
@ -55,8 +55,6 @@ public:
|
||||||
relative path, i.e. './foo'. */
|
relative path, i.e. './foo'. */
|
||||||
std::optional<CanonPath> isRelative() const;
|
std::optional<CanonPath> isRelative() const;
|
||||||
|
|
||||||
bool hasAllInfo() const;
|
|
||||||
|
|
||||||
bool operator ==(const Input & other) const;
|
bool operator ==(const Input & other) const;
|
||||||
|
|
||||||
bool contains(const Input & other) const;
|
bool contains(const Input & other) const;
|
||||||
|
@ -119,8 +117,6 @@ struct InputScheme
|
||||||
|
|
||||||
virtual ParsedURL toURL(const Input & input) const;
|
virtual ParsedURL toURL(const Input & input) const;
|
||||||
|
|
||||||
virtual bool hasAllInfo(const Input & input) const = 0;
|
|
||||||
|
|
||||||
virtual Input applyOverrides(
|
virtual Input applyOverrides(
|
||||||
const Input & input,
|
const Input & input,
|
||||||
std::optional<std::string> ref,
|
std::optional<std::string> ref,
|
||||||
|
|
|
@ -204,15 +204,6 @@ struct GitInputScheme : InputScheme
|
||||||
return url;
|
return url;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool hasAllInfo(const Input & input) const override
|
|
||||||
{
|
|
||||||
bool maybeDirty = !input.getRef();
|
|
||||||
bool shallow = maybeGetBoolAttr(input.attrs, "shallow").value_or(false);
|
|
||||||
return
|
|
||||||
maybeGetIntAttr(input.attrs, "lastModified")
|
|
||||||
&& (shallow || maybeDirty || maybeGetIntAttr(input.attrs, "revCount"));
|
|
||||||
}
|
|
||||||
|
|
||||||
Input applyOverrides(
|
Input applyOverrides(
|
||||||
const Input & input,
|
const Input & input,
|
||||||
std::optional<std::string> ref,
|
std::optional<std::string> ref,
|
||||||
|
|
|
@ -134,13 +134,6 @@ struct GitArchiveInputScheme : InputScheme
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
bool hasAllInfo(const Input & input) const override
|
|
||||||
{
|
|
||||||
return input.getRev() &&
|
|
||||||
true; // FIXME
|
|
||||||
//maybeGetIntAttr(input.attrs, "lastModified");
|
|
||||||
}
|
|
||||||
|
|
||||||
Input applyOverrides(
|
Input applyOverrides(
|
||||||
const Input & _input,
|
const Input & _input,
|
||||||
std::optional<std::string> ref,
|
std::optional<std::string> ref,
|
||||||
|
|
|
@ -76,11 +76,6 @@ struct IndirectInputScheme : InputScheme
|
||||||
return url;
|
return url;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool hasAllInfo(const Input & input) const override
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
Input applyOverrides(
|
Input applyOverrides(
|
||||||
const Input & _input,
|
const Input & _input,
|
||||||
std::optional<std::string> ref,
|
std::optional<std::string> ref,
|
||||||
|
|
|
@ -98,13 +98,6 @@ struct MercurialInputScheme : InputScheme
|
||||||
return url;
|
return url;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool hasAllInfo(const Input & input) const override
|
|
||||||
{
|
|
||||||
// FIXME: ugly, need to distinguish between dirty and clean
|
|
||||||
// default trees.
|
|
||||||
return input.getRef() == "default" || maybeGetIntAttr(input.attrs, "revCount");
|
|
||||||
}
|
|
||||||
|
|
||||||
Input applyOverrides(
|
Input applyOverrides(
|
||||||
const Input & input,
|
const Input & input,
|
||||||
std::optional<std::string> ref,
|
std::optional<std::string> ref,
|
||||||
|
|
|
@ -84,11 +84,6 @@ struct PathInputScheme : InputScheme
|
||||||
return (bool) input.getNarHash();
|
return (bool) input.getNarHash();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool hasAllInfo(const Input & input) const override
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
void putFile(
|
void putFile(
|
||||||
const Input & input,
|
const Input & input,
|
||||||
const CanonPath & path,
|
const CanonPath & path,
|
||||||
|
|
|
@ -232,11 +232,6 @@ struct CurlInputScheme : InputScheme
|
||||||
return url;
|
return url;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool hasAllInfo(const Input & input) const override
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool isLocked(const Input & input) const override
|
bool isLocked(const Input & input) const override
|
||||||
{
|
{
|
||||||
return (bool) input.getNarHash();
|
return (bool) input.getNarHash();
|
||||||
|
|
Loading…
Reference in a new issue