You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by scott carter <sc...@gmail.com> on 2008/03/03 07:22:37 UTC
Getting file source in commit hook
Hello -
I have a task that I am hoping is somewhat common but not quite sure how to
accomplish it. I need to get the content of to-be-committed files in a
pre-commit hook. The reason for this if because we use the Jalopy code
formatter, and I have been tasked with checking that to-be-commits conform
to our coding standards. This is very easy to do in Jalopy, but I need to
get the content of the to-be-committed files in the pre-commit hook to run
the script. How can I do this on the server side?
Thanks in advance.
Re: Getting file source in commit hook
Posted by prakash tiwary <pr...@gmail.com>.
Hi,
I think, You can achieve it by using *svnlook cat -t* txn REPOS_PATH
PATH_IN_REPOS in precommit hook.
# txn is transaction name
# REPOS_PATH : repository path
# PATH_IN_REPOS : path of file.
See the pre-commit hook documentation.
Thanks & Regards,
Prakash
On Mon, Mar 3, 2008 at 12:52 PM, scott carter <sc...@gmail.com>
wrote:
> Hello -
>
> I have a task that I am hoping is somewhat common but not quite sure how
> to accomplish it. I need to get the content of to-be-committed files in a
> pre-commit hook. The reason for this if because we use the Jalopy code
> formatter, and I have been tasked with checking that to-be-commits conform
> to our coding standards. This is very easy to do in Jalopy, but I need to
> get the content of the to-be-committed files in the pre-commit hook to run
> the script. How can I do this on the server side?
>
> Thanks in advance.
>