Discussion:
Ignore / override svn:eol-style=native while checkout / update
Cyrus Summers
2009-07-05 03:42:19 UTC
Permalink
HI,

I recently encountered an issue with svn:eol-style set to native.
While checking out / updating, svn changes all the files with property
svn:eol-style=native the line endings to CRLF since I'm using Windows,
the problem is that I also use Cygwin tools to build projects, and the
shell script interpreter sh only recognize LF as the line ending as in
*nix systems, the extra CRs are treated as error. So my current
solution is to change all the files the line endings back to its
original using dos2unix...

It seems setting svn:eol-style=native is becoming more and more
popular, I've check 3 projects (including svn itself), all of them has
such property set. While it may be useful in most of the cases, it
does create some inconveniency.

So my question is that, could option be added to override the property
and leave the line ending as is? e.g. similar as the '--native-eol
ARG' option in 'export' or even powerful.

Cheers
Cyrus

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2368066

To unsubscribe from this discussion, e-mail: [users-***@subversion.tigris.org].
B. Smith-Mannschott
2009-07-05 14:08:28 UTC
Permalink
Post by Cyrus Summers
HI,
I recently encountered an issue with svn:eol-style set to native.
While checking out / updating, svn changes all the files with property
svn:eol-style=native the line endings to CRLF since I'm using Windows,
the problem is that I also use Cygwin tools to build projects, and the
shell script interpreter sh only recognize LF as the line ending as in
*nix systems, the extra CRs are treated as error. So my current
solution is to change all the files the line endings back to its
original using dos2unix...
Don't use svn:eol-style=native for *nix shell scripts, use
svn:eol-style=LF instead. That way they'll always have LF line
endings, regardless of which platform/client is in use when they are
checked out. I would hope that anyone editing *nix shell scripts on
windows is competent enough to use an editor other than notepad.

// ben

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2368131

To unsubscribe from this discussion, e-mail: [users-***@subversion.tigris.org].
Ryan Schmidt
2009-07-05 22:43:04 UTC
Permalink
Post by B. Smith-Mannschott
Post by Cyrus Summers
I recently encountered an issue with svn:eol-style set to native.
While checking out / updating, svn changes all the files with
property
svn:eol-style=native the line endings to CRLF since I'm using
Windows,
the problem is that I also use Cygwin tools to build projects, and the
shell script interpreter sh only recognize LF as the line ending as in
*nix systems, the extra CRs are treated as error. So my current
solution is to change all the files the line endings back to its
original using dos2unix...
Don't use svn:eol-style=native for *nix shell scripts, use
svn:eol-style=LF instead. That way they'll always have LF line
endings, regardless of which platform/client is in use when they are
checked out. I would hope that anyone editing *nix shell scripts on
windows is competent enough to use an editor other than notepad.
I think his complaint is more that svn:eol-style is being set to
native for files in projects over which he has no control but would
still like to use, and therefore is wanting a way to deal with such
projects on the client side. To which I say: check the working copy
out in the environment where you want to use it. If you want to use
it in Cygwin, check it out using the svn command line client in
Cygwin, which will get the files with LF line endings. If you want to
use the files in Windows proper, check them out using a Windows
Subversion client and the line endings will be CRLF. Don't share
working copies between environments, to avoid issues with EOL style
and also symlinks.

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2368185

To unsubscribe from this discussion, e-mail: [users-***@subversion.tigris.org].
David Weintraub
2009-07-06 00:45:25 UTC
Permalink
If you do a checkout using svn in Cygwin, the EOL style should be
fine. If you're using Cygwin, you should do the checkout with the
Cygwin client and not the Windows client.

