You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Marek Slama <ms...@email.cz> on 2013/05/03 15:21:24 UTC
svn client does not convert line endings for some java files
Hi,
not sure why but my svn client does not convert line endings for 'some' of
my files. I did not find any rule for this.
I have java project and files are text java sources. There is no mime type
or eol-style property set on given files and
some are with Linux line endings and some with DOS line endings. I have svn,
version 1.7.5 (r1336830) compiled
Sep 28 2012, 11:22:04. I do not know how to find out server version in case
it is relevant.
If I set eol-style property to native then it works. But such behaviour
seems weird to me.
Thanks
Marek
Re: svn client does not convert line endings for some java files
Posted by "C. Michael Pilato" <cm...@collab.net>.
On 05/03/2013 09:57 AM, Marek Slama wrote:
> So it seems I will have to set eol-style explicitly on all my text files. I
> will have to investigate how to set eol-style
> for newly added file for different clients my teammates use on Win. On Linux
> I can set it in config file using auto-props.
Subversion applies the auto-props via configuration in its core libraries,
not up in the command-line client layer only. You *should* find that all
clients recognize the auto-props runtime configuration as well. See
http://svnbook.red-bean.com/en/1.7/svn.advanced.confarea.html for details on
how Windows handles runtime configuration stuffs.
--
C. Michael Pilato <cm...@collab.net>
CollabNet <> www.collab.net <> Enterprise Cloud Development
Re: svn client does not convert line endings for some java files
Posted by Les Mikesell <le...@gmail.com>.
On Fri, May 3, 2013 at 8:57 AM, Marek Slama <ms...@email.cz> wrote:
> So it seems I will have to set eol-style explicitly on all my text files. I
> will have to investigate how to set eol-style
> for newly added file for different clients my teammates use on Win. On Linux
> I can set it in config file using auto-props.
Subversion clients typically install some sort of per-user config file
with default auto-props for the common cases - but this may depend on
the particular client software.
--
Les Mikesell
lesmikesell@gmail.com
Re: svn client does not convert line endings for some java files
Posted by Nico Kadel-Garcia <nk...@gmail.com>.
On Fri, May 3, 2013 at 9:57 AM, Marek Slama <ms...@email.cz> wrote:
> So it seems I will have to set eol-style explicitly on all my text files. I
> will have to investigate how to set eol-style
> for newly added file for different clients my teammates use on Win. On Linux
> I can set it in config file using auto-props.
>
> Thanks for info
>
> Marek
Or learn to select, and use, a coding standard for EOL and get what
you'd normally expect when you bop your code back and forth between
environments.. I personally recognize the UNIX EOL style, since for C
and various scripting languages it is better supported
Avoiding svn:eol is particularly critical when the working copy is
shared between operating systems, such as a Samba share with C or Java
source code in it that is also accessible via NFS to Linux users..
Re: svn client does not convert line endings for some java files
Posted by Marek Slama <ms...@email.cz>.
So it seems I will have to set eol-style explicitly on all my text files. I
will have to investigate how to set eol-style
for newly added file for different clients my teammates use on Win. On Linux
I can set it in config file using auto-props.
Thanks for info
Marek
---------- Původní zpráva ----------
Od: C. Michael Pilato <cm...@collab.net>
Datum: 3. 5. 2013
Předmět: Re: svn client does not convert line endings for some java files
"On 05/03/2013 09:21 AM, Marek Slama wrote:
> Hi,
>
> not sure why but my svn client does not convert line endings for 'some'
> of my files. I did not find any rule for this. I have java project and
> files are text java sources. There is no mime type or eol-style property
> set on given files and some are with Linux line endings and some with DOS
> line endings. I have svn, version 1.7.5 (r1336830) compiled Sep 28 2012,
> 11:22:04. I do not know how to find out server version in case it is
> relevant.
>
> If I set eol-style property to native then it works. But such behaviour
> seems weird to me.
Subversion is designed with a pretty clear policy governing such matters:
don't screw up the user's files!
If you happen to be coming from a CVS background, this will seem odd to you,
because CVS's default mode of operation is to assume that a file is
human-readable and that native newlines are desired, and will quite happily
destroy the binary files you forget to add with the -kb flag.
In Subversion, your file's contents are considered sacred. Unless you set
the svn:eol-style property on a given file, well-behaved Subversion clients
will not attempt to perform newline translation on that file.
--
C. Michael Pilato <cm...@collab.net>
CollabNet <> www.collab.net <> Enterprise Cloud Development"
Re: svn client does not convert line endings for some java files
Posted by Daniel Shahaf <d....@daniel.shahaf.name>.
C. Michael Pilato wrote on Fri, May 03, 2013 at 09:34:16 -0400:
> In Subversion, your file's contents are considered sacred. Unless you set
> the svn:eol-style property on a given file, well-behaved Subversion clients
> will not attempt to perform newline translation on that file.
I would state that more simply:
No Subversion client will modify file contents, unless that file has
svn:keywords or svn:eol-style set (whether that setting was done
manually or via auto-props is irrelevant).
Re: svn client does not convert line endings for some java files
Posted by "C. Michael Pilato" <cm...@collab.net>.
On 05/03/2013 09:21 AM, Marek Slama wrote:
> Hi,
>
> not sure why but my svn client does not convert line endings for 'some'
> of my files. I did not find any rule for this. I have java project and
> files are text java sources. There is no mime type or eol-style property
> set on given files and some are with Linux line endings and some with DOS
> line endings. I have svn, version 1.7.5 (r1336830) compiled Sep 28 2012,
> 11:22:04. I do not know how to find out server version in case it is
> relevant.
>
> If I set eol-style property to native then it works. But such behaviour
> seems weird to me.
Subversion is designed with a pretty clear policy governing such matters:
don't screw up the user's files!
If you happen to be coming from a CVS background, this will seem odd to you,
because CVS's default mode of operation is to assume that a file is
human-readable and that native newlines are desired, and will quite happily
destroy the binary files you forget to add with the -kb flag.
In Subversion, your file's contents are considered sacred. Unless you set
the svn:eol-style property on a given file, well-behaved Subversion clients
will not attempt to perform newline translation on that file.
--
C. Michael Pilato <cm...@collab.net>
CollabNet <> www.collab.net <> Enterprise Cloud Development