[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Pre-commit

From: <kfogel_at_collab.net>
Date: 2001-09-24 17:20:23 CEST

Kevin Pilch-Bisson <kevin@pilch-bisson.net> writes:
> Pre-Commit hooks are now working.
>
> I thought I would post this here to see if anyone is in favour:

+1, yes. We don't have CVS's safeguards against committing without a
log message, because we don't want to force that policy on all users.
But for _our_ repository, we know that every commit should have a log
message.

Any objections if I install this functionality on our server? I think
the logic should be shipped as a descriptively-named separate shell
script in our tree, to avoid cluttering up the pre-commit template --
but for efficiency, we can "source" it instead of exec'ing it.

-K

> --- /dev/null Tue Jul 3 15:21:52 2001
> +++ /home/kevin/projects/svn-test/greek-repo/hooks/pre-commit Fri Sep 21 09=
> :30:18 2001
> @@ -0,0 +1,12 @@
> +#!/bin/sh
> +#
> +# pre-commit: A simple script which exits with an error if the log message
> +# does not contain an alphanumeric character.
> +#
> +# [1] REPOS-PATH (the path to this repository)
> +# [2] TXN-NAME (the name of the txn about to be committed)
> +#
> +SVNLOOK=3D/usr/local/svn/bin/svnlook
> +LOG=3D`${SVNLOOK} ${1} txn ${2} log`
> +echo ${LOG} | grep "[a-zA-Z0-9]" > /dev/null || exit 1
> +exit 0
> --=20
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Kevin Pilch-Bisson http://www.pilch-bisson.net
> "Historically speaking, the presences of wheels in Unix
> has never precluded their reinvention." - Larry Wall
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> --FL5UXtIhxfXey3p5
> Content-Type: application/pgp-signature
> Content-Disposition: inline
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.0.6 (GNU/Linux)
> Comment: For info see http://www.gnupg.org
>
> iD8DBQE7q5TYgJlk/lQdbnARAn2gAJ4zzafzfQnmKPOHLJoZmxW3/KQaGQCeISUN
> XNNT9lHF1gPFkT7vZmmYSd4=
> =9JqH
> -----END PGP SIGNATURE-----
>
> --FL5UXtIhxfXey3p5--

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Oct 21 14:36:42 2006

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.