Getting author of transaction in pre-commit hook in SVN

I have a pre-commit hook script for SVN repository and I need to get the name of the author for every commit. According to SVN documentation, I can do this by using the command:

svnlook author -t [Transaction name] [Path to repository]

Whenever a commit is performed by a user, the repository path and the transaction name is passed as parameters to the script. But when I try to run the above command using that transaction name on the repository, I get an output "No such transaction". Why is this happening and how can I get the author name using the transaction name? I need it to perform some logging processes.

1 answer

  • answered 2018-01-12 10:34 Chris

    This will need to be done in a post-commit hook. That transaction doesn't exist in the repository because this is a pre-commit hook. :)