# # # patch "ChangeLog" # from [345c085f01768304628331900de5b92dd42745b0] # to [beb9cc880d002aee7a7a1254dac36116857cd4e9] # # patch "monotone.texi" # from [200d3e76ba97251314502d5e9dd0bdb1215289cb] # to [355d07f84caee318dd69f37ff6274842ca2d2c70] # # patch "std_hooks.lua" # from [259f2956124c69bd0f616943ad64663f67213cd6] # to [8f01e338e8056c62de500694210fd22dacac6122] # ============================================================ --- ChangeLog 345c085f01768304628331900de5b92dd42745b0 +++ ChangeLog beb9cc880d002aee7a7a1254dac36116857cd4e9 @@ -1,3 +1,11 @@ +2006-02-11 Blake Kaplan + + * monotone.texi (Hooks): Added new subsection about validation + hooks, and describe validate_commit_message in it. + + * std_hooks.lua (external_diff_default_args): Change the second + argument to match the documentation. + 2006-02-11 Matt Johnston * database.hh: increase checkpoint batch size from 100 to 1000 ============================================================ --- monotone.texi 200d3e76ba97251314502d5e9dd0bdb1215289cb +++ monotone.texi 355d07f84caee318dd69f37ff6274842ca2d2c70 @@ -6690,6 +6690,25 @@ @end ftable address@hidden Validation Hooks + +If there is a policy decision to make, Monotone defines certain hooks to +allow a client to validate or reject certain behaviors. + address@hidden @code address@hidden validate_commit_message (@var{message}, @var{changeset_text}) + +This hook is called after the user has entered his/her commit message. address@hidden is the commit message that the user has entered and address@hidden is the full text of the changes for this revision, +which can be parsed with the parse_basic_io function. If the hook finds the +commit message satisfactory, it can return @code{true, ""}. If it finds +fault, then it can return @code{false, reason} where @var{reason} is the +reason the message was rejected. By default, this hook rejects empty log +messages. + address@hidden ftable + @page @node Additional Lua Functions @section Additional Lua Functions ============================================================ --- std_hooks.lua 259f2956124c69bd0f616943ad64663f67213cd6 +++ std_hooks.lua 8f01e338e8056c62de500694210fd22dacac6122 @@ -706,7 +706,7 @@ return matches end -function validate_commit_message(message, new_manifest_id) +function validate_commit_message(message, changeset_text) if (message == "") then return false, "empty messages aren't allowed" end