You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by Trustin Lee <tr...@gmail.com> on 2005/12/03 05:44:51 UTC

[OT] Text file CR/LF rules

Hi all,

I'm using UNIX text file format, but I found some patches are in DOS text
file format, which has an extra '\r' in a line.  This confuses the diff
engine and replaces the whole source code, and make the change is
huge. (e.gSVN commit notification)

So it would be great if all of use UNIX text file format.  (though I bet all
PMC members uses it. :)

Trustin
--
what we call human nature is actually human habit
--
http://gleamynode.net/

Re: [OT] Text file CR/LF rules

Posted by Ersin Er <er...@gmail.com>.
On 12/4/05, Trustin Lee <tr...@gmail.com> wrote:
> Hi Ersin,
>
> 2005/12/3, Ersin Er <er...@gmail.com>:
> > This brings us to a point of writing a Style Guide and making some
> > checks via maven code style checking plugin (
> >
> http://maven.apache.org/maven-1.x/reference/plugins/checkstyle/
> ).
> >
> > I was going to say we could share our Eclipse Formatter exports and
> > for example I've just seen that Maven guys do that:
> > http://maven.apache.org/developers/code-style.html
>
> I attached an Eclipse formatter strrings file I use in this message.

Thanks Trustin,

I haven't imported it yet but let's all take your export and try and
comment on this to determine a common format. (Ofcourse we may not all
agree perfectly.)

> Trustin
> --
> what we call human nature is actually human habit
> --
> http://gleamynode.net/
>


--
Ersin

Re: [OT] Text file CR/LF rules

Posted by Trustin Lee <tr...@gmail.com>.
Hi Ersin,

2005/12/3, Ersin Er <er...@gmail.com>:
>
> This brings us to a point of writing a Style Guide and making some
> checks via maven code style checking plugin (
> http://maven.apache.org/maven-1.x/reference/plugins/checkstyle/ ).
>
> I was going to say we could share our Eclipse Formatter exports and
> for example I've just seen that Maven guys do that:
> http://maven.apache.org/developers/code-style.html


I attached an Eclipse formatter strrings file I use in this message.

Trustin
--
what we call human nature is actually human habit
--
http://gleamynode.net/

Re: [OT] Text file CR/LF rules

Posted by Ersin Er <er...@gmail.com>.
On 12/3/05, Alex Karasulu <ao...@bellsouth.net> wrote:
> Trustin Lee wrote:
>
> > Hi all,
> >
> > I'm using UNIX text file format, but I found some patches are in DOS
> > text file format, which has an extra '\r' in a line.  This confuses
> > the diff engine and replaces the whole source code, and make the
> > change is huge. ( e.g SVN commit notification)
> >
> > So it would be great if all of use UNIX text file format.  (though I
> > bet all PMC members uses it. :)
>
> Yep UNIX format regardless of platform.  Also no tabs just use spaces
> for tabs (length = 4) ... saying this because it causes the same
> problem: svn diffs get messed up.
>
> Alex
>
>

This brings us to a point of writing a Style Guide and making some
checks via maven code style checking plugin (
http://maven.apache.org/maven-1.x/reference/plugins/checkstyle/ ).

I was going to say we could share our Eclipse Formatter exports and
for example I've just seen that Maven guys do that:
http://maven.apache.org/developers/code-style.html

--
Ersin

Re: [OT] Text file CR/LF rules

Posted by Alex Karasulu <ao...@bellsouth.net>.
Trustin Lee wrote:

> Hi all,
>
> I'm using UNIX text file format, but I found some patches are in DOS 
> text file format, which has an extra '\r' in a line.  This confuses 
> the diff engine and replaces the whole source code, and make the 
> change is huge. ( e.g SVN commit notification)
>
> So it would be great if all of use UNIX text file format.  (though I 
> bet all PMC members uses it. :)

Yep UNIX format regardless of platform.  Also no tabs just use spaces 
for tabs (length = 4) ... saying this because it causes the same 
problem: svn diffs get messed up.

Alex


Re: [OT] Text file CR/LF rules

Posted by Trustin Lee <tr...@gmail.com>.
Hi Brett,

2005/12/5, Brett Porter <br...@gmail.com>:
>
> What were the specific circumstances that led to this? Was a file
> missing the eol-style property?


I didn't have much time to investigate on this problem.  This might be
because I switched my Subversion from windows native version to what is
bundled with cygwin.

Trustin
--
what we call human nature is actually human habit
--
http://gleamynode.net/

Re: [OT] Text file CR/LF rules

Posted by Brett Porter <br...@gmail.com>.
I don't think you can achieve anything different here. As long as
svn:eol-style is set correctly, and svn diff is used to create patches
then it should work fine regardless. I believe SVN will checkout sa
CRLF on Windows and LF on unix. I've certainly never had this problem
applying patches.

What were the specific circumstances that led to this? Was a file
missing the eol-style property?

- Brett

On 12/3/05, Trustin Lee <tr...@gmail.com> wrote:
> Hi all,
>
> I'm using UNIX text file format, but I found some patches are in DOS text
> file format, which has an extra '\r' in a line.  This confuses the diff
> engine and replaces the whole source code, and make the change is huge. (
> e.g SVN commit notification)
>
> So it would be great if all of use UNIX text file format.  (though I bet all
> PMC members uses it. :)
>
> Trustin
> --
> what we call human nature is actually human habit
> --
>  http://gleamynode.net/