subversion-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Joiner <anacro...@gmail.com>
Subject Re: Transaction author without requiring password
Date Wed, 05 Oct 2011 08:52:02 GMT
I tried this, but an author is not passed unless auth-access is in use
AFAICT. So $USER in your example is always empty.

On Wed, Oct 5, 2011 at 7:16 PM, Dominik Psenner <dpsenner@gmail.com> wrote:
>>I'm trying to force commits to have an attached author, but I don't
>>care for requiring passwords. In other words, commits should contain
>>an author field but there's no enforcing that the committer is who
>>they claim to be.
>>
>>I've tried filtering for an author in the pre-commit hook, but the
>>user name given in the commit is not passed unless anon-access doesn't
>>given write privileges, and auth-access is enabled. Furthermore,
>>without a corresponding author name in the passwd file, I don't think
>>svnserve makes it to the pre-commit stage at all.
>>
>>Are there any recommended solutions for ensuring that commits have an
>>attached author, or similar field?
>
> Maybe something like this put in place as a pre-commit hook?
>
> #!/bin/bash
> SVNLOOK=/usr/bin/svnlook
> REPOPATH=$1
> TRANSACTION=$2
>
> # get user
> USER=`$SVNLOOK author $REPOPATH -t $TRANSACTION`
>
> # check if the user is empty
> if[ -z "$USER" ]; then
>  exit 1
> exit 0
>
>

Mime
View raw message