From: Tobias Ulmer Date: Fri, 6 Dec 2013 13:33:22 +0000 (+0100) Subject: Add workdir argument to svn_tool() and use it X-Git-Tag: e2factory-2.3.15rc1~299 X-Git-Url: https://git.e2factory.org/?a=commitdiff_plain;h=e586b296de930601ea5a789475e8d437983848d8;p=e2factory.git Add workdir argument to svn_tool() and use it Signed-off-by: Tobias Ulmer --- diff --git a/plugins/svn.lua b/plugins/svn.lua index d5f686f..d97124d 100644 --- a/plugins/svn.lua +++ b/plugins/svn.lua @@ -75,6 +75,7 @@ end --- Call the svn command. -- @param argv table: vector with arguments for svn +-- @param workdir Directory where svn command starts executing (optional). -- @return True on success, false on error or when svn returned with exit -- status other than 0. -- @return Error object on failure. @@ -427,12 +428,8 @@ function svn.update(info, sourcename) end local e = err.new("updating source '%s' failed", sourcename) local src = info.sources[ sourcename ] - local working = e2lib.join(info.root, src.working) - rc, re = e2lib.chdir(working) - if not rc then - return false, e:cat(re) - end - rc, re = svn_tool({ "update", }) + local workdir = e2lib.join(info.root, src.working) + rc, re = svn_tool({ "update" }, workdir) if not rc then return false, e:cat(re) end