You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@forrest.apache.org by David Crossley <cr...@apache.org> on 2005/06/11 16:23:20 UTC

svn: line-endings appropriate for your system (Was: svn commit: r190087)

Gregor J. Rothfuss wrote:
> Ferdinand Soethe wrote:
> 
> >Have now taken the time to find and incorporate the setting for the
> >line endings (different in windows of course). I you still come across
> >faulty ones I need to stop using subsclipse.
> 
> you might find this shell script for windows useful:
> 
> for /r %A in (*.xml) do dos2unix %A
> for /r %A in (*.xml) do svn propset svn:eol-style native %A

But why would you do dos2unix on a windows system?
Shouldn't it be unix2dos i.e. native?

Each committer must ensure that patches and new files
have line-endings appropriate for their own system. Then ensure
that your svn client automatically sets the 'svn:eol-style native'.
http://www.apache.org/dev/version-control.html#https-svn

People using fancy IDEs, i wonder if you would be better to do
your svn operations with the command-line client.

--David

Re: svn: line-endings appropriate for your system (Was: svn commit: r190087)

Posted by David Crossley <cr...@apache.org>.
Gregor J. Rothfuss wrote:
> David Crossley wrote:
> 
> >>every time i run forrest and then want to check in the new site into 
> >>svn, i have to do this, or SVN will complain. running the command above 
> >>fixes this.
> >
> >There is a problem if you need to do this. Perhaps there is a
> >file in forrest that has mixed line-endings, or you have some site
> >configuration files with mixed line-endings, or perhaps there is
> >a problem in one of the plugins.
> 
> i for one, will be very happy if i no longer have to check in whole 
> sites to do a site update :) for me, that is one of the key motivations 
> to get doco working.
> 
> the spike in http://people.apache.org/~coar/commits_lenya_apache_org.png 
> is from my last 'commit the whole site' adventure. it sent 300 mails.

Well a lot of it is from someone's misconfigured subversion client.
I saw stacks of voluminous PDF diffs. That is because it has the wrong
svn properties. PDF should be not be treated as text. The example configuration
file [1] prevents such a mess.

[1] http://www.apache.org/dev/version-control.html#https-svn

--David

Re: svn: line-endings appropriate for your system (Was: svn commit: r190087)

Posted by "Gregor J. Rothfuss" <gr...@apache.org>.
David Crossley wrote:

>>every time i run forrest and then want to check in the new site into 
>>svn, i have to do this, or SVN will complain. running the command above 
>>fixes this.
> 
> There is a problem if you need to do this. Perhaps there is a
> file in forrest that has mixed line-endings, or you have some site
> configuration files with mixed line-endings, or perhaps there is
> a problem in one of the plugins.

i for one, will be very happy if i no longer have to check in whole 
sites to do a site update :) for me, that is one of the key motivations 
to get doco working.

the spike in http://people.apache.org/~coar/commits_lenya_apache_org.png 
is from my last 'commit the whole site' adventure. it sent 300 mails.


Re: svn: line-endings appropriate for your system (Was: svn commit: r190087)

Posted by David Crossley <cr...@apache.org>.
Gregor J. Rothfuss wrote:
> David Crossley wrote:
> 
> >>for /r %A in (*.xml) do dos2unix %A
> >>for /r %A in (*.xml) do svn propset svn:eol-style native %A
> >
> >But why would you do dos2unix on a windows system?
> >Shouldn't it be unix2dos i.e. native?
> 
> every time i run forrest and then want to check in the new site into 
> svn, i have to do this, or SVN will complain. running the command above 
> fixes this.

There is a problem if you need to do this. Perhaps there is a
file in forrest that has mixed line-endings, or you have some site
configuration files with mixed line-endings, or perhaps there is
a problem in one of the plugins.

> >Each committer must ensure that patches and new files
> >have line-endings appropriate for their own system. Then ensure
> >that your svn client automatically sets the 'svn:eol-style native'.
> >http://www.apache.org/dev/version-control.html#https-svn
> 
> i have this set up, doesn't matter for updates

Yes, not for updates. That configuration file is for doing
the 'svn add'.

