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

Re: line-ending conversion and keyword substitution

From: Greg Hudson <ghudson_at_mit.edu>
Date: 2001-12-13 06:17:33 CET

> At 07:13 PM 12/12/01 -0500, Greg Hudson wrote:
> >Let's say I'm on Windows, and we're using your newline proposal. I
> >create my no-vectors graphic file, save it, and check it in. Let's say
> >the initial contents are "VEC\n", which would be a little odd,
> >especially for a Windows program, but this is a binary format; it could
> >be anything. Then, next week, I check out the file. Even though it
> >came from Windows, my client transforms the file contents to "VEC\r\n",
> >because it has no idea where the file came from; it just thinks it looks
> >like a Unix text file.
>
> Well, no. As we discussed earlier, it wouldn't make sense to set
> line-ending-style to "native" for a file that didn't have any native line
> endings. It's style would get set to "none", and no transformations would
> be done on it.

Fine. Linus creates the file, with the "VEC\n" contents, William checks
it out, getting "VEC\r\n", the graphics program doesn't bomb on it, he
makes the engine design, checks it in, and loses his data.

(I should have known better than to leave that little sticking point in my
example.)

> As an aside, there has been some discussion about setting the
> line-ending-style value to the platform, such as "unix", "dos", or "mac",
> or to the sequence of characters that make up the line separators, but I
> don't see the point here. The question you are trying to answer is whether
> a line-ending conversion will occur or not. The "native" and "none" should
> tell you everything you need to know on that score.

There are special files which want to use CRLF endings even when you check
them out on Unix, because they only get used by Windows tools which
require CRLF. (Why are they being used on Windows if they're being
checked out on Unix? Because we make tarballs out of Unix checkouts.)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Oct 21 14:36:52 2006

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

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