From 09f7e1155da35b0462596eb72aa982ca72f0826d Mon Sep 17 00:00:00 2001 From: Mika Havela Date: Fri, 25 Jan 2008 15:03:25 +0000 Subject: Now you can look at svn log 1 week back in time. git-svn-id: svn://svn.alpinelinux.org/acf/devtools/trunk@651 ab2d0c66-481e-0410-8bed-d214d4d58bed --- acfupdate-controller.lua | 4 ++++ acfupdate-html.lsp | 5 ++--- acfupdate-model.lua | 25 +++++++++++++++++++++++++ 3 files changed, 31 insertions(+), 3 deletions(-) diff --git a/acfupdate-controller.lua b/acfupdate-controller.lua index 3d4e9da..65c3f60 100644 --- a/acfupdate-controller.lua +++ b/acfupdate-controller.lua @@ -34,3 +34,7 @@ status = function (self ) return ({projects = self.model:get(),updates = self.model:status(), url = ENV["SCRIPT_NAME"] .. self.conf.prefix .. self.conf.controller} ) end +log = function (self ) + return ({projects = self.model:get(),updates = self.model:log(), url = ENV["SCRIPT_NAME"] .. self.conf.prefix .. self.conf.controller} ) +end + diff --git a/acfupdate-html.lsp b/acfupdate-html.lsp index 0b61e7f..c2b7d94 100644 --- a/acfupdate-html.lsp +++ b/acfupdate-html.lsp @@ -11,15 +11,14 @@ But if you have manually checked it out, you will get a update on it by pressing
-

New updates

+

Summary

-

Summary

-
-- End of updates --
+

-- End of updates --

This is the result of svn log 1 week back in time.

svn log -v -rHEAD:{".. enddate .. "} " .. svnurl .. "

"}) + + for v in string.gmatch(svnresult,"(.-\n)") do + local svnheader_tmp = string.match(v, "r%d+%s+.-(%d+%-%d+%-%d+)") + if (svnheader_tmp) and (svnheader_tmp ~= svnheader) then + table.insert(cmdresult,{ + ["updates"] = svnupdates, + ["name"] = svnheader, }) + svnheader = svnheader_tmp + svnupdates = "" + end + svnupdates = svnupdates .. v + end + updates.cmdresult = cmdresult + return updates +end -- cgit v1.2.3