mirror of
https://github.com/NixOS/nix
synced 2025-07-07 01:51:47 +02:00
Add Mercurial tests
This commit is contained in:
parent
cc22cf662b
commit
5046233b5a
3 changed files with 69 additions and 6 deletions
|
@ -509,7 +509,14 @@ LockedFlake lockFlake(
|
|||
if (settings.warnDirty)
|
||||
warn("will not write lock file of flake '%s' because it has a mutable input", topRef);
|
||||
} else {
|
||||
newLockFile.write(*sourcePath + (topRef.subdir == "" ? "" : "/" + topRef.subdir) + "/flake.lock");
|
||||
auto path = *sourcePath + (topRef.subdir == "" ? "" : "/" + topRef.subdir) + "/flake.lock";
|
||||
|
||||
if (pathExists(path))
|
||||
warn("updating lock file '%s'", path);
|
||||
else
|
||||
warn("creating lock file '%s'", path);
|
||||
|
||||
newLockFile.write(path);
|
||||
|
||||
// FIXME: rewriting the lockfile changed the
|
||||
// top-level repo, so we should re-read it.
|
||||
|
|
|
@ -89,6 +89,8 @@ struct MercurialInput : Input
|
|||
|
||||
// FIXME: return lastModified.
|
||||
|
||||
// FIXME: don't clone local repositories.
|
||||
|
||||
if (!input->ref && !input->rev && isLocal && pathExists(actualUrl + "/.hg")) {
|
||||
|
||||
bool clean = runProgram("hg", true, { "status", "-R", actualUrl, "--modified", "--added", "--removed" }) == "";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue