You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by solo turn <so...@yahoo.com> on 2002/11/12 11:06:12 UTC

cr, lf on merge ... implement or use gnu diff option?

is it possible to tell diff/diff3 to ignore linebreaks on text files,
to get a behaviour like:
- ms visual source safe
- perforce (http://www.perforce.com/perforce/technotes/note063.html)
  share: option for line-end treatment.
  (the other options local/win/mac are probably
  legacy ... and don't help the user at all)

or is this something which has to be implemented in svn?


__________________________________________________
Do you Yahoo!?
U2 on LAUNCH - Exclusive greatest hits videos
http://launch.yahoo.com/u2

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

Re: cr, lf on merge ... implement or use gnu diff option?

Posted by Rafael Garcia-Suarez <rg...@free.fr>.
Lele Gaifax wrote:
> >>>>> On Tue, 12 Nov 2002 08:52:20 -0800 (PST), solo turn <so...@yahoo.com> said:
> 
>     st> perforce handles that via saying: unix, max-os-X use lf, so we
>     st> in the repository use linefeed. for macos you have to tell
>     st> poeple what to do.

And thus with Perforce you can't force (to my knowledge) different line
endings on different text files in your project. That's a bit annoying when
you want to provide, say, a UNIX makefile and a Windows/MSVC++ makefile.
Of course, when the project is checked-out, you get the correct line endings
for your platform, but that's not what you want if you want to pack everything
in a tarball for public release.

>     st> for win, the cr are striped away when transferring to the
>     st> repository, and also when doing diffs.
> 
> This would be wrong! I "love"/"hate" WinCVS(*) for this every day, but
> as already said by Ben, it's the wrong approach to the problem.
> Please, consider using a better/smarter editor that does not hurt your
> sources that way.

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

Re: cr, lf on merge ... implement or use gnu diff option?

Posted by Lele Gaifax <le...@seldati.it>.
>>>>> On Tue, 12 Nov 2002 08:52:20 -0800 (PST), solo turn <so...@yahoo.com> said:

    st> perforce handles that via saying: unix, max-os-X use lf, so we
    st> in the repository use linefeed. for macos you have to tell
    st> poeple what to do.

    st> for win, the cr are striped away when transferring to the
    st> repository, and also when doing diffs.

This would be wrong! I "love"/"hate" WinCVS(*) for this every day, but
as already said by Ben, it's the wrong approach to the problem.
Please, consider using a better/smarter editor that does not hurt your
sources that way.

ciao, lele.

(*) CVS does not work with cr-lf convention, so WinCVS has on option
to automatically add/remove that "spurious" (I'm maybe too biased here
:) CR. But I think the convention used should not be a matter of the
version control system, that IMHO *should*not* alter my source in any
way.
-- 
nickname: Lele Gaifax	| Quando vivro' di quello che ho pensato ieri
real: Emanuele Gaifas	| comincero' ad aver paura di chi mi copia.
email: lele@seldati.it	|		-- Fortunato Depero, 1929.


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

Re: cr, lf on merge ... implement or use gnu diff option?

Posted by Branko Čibej <br...@xbc.nu>.
All right, this is a pretty standard problem if you have files with
mixed line endings. To answer your original question: no, diff/diff3 do
not, in general, handle this situation graceully.

Now, please explain why you don't set the property svn:eol-style to
'native' on text files? If you do that, Subversion will automagically
convert the end-of-line markers to whatever is appropriate to the client
system, and leave them in a canonical form in the repository.

Your recipe for adding new text files should be:
$ svn add foo
$ svn propset svn:eol-style native foo
$ svn commit ...

You can do the same (without the add) to fix your local files, but you
should convert all line endings to the local style first.

solo turn wrote:

>file test.txt created on two plattforms. the lines have "unix", or
>"win" in them, depending where they were created, i.e. lf as end for
>unix, and cr-lf for win (they are in the repository that way):
>
>then you modify the working copy.
>
>file "test.txt" saved one time as type "unix"
>C:\tmp\t>svn diff test.txt
>Index: test.txt
>====================================
>--- test.txt    (revision 14)
>+++ test.txt    (working copy)
>@@ -1,4 +1,4 @@
>-2nd line, win
>+2nd line, win
> 3nd line, unix
> 4nd line, unix
>-1st line, win
>+1st line, win
>
>file "test.txt" saved one time as type "win"
>C:\tmp\t>svn diff test.txt
>Index: test.txt
>====================================
>--- test.txt    (revision 14)
>+++ test.txt    (working copy)
>@@ -1,4 +1,4 @@
> 2nd line, win
>-3nd line, unix
>-4nd line, unix
>+3nd line, unix
>+4nd line, unix
> 1st line, win
>
>
>the questions were:
>why the original line endings are stored in the repository (win, unix
>mixed together), does svn not know the difference between "text" and
>"binary"?
>
>and IF they are stored the way they are stored, can one get rid of
>diffs aware of line-endings by specifying an option somewhere, or
>somebody has to program something to reach this?
>
>the should-be result would be something like (display NO difference):
>C:\tmp\t>diff --strip-trailing-cr tdos.txt tu.txt
>
>C:\tmp\t>
>
>perforce handles that via saying: unix, max-os-X use lf, so we in the
>repository use linefeed. for macos you have to tell poeple what to
>do.
>
>for win, the cr are striped away when transferring to the repository,
>and also when doing diffs.
>
>(and sorry, i can't reproduce the two-lines get one line in a merge
>any more .... but it had been some variation of the above).
>  
>


-- 
Brane Čibej   <br...@xbc.nu>   http://www.xbc.nu/brane/


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

Re: cr, lf on merge ... implement or use gnu diff option?

Posted by Blair Zajac <bl...@orcaware.com>.
Ben Collins-Sussman wrote:
> 
> solo turn <so...@yahoo.com> writes:
> 
> > why the original line endings are stored in the repository (win, unix
> > mixed together), does svn not know the difference between "text" and
> > "binary"?
> 
> svn only "canonicalizes" line endings if you set the svn:eol-style
> property on a file to "native".  Otherwise it treats all data as
> data.  Wouldn't it be ridiculous if you had a completely win32
> project, and the server stored everything as LF in the repository?  Of
> course it would.

I recall looking at the code that if svn:eol-style is set to
something but native, then it'll convert any eol's that are not
of the specified svn:eol-style setting to that type of eol.  So
there is a transformation of the original file that may happen
upon commit.

I may be wrong about this though.

> 
> Have you read about svn:eol-style in the Book?
> 
>     http://svnbook.red-bean.com/book.html#svn-ch-6-sect-2.1

This could go into greater detail about how the eol code works.

Best,
Blair

-- 
Blair Zajac <bl...@orcaware.com>
Web and OS performance plots - http://www.orcaware.com/orca/

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

Re: cr, lf on merge ... implement or use gnu diff option?

Posted by Noel Yap <ya...@yahoo.com>.
--- Ben Collins-Sussman <su...@collab.net> wrote:
> Are you talking about the plain 'diff' program?  I
> don't personally
> know if 'diff' has switches that make it agnostic
> towards different
> line-endings.

GNU diff says that it has a --strip-trailing-cr option
that will "Strip trailing carriage return on input".

HTH,
Noel

__________________________________________________
Do you Yahoo!?
U2 on LAUNCH - Exclusive greatest hits videos
http://launch.yahoo.com/u2

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

Re: cr, lf on merge ... implement or use gnu diff option?

Posted by Ben Collins-Sussman <su...@collab.net>.
solo turn <so...@yahoo.com> writes:

> - we can set svn:eol-style=native
>   as default for text files.

Yes, this is what you want.  You've said that your group is moving
away from CVS.  CVS has this behavior turned on by default, so you're
probably already used to it.


>   which still leaves us with: what do i do
>   with a file i get from unix (samba eg.),
>   and i'm now working on win and my diff
>   complains ...

Are you talking about the plain 'diff' program?  I don't personally
know if 'diff' has switches that make it agnostic towards different
line-endings.  But that's not Subversion's problem.  You're talking
about a general problem with 'diff'.

If you're talking about the 'svn diff' command, then it will do what
you want, provided that the thing you're diffing has the eol-style
'native' property.


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

Re: cr, lf on merge ... implement or use gnu diff option?

Posted by solo turn <so...@yahoo.com>.
- an average developer never touches a makefile.
  we have a few in a ~5000 files
  and we one or two persons edit them,
  and they are already legacy.
  jakarta ant gets used wherever possible.

- problems with other tools:
  source safe:
    no.
  cvs:
    i can only tell that people did not complain.

--- Noel Yap <ya...@yahoo.com> wrote:
> --- solo turn <so...@yahoo.com> wrote:
> > our users did not care about line endings up to now,
> > and i don't
> > think we should introduce this now, in 2002, cause
> > of svn, by letting
> > users add a property cause there is one makefile in
> > our 5000 text
> > files.
> > 
> > for me there seem two solutions:
> > 
> > - we can set diff to ignore line
> >   endings on text files.
> >   
> >   this seems to be the simplest solution
> >   but you have to provide some exception
> >   for make files ... cause the line-ending
> >   matters (with svn:eol-style=lf eg?)
> > 
> > - we can set svn:eol-style=native
> >   as default for text files.
> >   in rare cases (for makefiles e.g) we would
> >   set it differently.
> > 
> >   which still leaves us with: what do i do
> >   with a file i get from unix (samba eg.),
> >   and i'm now working on win and my diff
> >   complains ...
> > 
> > so basically it boils down to:
> > i don't care what the server stores, as long the
> > client does not
> > bother about line-endings, no matter if i compare
> > files with unix-,
> > win-, or whatever line-endings.
> 
> I don't understand.  If line-ending format matters for
> makefiles, and developers are allowed to modify the
> makefiles, doesn't this imply that developers need to
> worry about line-ending format?
> 
> Noel
> 
> > and i think your winnt example is perferct for "its
> > not ridiculous,
> > cause no svn user cares, and no svn user will ever
> > notice it.". and
> > good software has the property: you don't notice it,
> > cause it does it
> > FOR you.
> 
> This is a philosophical difference.  There are certain
> things I'd prefer the tool to do automatically, and
> other things I don't.  No software tool of mine should
> automatically mangle line endings (as many windows
> editors do) unless the tool itself is meant for that
> sole purpose (eg dos2unix and unix2dos).
> 
> > we, btw, do have a mixed environment, and we try to
> > replace cvs,
> > microsoft vss, and some other strange unusable
> > proprietary tool.
> 
> Have you had the same problem with the other tools?
> Noel
> 
> __________________________________________________
> Do you Yahoo!?
> U2 on LAUNCH - Exclusive greatest hits videos
> http://launch.yahoo.com/u2


__________________________________________________
Do you Yahoo!?
U2 on LAUNCH - Exclusive greatest hits videos
http://launch.yahoo.com/u2

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

Re: cr, lf on merge ... implement or use gnu diff option?

Posted by Noel Yap <ya...@yahoo.com>.
--- solo turn <so...@yahoo.com> wrote:
> our users did not care about line endings up to now,
> and i don't
> think we should introduce this now, in 2002, cause
> of svn, by letting
> users add a property cause there is one makefile in
> our 5000 text
> files.
> 
> for me there seem two solutions:
> 
> - we can set diff to ignore line
>   endings on text files.
>   
>   this seems to be the simplest solution
>   but you have to provide some exception
>   for make files ... cause the line-ending
>   matters (with svn:eol-style=lf eg?)
> 
> - we can set svn:eol-style=native
>   as default for text files.
>   in rare cases (for makefiles e.g) we would
>   set it differently.
> 
>   which still leaves us with: what do i do
>   with a file i get from unix (samba eg.),
>   and i'm now working on win and my diff
>   complains ...
> 
> so basically it boils down to:
> i don't care what the server stores, as long the
> client does not
> bother about line-endings, no matter if i compare
> files with unix-,
> win-, or whatever line-endings.

I don't understand.  If line-ending format matters for
makefiles, and developers are allowed to modify the
makefiles, doesn't this imply that developers need to
worry about line-ending format?

Noel

> and i think your winnt example is perferct for "its
> not ridiculous,
> cause no svn user cares, and no svn user will ever
> notice it.". and
> good software has the property: you don't notice it,
> cause it does it
> FOR you.

This is a philosophical difference.  There are certain
things I'd prefer the tool to do automatically, and
other things I don't.  No software tool of mine should
automatically mangle line endings (as many windows
editors do) unless the tool itself is meant for that
sole purpose (eg dos2unix and unix2dos).

> we, btw, do have a mixed environment, and we try to
> replace cvs,
> microsoft vss, and some other strange unusable
> proprietary tool.

Have you had the same problem with the other tools?
Noel

__________________________________________________
Do you Yahoo!?
U2 on LAUNCH - Exclusive greatest hits videos
http://launch.yahoo.com/u2

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

Re: cr, lf on merge ... implement or use gnu diff option?

Posted by solo turn <so...@yahoo.com>.
our users did not care about line endings up to now, and i don't
think we should introduce this now, in 2002, cause of svn, by letting
users add a property cause there is one makefile in our 5000 text
files.

for me there seem two solutions:

- we can set diff to ignore line
  endings on text files.
  
  this seems to be the simplest solution
  but you have to provide some exception
  for make files ... cause the line-ending
  matters (with svn:eol-style=lf eg?)

- we can set svn:eol-style=native
  as default for text files.
  in rare cases (for makefiles e.g) we would
  set it differently.

  which still leaves us with: what do i do
  with a file i get from unix (samba eg.),
  and i'm now working on win and my diff
  complains ...

so basically it boils down to:
i don't care what the server stores, as long the client does not
bother about line-endings, no matter if i compare files with unix-,
win-, or whatever line-endings.

ps:
and i think your winnt example is perferct for "its not ridiculous,
cause no svn user cares, and no svn user will ever notice it.". and
good software has the property: you don't notice it, cause it does it
FOR you.

we, btw, do have a mixed environment, and we try to replace cvs,
microsoft vss, and some other strange unusable proprietary tool.


--- Ben Collins-Sussman <su...@collab.net> wrote:
> svn only "canonicalizes" line endings if you set the svn:eol-style
> property on a file to "native".  Otherwise it treats all data as
> data.  Wouldn't it be ridiculous if you had a completely win32
> project, and the server stored everything as LF in the repository? 
> Of
> course it would.
> Have you read about svn:eol-style in the Book?
> 
>     http://svnbook.red-bean.com/book.html#svn-ch-6-sect-2.1


__________________________________________________
Do you Yahoo!?
U2 on LAUNCH - Exclusive greatest hits videos
http://launch.yahoo.com/u2

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

Re: cr, lf on merge ... implement or use gnu diff option?

Posted by Ben Collins-Sussman <su...@collab.net>.
solo turn <so...@yahoo.com> writes:

> why the original line endings are stored in the repository (win, unix
> mixed together), does svn not know the difference between "text" and
> "binary"?

svn only "canonicalizes" line endings if you set the svn:eol-style
property on a file to "native".  Otherwise it treats all data as
data.  Wouldn't it be ridiculous if you had a completely win32
project, and the server stored everything as LF in the repository?  Of
course it would.

Have you read about svn:eol-style in the Book?

    http://svnbook.red-bean.com/book.html#svn-ch-6-sect-2.1

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

Re: cr, lf on merge ... implement or use gnu diff option?

Posted by solo turn <so...@yahoo.com>.
file test.txt created on two plattforms. the lines have "unix", or
"win" in them, depending where they were created, i.e. lf as end for
unix, and cr-lf for win (they are in the repository that way):

then you modify the working copy.

file "test.txt" saved one time as type "unix"
C:\tmp\t>svn diff test.txt
Index: test.txt
====================================
--- test.txt    (revision 14)
+++ test.txt    (working copy)
@@ -1,4 +1,4 @@
-2nd line, win
+2nd line, win
 3nd line, unix
 4nd line, unix
-1st line, win
+1st line, win

file "test.txt" saved one time as type "win"
C:\tmp\t>svn diff test.txt
Index: test.txt
====================================
--- test.txt    (revision 14)
+++ test.txt    (working copy)
@@ -1,4 +1,4 @@
 2nd line, win
-3nd line, unix
-4nd line, unix
+3nd line, unix
+4nd line, unix
 1st line, win


the questions were:
why the original line endings are stored in the repository (win, unix
mixed together), does svn not know the difference between "text" and
"binary"?

and IF they are stored the way they are stored, can one get rid of
diffs aware of line-endings by specifying an option somewhere, or
somebody has to program something to reach this?

the should-be result would be something like (display NO difference):
C:\tmp\t>diff --strip-trailing-cr tdos.txt tu.txt

C:\tmp\t>

perforce handles that via saying: unix, max-os-X use lf, so we in the
repository use linefeed. for macos you have to tell poeple what to
do.

for win, the cr are striped away when transferring to the repository,
and also when doing diffs.

(and sorry, i can't reproduce the two-lines get one line in a merge
any more .... but it had been some variation of the above).

--- Branko Čibej <br...@xbc.nu> wrote:
> Could you please -- for a change -- describe exactly what your
> problem
> is, with examples, and exactly what behaviour you'd like to see,
> again
> with examples?
> 
> Also, you haven't answered Rafael's question: would an appropriate
> setting of svn:eol-style fix your problems? Have you tried that?
> 
> solo turn wrote:
> 
> >for our users its very simple:
> >"if my editor shows a line ending, then its a line ending .... why
> >svn is so stupid and does not know this? i want my visual source
> safe
> >back!"
> >
> >and the editors we use treat cr/lf/crlf/lfcr as line-ending.
> >
> >and we are not introducing cr-lf on unix, so our (dummy?) windows
> >users can safely receive files from the unix world.
> >
> >
> >--- Rafael Garcia-Suarez <ra...@hexaflux.com>
> wrote:
> >  
> >
> >>solo turn <so...@yahoo.com> wrote:
> >>    
> >>
> >>>is it possible to tell diff/diff3 to ignore linebreaks on text
> >>>      
> >>>
> >>files,
> >>
> >>AFAIK GNU diff / diff3 don't support this.
> >>I think you may want to use the svn:eol-style property.
> >>If this isn't sufficient for you, describe your problem
> >>more accurately.
> >>
> >>    
> >>
> >>>to get a behaviour like:
> >>>- ms visual source safe
> >>>- perforce
> >>>      
> >>>
> >>(http://www.perforce.com/perforce/technotes/note063.html)
> >>    
> >>
> >>>  share: option for line-end treatment.
> >>>  (the other options local/win/mac are probably
> >>>  legacy ... and don't help the user at all)
> >>>
> >>>or is this something which has to be implemented in svn?
> >>>      
> >>>
> >>    
> >>
>
>---------------------------------------------------------------------
> >  
> >
> >>To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
> >>For additional commands, e-mail: dev-help@subversion.tigris.org
> >>
> >>    
> >>
> >
> >
> >__________________________________________________
> >Do you Yahoo!?
> >U2 on LAUNCH - Exclusive greatest hits videos
> >http://launch.yahoo.com/u2
> >
>
>---------------------------------------------------------------------
> >To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
> >For additional commands, e-mail: dev-help@subversion.tigris.org
> >
> >  
> >
> 
> 
> -- 
> Brane Čibej   <br...@xbc.nu>   http://www.xbc.nu/brane/
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: dev-help@subversion.tigris.org
> 


__________________________________________________
Do you Yahoo!?
U2 on LAUNCH - Exclusive greatest hits videos
http://launch.yahoo.com/u2

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

Re: cr, lf on merge ... implement or use gnu diff option?

Posted by Branko Čibej <br...@xbc.nu>.
Could you please -- for a change -- describe exactly what your problem
is, with examples, and exactly what behaviour you'd like to see, again
with examples?

Also, you haven't answered Rafael's question: would an appropriate
setting of svn:eol-style fix your problems? Have you tried that?

solo turn wrote:

>for our users its very simple:
>"if my editor shows a line ending, then its a line ending .... why
>svn is so stupid and does not know this? i want my visual source safe
>back!"
>
>and the editors we use treat cr/lf/crlf/lfcr as line-ending.
>
>and we are not introducing cr-lf on unix, so our (dummy?) windows
>users can safely receive files from the unix world.
>
>
>--- Rafael Garcia-Suarez <ra...@hexaflux.com> wrote:
>  
>
>>solo turn <so...@yahoo.com> wrote:
>>    
>>
>>>is it possible to tell diff/diff3 to ignore linebreaks on text
>>>      
>>>
>>files,
>>
>>AFAIK GNU diff / diff3 don't support this.
>>I think you may want to use the svn:eol-style property.
>>If this isn't sufficient for you, describe your problem
>>more accurately.
>>
>>    
>>
>>>to get a behaviour like:
>>>- ms visual source safe
>>>- perforce
>>>      
>>>
>>(http://www.perforce.com/perforce/technotes/note063.html)
>>    
>>
>>>  share: option for line-end treatment.
>>>  (the other options local/win/mac are probably
>>>  legacy ... and don't help the user at all)
>>>
>>>or is this something which has to be implemented in svn?
>>>      
>>>
>>    
>>
>---------------------------------------------------------------------
>  
>
>>To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
>>For additional commands, e-mail: dev-help@subversion.tigris.org
>>
>>    
>>
>
>
>__________________________________________________
>Do you Yahoo!?
>U2 on LAUNCH - Exclusive greatest hits videos
>http://launch.yahoo.com/u2
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
>For additional commands, e-mail: dev-help@subversion.tigris.org
>
>  
>


-- 
Brane Čibej   <br...@xbc.nu>   http://www.xbc.nu/brane/


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

Re: cr, lf on merge ... implement or use gnu diff option?

Posted by Noel Yap <ya...@yahoo.com>.
--- solo turn <so...@yahoo.com> wrote:
> for our users its very simple:
> "if my editor shows a line ending, then its a line
> ending .... why
> svn is so stupid and does not know this? i want my
> visual source safe
> back!"

I don't understand your question.  Line endings imply
text files.  Are you asking why Subversion can't tell
the difference between text files and binary?  Or, are
you requesting that Subversion should tell the
difference?

The answer to the former is, "To a computer, there is
no difference between text and binary files; they're
just a bunch of bytes, after all.  Categorizing
something as text or binary is done by a person."

I believe Subversion has ample features to handle line
ending woes.

BTW, is VSS available on Unix now?

> and the editors we use treat cr/lf/crlf/lfcr as
> line-ending.

Good, now you just have to check if they're changing
the line endings.

> and we are not introducing cr-lf on unix, so our
> (dummy?) windows
> users can safely receive files from the unix world.

It would be Windows editors that would be (mangling
and) introducing CR/LF; Unix uses one-character line
endings.  Also, typically, Unix-origined editors are
aware of line-ending woes so they try their best to
stick to whatever the file is already using.  OTOH,
I've seen Windows-based editors not conform to this
convention and assume you want to use CR/LF no matter
what.

HTH,
Noel

__________________________________________________
Do you Yahoo!?
U2 on LAUNCH - Exclusive greatest hits videos
http://launch.yahoo.com/u2

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

Re: cr, lf on merge ... implement or use gnu diff option?

Posted by solo turn <so...@yahoo.com>.
for our users its very simple:
"if my editor shows a line ending, then its a line ending .... why
svn is so stupid and does not know this? i want my visual source safe
back!"

and the editors we use treat cr/lf/crlf/lfcr as line-ending.

and we are not introducing cr-lf on unix, so our (dummy?) windows
users can safely receive files from the unix world.


--- Rafael Garcia-Suarez <ra...@hexaflux.com> wrote:
> solo turn <so...@yahoo.com> wrote:
> > is it possible to tell diff/diff3 to ignore linebreaks on text
> files,
> 
> AFAIK GNU diff / diff3 don't support this.
> I think you may want to use the svn:eol-style property.
> If this isn't sufficient for you, describe your problem
> more accurately.
> 
> > to get a behaviour like:
> > - ms visual source safe
> > - perforce
> (http://www.perforce.com/perforce/technotes/note063.html)
> >   share: option for line-end treatment.
> >   (the other options local/win/mac are probably
> >   legacy ... and don't help the user at all)
> > 
> > or is this something which has to be implemented in svn?
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: dev-help@subversion.tigris.org
> 


__________________________________________________
Do you Yahoo!?
U2 on LAUNCH - Exclusive greatest hits videos
http://launch.yahoo.com/u2

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

Re: cr, lf on merge ... implement or use gnu diff option?

Posted by Rafael Garcia-Suarez <ra...@hexaflux.com>.
solo turn <so...@yahoo.com> wrote:
> is it possible to tell diff/diff3 to ignore linebreaks on text files,

AFAIK GNU diff / diff3 don't support this.
I think you may want to use the svn:eol-style property.
If this isn't sufficient for you, describe your problem
more accurately.

> to get a behaviour like:
> - ms visual source safe
> - perforce (http://www.perforce.com/perforce/technotes/note063.html)
>   share: option for line-end treatment.
>   (the other options local/win/mac are probably
>   legacy ... and don't help the user at all)
> 
> or is this something which has to be implemented in svn?

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