View Issue Details

IDProjectCategoryView StatusLast Update
0000093Subversion for OS/2 & eCSpublic2007-03-09 06:50
Reporterbrendan Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status newResolutionopen 
Summary0000093: Output of 'svn diff' on LF-only files lacks CR
DescriptionCheck out a file in UNIX format.
Edit it.
Run 'svn diff'
Output is hard to read because newlines don't contain CR:

#svn diff
Index: unixfile.txt
===================
--- unixfile.txt (revision 2)
+++ unixfile.txt (working copy)
@@ -1,4 +1,4 @@
 This is a test file for Subversion

                                   -This line contains the text to be modified.

+This line contains the text which is modified.
                                                
\ No newline at end of file
Additional InformationI did not see this problem in the previous version.
TagsNo tags attached.
Attached Files
diff_sample.zip (2,294 bytes)

Activities

Steven Levine

2007-02-28 02:08

manager   ~0000542

Just a note to say this issue still exists in 1.4.3.

Steven Levine

2007-03-09 04:41

manager   ~0000549

Hi,

I've done some analysis of this issue. Best I can tell the subversion code is OK. It uses APR_EOL to ensure that the correct EOL markers are used. This means that the diff headers have the correct EOL markers. The source code lines are what have incorrect EOL markers. This is probably because these lines are output by lower level stream output functions in the APR runtime that do not honore APR_EOL.

I'll add some more to this note when I track down the code that is actually ouputting the unified diff source lines.

Steven Levine

2007-03-09 06:50

manager   ~0000550

At bit more hunting makes me suspect that svn_subst_translation_required() in
subversion\libsvn_subr\subst.c might be a possible culprit. The working copies have CR/NL EOLs while the text_base copies have unix style NL EOLs.

It's also possible that the translation happens for the diff phase, but is neglected for the output phase. This would occur if the file images used for the diff phase is discarded after it is tokenized. If so, the would need to be retrieved again when to differences are output.

Issue History

Date Modified Username Field Change
2006-09-30 16:56 brendan New Issue
2007-02-28 02:08 Steven Levine Note Added: 0000542
2007-03-09 04:34 Steven Levine File Added: diff_sample.zip
2007-03-09 04:41 Steven Levine Note Added: 0000549
2007-03-09 06:50 Steven Levine Note Added: 0000550