Answer the question
In order to leave comments, you need to log in
Need working example of changing svn:log in svn pre-commit hook
Need a working example of changing svn:log in svn pre-commit hook in any language.
A more general example of changing anything from the TXN would also work.
Google gives a million proofs that this is possible, but does not give a single example.
Answer the question
In order to leave comments, you need to log in
For example here: svn.apache.org/repos/asf/subversion/trunk/tools/hook-scripts/log-police.py
Look for the fix_rev function:
def fix_rev(fs, revnum):
"Fix up the log message for revision REVNUM in FS. See fix_log_message()."
log_message = svn.fs.svn_fs_revision_prop(fs, revnum, 'svn:log')
if log_message is not None:
new_message = fix_log_message(log_message)
if new_message != log_message:
svn.fs.svn_fs_change_rev_prop(fs, revnum, "svn:log", new_message)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question