/usr/share/doc/monotone/contrib/monotone-log-of-pulled-revs-hook.lua is in monotone 1.1-9.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | -- This is a simple Monotone hook function that prints out information about
-- revisions received during netsync.
push_hook-functions(
{
revision_received =
function (new_id, revision, certs, session_id)
local date=""
local author=""
local changelog=""
local branches=""
for i,cert in pairs(certs) do
if cert["name"] == "date" then
date = date .. cert["value"] .. " "
end
if cert["name"] == "author" then
author = author .. cert["value"] .. " "
end
if cert["name"] == "branch" then
branches = branches .. cert["value"] .. " "
end
if cert["name"] == "changelog" then
changelog = changelog .. cert["value"] .. "\n"
end
end
print("------------------------------------------------------------")
print("Revision: " .. new_id)
print("Author: " .. author)
print("Date: " .. date)
print("Branch: " .. branches)
print()
print(changelog)
return "continue",nil
end
})
|