From e586b296de930601ea5a789475e8d437983848d8 Mon Sep 17 00:00:00 2001 From: Tobias Ulmer Date: Fri, 6 Dec 2013 14:33:22 +0100 Subject: [PATCH] Add workdir argument to svn_tool() and use it Signed-off-by: Tobias Ulmer --- plugins/svn.lua | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) 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 -- 2.39.5