You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Douglas Bullard <db...@nurflugel.com> on 2008/04/27 00:38:17 UTC
Pre-commit scripts to enforce commit message and make tags read-only
I've been trying to find a pre-commit script that both requires all
commits to have messages, and also prevents commits to tags.
I've found scripts that do one or the other. A lot seem to be in
python (which none of our staff really knows), is that the most common
language?
Thanks,
Douglas Bullard
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: Pre-commit scripts to enforce commit message and make tags read-only
Posted by Blair Zajac <bl...@orcaware.com>.
Ryan Schmidt wrote:
>
> On Apr 26, 2008, at 7:38 PM, Douglas Bullard wrote:
>
>> I've been trying to find a pre-commit script that both requires all
>> commits to have messages, and also prevents commits to tags.
>>
>> I've found scripts that do one or the other. A lot seem to be in
>> python (which none of our staff really knows), is that the most common
>> language?
>
> Write a pre-commit script in whatever language you like which calls
> first the one script (e.g. to check the log message), then the other (to
> prevent commits to tags).
The default pre-commit script already has the check for commit messages:
$ cat pre-commit.tmpl
...
...
# Make sure that the log message contains some text.
SVNLOOK=/usr/bin/svnlook
$SVNLOOK log -t "$TXN" "$REPOS" | \
grep "[a-zA-Z0-9]" > /dev/null || exit 1
Regards,
Blair
--
Blair Zajac, Ph.D.
CTO, OrcaWare Technologies
<bl...@orcaware.com>
Subversion training, consulting and support
http://www.orcaware.com/svn/
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: Pre-commit scripts to enforce commit message and make tags read-only
Posted by Ryan Schmidt <su...@ryandesign.com>.
On Apr 26, 2008, at 7:38 PM, Douglas Bullard wrote:
> I've been trying to find a pre-commit script that both requires all
> commits to have messages, and also prevents commits to tags.
>
> I've found scripts that do one or the other. A lot seem to be in
> python (which none of our staff really knows), is that the most
> common language?
Write a pre-commit script in whatever language you like which calls
first the one script (e.g. to check the log message), then the other
(to prevent commits to tags).
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org