[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: Jerry McAllister <jerrymc_at_msu.edu>
Date: Wed, 29 Oct 2008 14:05:47 -0400

On Wed, Oct 29, 2008 at 01:15:34PM -0400, Robert P. J. Day 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.

I presume that the ones with CR are from MessyDOS/Win environment
and what they have is CR-LF at the end of their lines and that
the others all have just LF at the end of lines (UNIX style) and
that none have only CR as a line ender.

In that case, just removing the CR would do the trick.
You could use the dos2unix utility. It has been a very long
time since I have used it, but I think it worked fine.

Another one is to use tr(1) on the files. It could be used
on every file across the board without confusing anything even
if they didn't have any CR-s in them. Something like:
     tr -d '\r' <infile >outfile

That tells it to read infile, delete all RETURNs and write to outfile.

////jerry

 
>
> 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:09:24 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.