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

Re: doing a massive EOL normalization for a small group of users?

From: David Weintraub <qazwart_at_gmail.com>
Date: Thu, 30 Oct 2008 11:00:51 -0400

Quoting David Weintraub <qazwart_at_gmail.com>:
> First off, add a pre-commit hook that will fail a commit if a file
> being edited is of the right type and doesn't have the required
> svn:eol-style property set to the correct value. I don't know if the
> current Python pre-commit hook can do this, but I have a Perl
> pre-commit hook that does this type of checking as well as folder
> permission checking. Let me know if you want a copy of it.

On Wed, Oct 29, 2008 at 2:38 PM, Robert P. J. Day <rpjday_at_crashcourse.ca> wrote:
> sure, send it along, but for the moment, i'm going to hold off
> on that as my first priority is to just get the normalization done
> and get everything sync'ed. once that's done, i can add the properties
> and commit hooks at my leisure to keep everything that way.

Actually, the hook should be your first priority. Otherwise, you're
fighting a losing battle. You'll fix a bunch of scripts, and some
developer is going to check one of them out while you're busy fixing
something else, and mess it all up again.

> again, adding that property is something that can be done afterwards
> to keep things clean once they've been cleaned up. my number one
> priority is to just get there, so i'm about to give it a shot.

The svn:eol-style property will do the cleanup for you. You don't have
to modify the files themselves by fixing the line endings.

If you modify a file by changing the line endings while another
developer is attempting to modify it, they'll get a merge conflict,
and then they have to figure out the diff (which will show every line
as being modified). In the end, they'll simply check the file back in
with the bad line endings. You're back to where you started from.

If instead, you add the svn:eol-style property instead of modifying
the file's contents, developers will get a merge conflict, but the
only thing they'll have to do is add teh svn:eol-style property to
their checked out copy. No real merge is necessary. Of course, putting
the pre-commit hook in will help "remind" the developers to add this
property instead of checking in their revision that doesn't have this
property.

--
David Weintraub
qazwart_at_gmail.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: users-help_at_subversion.tigris.org
Received on 2008-10-30 16:01:21 CET

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.