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

Re: same eol style for all text files

From: T E Schmitz <mailreg_at_numerixtechnology.de>
Date: 2005-08-03 14:49:35 CEST

Hello Dale,

Dale Worley wrote:
>>From: T E Schmitz [mailto:mailreg@numerixtechnology.de]
>>
>>You mean you periodically run a script which cycles through
>>all files in the wc?
>
> Yes.
>
> But one approximation would be to apply svn:mime-type and svn:eol-style to
> all the files in a WC, then run the Unix "file" command on all the files,
> and grep its output to locate binary file types that you have many of. A
> dozen or so different types will probably cover 99% of your binary files.
> Use a script to update the svn: properties appropriately for those files.
> Grep for non-ASCII characters (as adjusted for whatever languages you use)
> in the remaining supposedly-text files to find more binary files. Then try
> to check in the mess; Subversion will probably reject any binary files that
> still have svn:eol-style set.

I eventually came across check-mime-type.pl on the Subversion FAQ page,
which follows exactly the logic you described above. It's meant to be
called from the pre-commit hook and causes the commit to fail if one or
more files are lacking their mime-type property and in case of
mime=text/plain the eol-style property is required too.

Finding and grepping on Unix is fine but I couldn't face writing a BAT
file for Windoze ;-)

-- 
Regards,
Tarlika Elisabeth Schmitz
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Wed Aug 3 14:56:07 2005

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

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