aboutsummaryrefslogtreecommitdiff
path: root/src/libfetchers/mercurial.cc
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2022-03-01 01:29:34 +0000
committerJohn Ericson <John.Ericson@Obsidian.Systems>2022-03-01 01:39:25 +0000
commitea71da395fe23fc0b4adb6fe5075742441e8baf8 (patch)
tree87a6b57e5b031e66db781fc7c5bc97facb7584d2 /src/libfetchers/mercurial.cc
parent1c985428c4783568bcfb4692c6ce816eb5c5c31d (diff)
Move some stuff from `Settings` to a new `FetchSettings`.
Starting work on #5638 The exact boundary between `FetchSettings` and `EvalSettings` is not clear to me, but that's fine. First lets clean out `libstore`, and then worry about what, if anything, should be the separation between those two.
Diffstat (limited to 'src/libfetchers/mercurial.cc')
-rw-r--r--src/libfetchers/mercurial.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/libfetchers/mercurial.cc b/src/libfetchers/mercurial.cc
index 12cdecbc1..8b82e9daa 100644
--- a/src/libfetchers/mercurial.cc
+++ b/src/libfetchers/mercurial.cc
@@ -5,6 +5,8 @@
#include "store-api.hh"
#include "url-parts.hh"
+#include "fetch-settings.hh"
+
#include <sys/time.h>
using namespace std::string_literals;
@@ -165,10 +167,10 @@ struct MercurialInputScheme : InputScheme
/* This is an unclean working tree. So copy all tracked
files. */
- if (!settings.allowDirty)
+ if (!fetchSettings.allowDirty)
throw Error("Mercurial tree '%s' is unclean", actualUrl);
- if (settings.warnDirty)
+ if (fetchSettings.warnDirty)
warn("Mercurial tree '%s' is unclean", actualUrl);
input.attrs.insert_or_assign("ref", chomp(runHg({ "branch", "-R", actualUrl })));