[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: Wed, 29 Oct 2008 14:08:07 -0400

As far as I can see, you'll have to do this and this will interrupt
everyone who is currently editing.

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.

After that, you'll have to do a massive checkout that will checkout
the entire repository, and add the svn:eol-style property to the file,
then do a checkin. This of course, has to be coordinated with
everyone. Some people will be editing these same files, and will get a
commit conflict when they attempt to check them in. But, it isn't all
that bad. You're not modifying the file, only the property. The merge,
although a pain (I hate it when commits fail too) is pretty simple.

Then, it is up to your developers to setup their own auto-properties
when they create a new file. You can help by creating a default config
file for them to use, and give them instructions on how to install it,
but that's really the developers' responsibility.

--
David Weintraub
qazwart_at_gmail.com
On Wed, Oct 29, 2008 at 1:15 PM, Robert P. J. Day <rpjday_at_crashcourse.ca> wrote:
>  currently, i have a small group all working out of the
> same repo that was inherited from elsewhere, which contains
> a chaotic mixture of LF and CRLF end-of-line characters on
> all of the *.c, *.h and Makefile files.  what is the best
> (and safest) way to do a massive normalization and change
> everything to the UNIX native eof of LF, across the repo
> and everyone's working copies?
>
>  i don't want to have to force everyone to stop editing,
> save and check back in everything they're working on because
> some of the work is still in progress, so we can assume that
> *some* stuff in working copies will differ from the repo --
> hopefully, not a lot, and not in an unmergeable way once the
> eol change is taken into account.
>
>  first, in order to get everyone's sessions in sync, should
> i get them to change their .subversion/config files to enable
> auto-props, then uncomment the appropriate eol-style=native
> lines?  i checked and some of them don't have that set, so
> i was assuming that would be step one.
>
>  and after that, what?  i can have everyone "dos2unix" those
> files in their working copies, then i can check in a dos2unix'ed
> clean version, and have everyone try to update.  is that the
> right recipe?  thanks.
>
> rday
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_subversion.tigris.org
> For additional commands, e-mail: users-help_at_subversion.tigris.org
>
>
---------------------------------------------------------------------
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-29 19:08:30 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.