From 42e035434e0a3e37d9d10c6eeb0757b5319875f4 Mon Sep 17 00:00:00 2001 From: Tobias Ulmer Date: Thu, 3 Nov 2016 18:11:22 +0100 Subject: [PATCH] create-project: if required, enable writeback and warn about it It should deny working at all, but for now just have a warning. Signed-off-by: Tobias Ulmer --- global/e2-create-project.lua | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/global/e2-create-project.lua b/global/e2-create-project.lua index b93ff67..733f52d 100644 --- a/global/e2-create-project.lua +++ b/global/e2-create-project.lua @@ -136,6 +136,15 @@ local function e2_create_project(arg) error(e:cat(re)) end + if not cache.writeback_enabled(scache, sl.server) then + e2lib.warnf("WOTHER", "enabling writeback for server: %s", + sl.server) + rc, re = cache.set_writeback(scache, sl.server, true) + if not rc then + error(e:cat(re)) + end + end + local p = {} p.version = buildconfig.GLOBAL_INTERFACE_VERSION[1] -- the project version p.e2version = string.format("%s %s", @@ -176,7 +185,7 @@ local function e2_create_project(arg) end flocation = e2lib.join(p.location, f.filename) - rc, re = cache.push_file(scache, sourcefile, p.server, flocation, {}) + rc, re = cache.push_file(scache, sourcefile, p.server, flocation) if not rc then error(e:cat(re)) end -- 2.39.5