summaryrefslogtreecommitdiffstats
path: root/acfupdate-model.lua
diff options
context:
space:
mode:
Diffstat (limited to 'acfupdate-model.lua')
-rw-r--r--acfupdate-model.lua44
1 files changed, 41 insertions, 3 deletions
diff --git a/acfupdate-model.lua b/acfupdate-model.lua
index 88c819e..7923c01 100644
--- a/acfupdate-model.lua
+++ b/acfupdate-model.lua
@@ -29,11 +29,11 @@ update = function (self)
for list in string.gmatch((querycmd("/usr/bin/svn list " .. svnurl )), "%S+") do
local updateresult = ""
if (list == "core/") then
- updateresult = querycmd("/usr/bin/svn up /usr/share/acf/")
+ updateresult = querycmd("/usr/bin/svn up /usr/share/acf/ 2>&1")
elseif ( fs.is_dir("/usr/share/acf/app/" .. list)) then
- updateresult = querycmd("/usr/bin/svn up /usr/share/acf/app/" .. list)
+ updateresult = querycmd("/usr/bin/svn up /usr/share/acf/app/" .. list .. " 2>&1")
elseif (list ~= "sandbox/") then
- updateresult = querycmd("/usr/bin/svn co " .. svnurl .. list .."trunk/ /usr/share/acf/app/" .. list)
+ updateresult = querycmd("/usr/bin/svn co " .. svnurl .. list .."trunk/ /usr/share/acf/app/" .. list .. " 2>&1")
end
-- Hide projects without updates
if (string.match(updateresult, "^At revision.*")) then updateresult = "" end
@@ -42,3 +42,41 @@ update = function (self)
updates.cmdresult = cmdresult
return updates
end
+
+diffs = function (self)
+ local svnurl = "svn://svn.alpinelinux.org/acf/"
+ local updates = {}
+ local cmdresult = {}
+ updates.svnurl = svnurl
+ for list in string.gmatch((querycmd("/usr/bin/svn list " .. svnurl )), "%S+") do
+ local updateresult = ""
+ if (list == "core/") then
+ updateresult = querycmd("/usr/bin/svn diff /usr/share/acf/ 2>&1")
+ elseif ( fs.is_dir("/usr/share/acf/app/" .. list)) then
+ updateresult = querycmd("/usr/bin/svn diff /usr/share/acf/app/" .. list .. " 2>&1")
+ end
+ table.insert(cmdresult, {name=list, updates=updateresult})
+ end
+ updates.cmdresult = cmdresult
+ return updates
+end
+
+status = function (self)
+ local svnurl = "svn://svn.alpinelinux.org/acf/"
+ local updates = {}
+ local cmdresult = {}
+ updates.svnurl = svnurl
+ for list in string.gmatch((querycmd("/usr/bin/svn list " .. svnurl )), "%S+") do
+ local updateresult = ""
+ if (list == "core/") then
+ updateresult = querycmd("/usr/bin/svn st -u /usr/share/acf/ 2>&1")
+ elseif ( fs.is_dir("/usr/share/acf/app/" .. list)) then
+ updateresult = querycmd("/usr/bin/svn st -u /usr/share/acf/app/" .. list .. " 2>&1")
+ end
+ -- Hide projects without diffs
+ if (string.match(updateresult, "^Status against revision.*")) then updateresult = "" end
+ table.insert(cmdresult, {name=list, updates=updateresult})
+ end
+ updates.cmdresult = cmdresult
+ return updates
+end