--
David Weintraub
***@Weintraub.name
Sent from my iPhone while riding in my Ferrari. (Jealous?)
Post by Ryan Schmidt
Post by B. Smith-Mannschott
Post by Cyrus Summers
I recently encountered an issue with svn:eol-style set to native.
While checking out / updating, svn changes all the files with property
svn:eol-style=native the line endings to CRLF since I'm using Windows,
the problem is that I also use Cygwin tools to build projects, and the
shell script interpreter sh only recognize LF as the line ending as in
*nix systems, the extra CRs are treated as error. So my current
solution is to change all the files the line endings back to its
original using dos2unix...
Don't use svn:eol-style=native for *nix shell scripts, use
svn:eol-style=LF instead. That way they'll always have LF line
endings, regardless of which platform/client is in use when they are
checked out. I would hope that anyone editing *nix shell scripts on
windows is competent enough to use an editor other than notepad.
I think his complaint is more that svn:eol-style is being set to
native for files in projects over which he has no control but would
still like to use, and therefore is wanting a way to deal with such
projects on the client side. To which I say: check the working copy
out in the environment where you want to use it. If you want to use
it in Cygwin, check it out using the svn command line client in
Cygwin, which will get the files with LF line endings. If you want to
use the files in Windows proper, check them out using a Windows
Subversion client and the line endings will be CRLF. Don't share
working copies between environments, to avoid issues with EOL style
and also symlinks.
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2368185
To unsubscribe from this discussion, e-mail: [users-
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2368204

To unsubscribe from this discussion, e-mail: [users-***@subversion.tigris.org].
Cyrus Summers
2009-07-06 11:13:48 UTC
Permalink
Thanks for all your replies.

I tried svn in Cygwin just now, everything works perfectly, thanks a lot~

Cheers
Cyrus
If you do a checkout using svn in Cygwin, the EOL style should be fine. If
you're using Cygwin, you should do the checkout with the Cygwin client and
not the Windows client.
--
David Weintraub
Sent from my iPhone while riding in my Ferrari. (Jealous?)
Post by Ryan Schmidt
Post by B. Smith-Mannschott
Post by Cyrus Summers
I recently encountered an issue with svn:eol-style set to native.
While checking out / updating, svn changes all the files with property
svn:eol-style=native the line endings to CRLF since I'm using Windows,
the problem is that I also use Cygwin tools to build projects, and the
shell script interpreter sh only recognize LF as the line ending as in
*nix systems, the extra CRs are treated as error. So my current
solution is to change all the files the line endings back to its
original using dos2unix...
Don't use svn:eol-style=native for *nix shell scripts, use
svn:eol-style=LF instead.  That way they'll always have LF line
endings, regardless of which platform/client is in use when they are
checked out. I would hope that anyone editing *nix shell scripts on
windows is competent enough to use an editor other than notepad.
I think his complaint is more that svn:eol-style is being set to
native for files in projects over which he has no control but would
still like to use, and therefore is wanting a way to deal with such
projects on the client side. To which I say: check the working copy
out in the environment where you want to use it. If you want to use
it in Cygwin, check it out using the svn command line client in
Cygwin, which will get the files with LF line endings. If you want to
use the files in Windows proper, check them out using a Windows
Subversion client and the line endings will be CRLF. Don't share
working copies between environments, to avoid issues with EOL style
and also symlinks.
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2368185
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2368341

To unsubscribe from this discussion, e-mail: [users-***@subversion.tigris.org].
Andrey Repin
2009-07-06 18:05:38 UTC
Permalink
Greetings, B. Smith-Mannschott!
Post by B. Smith-Mannschott
Post by Cyrus Summers
I recently encountered an issue with svn:eol-style set to native.
While checking out / updating, svn changes all the files with property
svn:eol-style=native the line endings to CRLF since I'm using Windows,
the problem is that I also use Cygwin tools to build projects, and the
shell script interpreter sh only recognize LF as the line ending as in
*nix systems, the extra CRs are treated as error. So my current
solution is to change all the files the line endings back to its
original using dos2unix...
Don't use svn:eol-style=native for *nix shell scripts, use
svn:eol-style=LF instead.
MAC is considered a *nix environment, but it uses CR instead of LF due to
historical reasons.
"Don't use" is not very helpful suggestion, unfortunately :(
Post by B. Smith-Mannschott
That way they'll always have LF line
endings, regardless of which platform/client is in use when they are
checked out. I would hope that anyone editing *nix shell scripts on
windows is competent enough to use an editor other than notepad.
Agree in this specific case... as i'm in the same boat as OP (Cygwin et all)


--
WBR,
Andrey Repin (***@freemail.ru) 06.07.2009, <22:03>

Sorry for my terrible english...

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2368468

To unsubscribe from this discussion, e-mail: [users-***@subversion.tigris.org].
David Weintraub
2009-07-06 18:48:52 UTC
Permalink
Post by Andrey Repin
MAC is considered a *nix environment, but it uses CR instead of LF due to
historical reasons.
"Don't use" is not very helpful suggestion, unfortunately :(
Just to clarify:

Mac OS X uses "LF" as the EOL character on text based files. This is
especially true when you're in the terminal command line environment.
Older pre-OS X programs will use "CR". If you use shell scripts on the
Mac, or use VIM, you are using "LF" as the EOL character.

Cygwin can be set to use either "CRLF" or "LF". However, when you
setup Cygwin, you are highly recommended to use "LF" as in "I highly
recommend you not pass that police car at 90 MPH on the highway". I
know people who setup Cygwin to use CRLF because they think it
improves interoperability, and then are very sorry afterwords.

Use LF on all Unix type files that require LF (like shell scripts, and
Makefiles), use CR on all Windows files that require CR (like
VisualStudio configuration files), and "native" on all the other types
of text files.

You can use a pre-commit hook to help you make sure that svn:eol-style
is set, and is set correctly.
--
David Weintraub
***@gmail.com

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2368485

To unsubscribe from this discussion, e-mail: [users-***@subversion.tigris.org].
Ryan Schmidt
2009-07-07 00:35:52 UTC
Permalink
Post by David Weintraub
Post by Andrey Repin
MAC is considered a *nix environment, but it uses CR instead of LF due to
historical reasons.
"Mac" is an abbreviation of "Macintosh" and is not an acronym, not to
be confused with the "MAC" in "MAC address" which is an acronym (for
"Media Access Control") and is not related to Macintosh.
Post by David Weintraub
Post by Andrey Repin
"Don't use" is not very helpful suggestion, unfortunately :(
Mac OS X uses "LF" as the EOL character on text based files. This is
especially true when you're in the terminal command line environment.
Older pre-OS X programs will use "CR". If you use shell scripts on the
Mac, or use VIM, you are using "LF" as the EOL character.
Cygwin can be set to use either "CRLF" or "LF". However, when you
setup Cygwin, you are highly recommended to use "LF" as in "I highly
recommend you not pass that police car at 90 MPH on the highway". I
know people who setup Cygwin to use CRLF because they think it
improves interoperability, and then are very sorry afterwords.
Use LF on all Unix type files that require LF (like shell scripts, and
Makefiles), use CR on all Windows files that require CR (like
VisualStudio configuration files), and "native" on all the other types
of text files.
You mean "use CRLF on all Windows files that require CRLF". I suspect
no files in serious use today on any platform require CR EOLs.

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2368600

To unsubscribe from this discussion, e-mail: [users-***@subversion.tigris.org].
Loading...