# # # patch "contrib/monotone-buildbot-notification.lua" # from [fc1f181e41247fd8e7244024cf5862ce85eea03b] # to [d81cba27eee19d388cbd15b6124eb6818bc23f7c] # ============================================================ --- contrib/monotone-buildbot-notification.lua fc1f181e41247fd8e7244024cf5862ce85eea03b +++ contrib/monotone-buildbot-notification.lua d81cba27eee19d388cbd15b6124eb6818bc23f7c @@ -18,44 +18,44 @@ function notify_buildbot(rev_id, revisio function notify_buildbot(rev_id, revision, certs) local author = "" local changelog = "" - local branch = "" + local branch = "" for i,cert in pairs(certs) do if cert["name"] == "changelog" then changelog = changelog .. cert["value"] .. "\n" - elseif cert["name"] == "author" then - -- we simply override the author, in case there are multiple - -- author certs. - author = cert["value"] - elseif cert["name"] == "branch" then - -- likewise with the branch cert, which probably isn't that - -- clever... - branch = cert["value"] - end + elseif cert["name"] == "author" then + -- we simply override the author, in case there are multiple + -- author certs. + author = cert["value"] + elseif cert["name"] == "branch" then + -- likewise with the branch cert, which probably isn't that + -- clever... + branch = cert["value"] + end end - touched_files = "" + local touched_files = "" for i,row in ipairs(parse_basic_io(revision)) do - local key = row["name"] - if (key == 'delete') or (key == 'add_dir') or (key == 'add_file') or - (key == 'patch') then - local filename = row["values"][1] - touched_files = touched_files .. filename .. " " - end + local key = row["name"] + if (key == 'delete') or (key == 'add_dir') or (key == 'add_file') or + (key == 'patch') then + local filename = row["values"][1] + touched_files = touched_files .. filename .. " " end + end - execute(_buildbot_bin, "sendchange", - "--master", _buildbot_addr, - "--username", author, - "--revision", rev_id, - "--comments", changelog, - "--branch", branch, - touched_files) + execute(_buildbot_bin, "sendchange", + "--master", _buildbot_addr, + "--username", author, + "--revision", rev_id, + "--comments", changelog, + "--branch", branch, + touched_files) end function note_commit (new_id, revision, certs) - notify_buildbot(new_id, revision, certs) + notify_buildbot(new_id, revision, certs) end function note_netsync_revision_received(new_id, revision, certs, session_id) - notify_buildbot(new_id, revision, certs) + notify_buildbot(new_id, revision, certs) end