[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

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

From: solo turn <soloturn99_at_yahoo.com>
Date: 2002-11-12 17:52:20 CET

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 <brane@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 <raphel.garcia-suarez@hexaflux.com>
> wrote:
> >
> >
> >>solo turn <soloturn99@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 <brane_at_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
Received on Tue Nov 12 17:53:04 2002

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.