You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Chris Stankevitz <cs...@toyon.com> on 2006/12/11 19:24:07 UTC

Setting svn:eol-style=native

Hi,

I want line ending to be correct on linux and windows machines.

Q1: Do I need to set svn:eol-style=native on each of my text files on 
each my branches and each of my tags?

Q2: Do I need to train my users to set this style for each of the text 
files they add and hope they do it right?

Q3: Can I tell SVN "all files in this repo, if not otherwise marked, 
have svn:eol-style=native"?

I believe these are the answers, but please confirm and comment:

A1: Yes
A2: Yes
A3: No

I have a 7GB (compressed) repository with tens of thousands of files and 
30 users.  I recently converted it to SVN from CVS.

Thanks,

Chris

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Setting svn:eol-style=native

Posted by Chris Stankevitz <cs...@toyon.com>.
Chris Stankevitz wrote:
> Q3: Can I tell SVN "all files in this repo, if not otherwise marked, 
> have svn:eol-style=native"?

Add a cron job that runs every 5 minutes:

svn propset -R svn:eol-style native file:///var/svn/repo/trunk

That command does not set eol-style on binaries.

Chris

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Setting svn:eol-style=native

Posted by Martin Scharrer <ma...@madmarty.de>.
On Monday 11 December 2006 21:45, Chris Stankevitz wrote:
> > Q2: Do I need to train my users to set this style for each of the text
> > files they add and hope they do it right?
> Yes, SVN requires your users to be aware of svn:eol-style=native
>
> > Q3: Can I tell SVN "all files in this repo, if not otherwise marked,
> > have svn:eol-style=native"?
>
> I do not know.

To Q2 and maybe Q3:
You can use auto-props to set properties automatically when added.
To do this add (or enable) this following lines in your ~/.subversion/config 
file (see svn-book for Windows location):

---------------------------------------------------
[miscellany]
enable-auto-props = yes

[auto-props]
*.c = svn:eol-style=native;svn:keywords=Id  # Example only 
*.cpp = svn:eol-style=native                        # Example only
...
---------------------------------------------------

You have to add all your normal filetypes like shown above. 
Then you have to give this config file to all users, because it's a per user 
config file.

Also some hook-script could do the job, but I don't know much about them. 
Check the docs.

Other note: You should be carefully checking that the file you add has to 
correct local line ending (also Linux-EOL under Linux and Windows-EOL under 
Windows), there could be problems otherwise. But normally this is already the 
case.

best,
Martin

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Setting svn:eol-style=native

Posted by Erik Huelsmann <eh...@gmail.com>.
On 12/11/06, Chris Stankevitz <cs...@toyon.com> wrote:
> Chris Stankevitz wrote:
> > Q1: Do I need to set svn:eol-style=native on each of my text files on
> > each my branches and each of my tags?
>
> No, svn2cvs did this already.
>
> > Q2: Do I need to train my users to set this style for each of the text
> > files they add and hope they do it right?
>
> Yes, SVN requires your users to be aware of svn:eol-style=native
>
> > Q3: Can I tell SVN "all files in this repo, if not otherwise marked,
> > have svn:eol-style=native"?
>
> I do not know.

No, you can't. (but have a look at auto-props.)

bye,

Erik.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Setting svn:eol-style=native

Posted by Chris Stankevitz <cs...@toyon.com>.
Chris Stankevitz wrote:
> Q1: Do I need to set svn:eol-style=native on each of my text files on 
> each my branches and each of my tags?

No, svn2cvs did this already.

> Q2: Do I need to train my users to set this style for each of the text 
> files they add and hope they do it right?

Yes, SVN requires your users to be aware of svn:eol-style=native

> Q3: Can I tell SVN "all files in this repo, if not otherwise marked, 
> have svn:eol-style=native"?

I do not know.



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org