On 11/23/05, Simon Kitching <[EMAIL PROTECTED]> wrote:
> So if the file
> was originally committed without svn:eol-style, but from a unix machine,
> then setting svn:eol-style doesn't cause any diffs. If the file was
> originally committed from a Windows machine (or Mac), however, then
> every line in the file gets updated :-(.
You've got it! Ask the person who committed 10k lines of tld files to
Struts with Windows line endings about the commit message that ran
nine emails long when it had to be fixed.
> I'll therefore stop adding svn:eol-style props to files. The nuisance of
> the diff is greater than the gain I think;
IMO it would be better to fix them and get it over with. Once they
have the 'native' eol style then it doesn't matter who edits them.
Here's what I came up with to run a directory tree and set the svn
props we use:
svn ls -R | grep '\.java$' | xargs -i svn propset svn:eol-style native '{}'
svn ls -R | grep '\.java$' | xargs -i svn propset svn:keywords "Date
Author Id Revision HeadURL" '{}'
(Then I do the same thing for all the other file types. Inefficient,
I know. :) Can someone improve it and make it do '.java or .tld or
.html or .xml' ? And does it really say 'ends with .java' or did I get
that wrong?)
After that, it's just a matter of watching the commit messages for new
files committed without props and reminding people to fix their
settings, and occasional cleanup.
HTH,
--
Wendy