>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

Reply via email to