info-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: DOS EOL pollution in repository


From: Russ Tremain
Subject: Re: DOS EOL pollution in repository
Date: Thu, 8 Mar 2001 10:45:45 -0800

David -
thanks a lot!  I'll try it out.
I was thinking of using cvswrappers to decide on
the binary property, since we maintain this.
Otherwise, off into binary-file-detection-hueristics land.
-Russ


At 10:35 PM -0800 3/7/01, David L. Martin wrote:
>> > I'm tempted to put in a commit
>> > filter that rejects text files with DOS EOL's.
>> 
>> Sounds like a good thing to do in addition.  My suggestions will
>> make life easier for people, but this is what'll enforce your
>> policy.
>> 
>I've attached a perl script callable from commitinfo
>that rejects commits of certain file types if any line
>in the file ends in ctrl-M.
>
>This script contains an explicit list of end of filename
>matching criteria to ascertain whether a file is an
>ASCII file.  (e.g. .java$, .txt$, .html$, etc.) and should
>be checked for lines ending with ctrl-M.  (You
>certainly would *not* want to run this check on
>a binary file.)
>
>Commented out from the script is an alternative
>"automatic" way to determine whether the file
>is ASCII using the Unix file command.  I haven't
>thoroughly tested it, but I've found that if it returns
>a match of ":.*text" or ":.*script", it is likely an
>ASCII file.
>
>Hope this helps,
>David Martin
>
>
>
>Content-Type: application/octet-stream;
>       name="commit_prep.pl"
>Content-Disposition: attachment;
>       filename="commit_prep.pl"
>
>Attachment converted: axl-usr:commit_prep.pl (????/----) (00001286)






reply via email to

[Prev in Thread] Current Thread [Next in Thread]