Module: display_revisions.lua
Author: RichardLevitte
Included in monotone: no
Compatible with monotone version 0.41 and on

Description

This is a toy lua hook for monotone the revisions received through a push or a sync.


Source

Download source-- Lua snippet to display the revisions that came into the database.

-- /Richard Levitte

-- Released as public domain

do notifier = { revision_received = function(rev_id, rev_text, rev_certs, session_id) for ,cert in ipairs(revcerts) do if cert["name"] == "branch" then branch = cert["value"] elseif cert["name"] == "date" then date = cert["value"] elseif cert["name"] == "author" then author = cert["value"] elseif cert["name"] == "changelog" then changelog = cert["value"] end end print("\n========================================\n" .. "Date: " .. date .. "\n" .. "Branch: " .. branch .. "\n" .. "Author: " .. author .. "\n" .. "Changelog:\n" .. "----------\n" .. changelog .. "\n" .. "----------\n" .. rev_text .. "\n") return "continue",nil end }

local v,m = push_hook_functions(notifier) if not v then error(m) elseif m then io.stderr:write("Warning: ",m,"\n") end end

Download source

Installation

Just download the source (display_revisions.lua) and include it from your monotonerc with the include command

Quick Links:     www.monotone.ca    -     Downloads    -     Documentation    -     Wiki    -     Code Forge    -     Build Status