> >People using fancy IDEs, i wonder if you would be better to do
> >your svn operations with the command-line client.
> 
> it's not fancy, and has nothing to do with IDEs, sorry ;)

Well i have seen a lot of trouble from poorly configured
Eclipse systems.

--David

Re: svn: line-endings appropriate for your system (Was: svn commit: r190087)

Posted by David Crossley <cr...@apache.org>.
Thorsten Scherler wrote:
> Gregor J. Rothfuss wrote:
> > David Crossley wrote:
> > 
> > >>for /r %A in (*.xml) do dos2unix %A
> > >>for /r %A in (*.xml) do svn propset svn:eol-style native %A
> > > 
> > > But why would you do dos2unix on a windows system?
> > > Shouldn't it be unix2dos i.e. native?
> 
> It has to be on a windows box dos2unix because our SVN server is set up
> on linux. With other words dos2unix = dos2native in our case.

No that is not true. The SVN property 'svn:eol-style native' ensures
that the line-endings are adjusted on checkout, to the native line-endings
of your operating system.

The following section of the SVN Book thoroughly explains the issue,
its impact on other developers, and the solution.
http://svnbook.red-bean.com/en/1.0/svn-book.html#svn-ch-7-sect-2.3.5

--David

Re: svn: line-endings appropriate for your system (Was: svn commit: r190087)

Posted by "Gregor J. Rothfuss" <gr...@apache.org>.
Thorsten Scherler wrote:

>>i have this set up, doesn't matter for updates
> 
> Hmm, could it be that this is a svn bug on windows? I am on debian
> derivate linux and since I set it up it works like a charm.

it only gets applied on add, not update. and no, this is not a bug ;)

> ...just use e.g. unbuntu and you will never miss windows and have always
> eol-style set. ;-)

sorry, but that was lame.


Re: svn: line-endings appropriate for your system (Was: svn commit: r190087)

Posted by Thorsten Scherler <th...@apache.org>.
On Sat, 2005-06-11 at 12:40 -0400, Gregor J. Rothfuss wrote:
> David Crossley wrote:
> 
> >>for /r %A in (*.xml) do dos2unix %A
> >>for /r %A in (*.xml) do svn propset svn:eol-style native %A
> > 
> > But why would you do dos2unix on a windows system?
> > Shouldn't it be unix2dos i.e. native?
> 

It has to be on a windows box dos2unix because our SVN server is set up
on linux. With other words dos2unix = dos2native in our case.

> every time i run forrest and then want to check in the new site into 
> svn, i have to do this, or SVN will complain. running the command above 
> fixes this.
> 
> > Each committer must ensure that patches and new files
> > have line-endings appropriate for their own system. Then ensure
> > that your svn client automatically sets the 'svn:eol-style native'.
> > http://www.apache.org/dev/version-control.html#https-svn
> 
> i have this set up, doesn't matter for updates
> 

Hmm, could it be that this is a svn bug on windows? I am on debian
derivate linux and since I set it up it works like a charm.

...just use e.g. unbuntu and you will never miss windows and have always
eol-style set. ;-)

salu2
-- 
thorsten

"Together we stand, divided we fall!" 
Hey you (Pink Floyd)


Re: svn: line-endings appropriate for your system (Was: svn commit: r190087)

Posted by "Gregor J. Rothfuss" <gr...@apache.org>.
David Crossley wrote:

>>for /r %A in (*.xml) do dos2unix %A
>>for /r %A in (*.xml) do svn propset svn:eol-style native %A
> 
> But why would you do dos2unix on a windows system?
> Shouldn't it be unix2dos i.e. native?

every time i run forrest and then want to check in the new site into 
svn, i have to do this, or SVN will complain. running the command above 
fixes this.

> Each committer must ensure that patches and new files
> have line-endings appropriate for their own system. Then ensure
> that your svn client automatically sets the 'svn:eol-style native'.
> http://www.apache.org/dev/version-control.html#https-svn

i have this set up, doesn't matter for updates

> People using fancy IDEs, i wonder if you would be better to do
> your svn operations with the command-line client.

it's not fancy, and has nothing to do with IDEs, sorry ;)