Boost logo

Boost :

From: Beman Dawes (bdawes_at_[hidden])
Date: 2002-05-10 14:21:59


At 01:13 PM 5/10/2002, Brad King wrote:

>> Tabs have been creeping into source files again. Please replace
>> by spaces.
>>
>> Rather than wait until the last minute, I'm going to start running
>> the tab check and long names checks once a month.
>
>CVS supports checks like this on a per-commit basis. If you add a file
>called "commitinfo" to the CVSROOT directory on the server, you can get
it
>to run scripts to test each file and optionally abort the commit.

Wow! That would be a lot better than finding out long after the fact.
Thanks for the info.

Does anyone know if SourceForge supports this, and how to go about it?

Could someone who feels comfortable writing a script for that environment
volunteer to take this on?

I guess all we want to do is verify that all filesnames are 31 characters
or less (current filter is grep -v -E "^.{0,31}$") and that ".cpp", ".cxx",
".h", ".hpp", and ".py" files have no tabs and end in cr, cr/nl, or nl.

--Beman

>The format of the file is shown below. The first argument that cvs
passes
>to the script is the directory, and then the rest of the arguments are
the
>files in that directory that are being committed. The commit will be
>aborted if the script returns non-zero. The output of the script is
>displayed on the user's screen if the pre-commit check fails.
>
>-Brad
>
>
>
># The "commitinfo" file is used to control pre-commit checks.
># The filter on the right is invoked with the repository and a list
># of files to check. A non-zero exit of the filter program will
># cause the commit to be aborted.
>#
># The first entry on a line is a regular expression which is tested
># against the directory that the change is being committed to, relative
># to the $CVSROOT. For the first match that is found, then the remainder
># of the line is the name of the filter to run.
>#
># If the repository name does not match any of the regular expressions in
># this file, the "DEFAULT" line is used, if it is specified.
>#
># If the name "ALL" appears as a regular expression it is always used
># in addition to the first matching regex or "DEFAULT".
>ALL $CVSROOT/CVSROOT/your_script_here
>
>_______________________________________________
>Unsubscribe & other changes:
>http://lists.boost.org/mailman/listinfo.cgi/boost


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk