Updates:
        Status: Confirmed

Comment #7 on issue 1668 by chipx86: Diffs not applying cleanly circa 1.0.7 with odd line endings
http://code.google.com/p/reviewboard/issues/detail?id=1668

Nevermind, I have a test case now. I just don't have a fix that's working.

The problem is that we do newline normalization so that files with lines ending in \r, \n, \r\n, or \r\r\n are processed correctly, but this completely breaks with the
patch files.

If you have:

foo
bar^M
foo^Mbaz
foo

And then you add a couple lines, diff will give you:

 foo
+hello
 bar^M
 foo^Mbaz
 foo
+world

See how diff considers the ^M to be part of the string, not a newline.

However, our parser will see that ^M and try to make it a newline, in order to work around other file formats and oddities. This then breaks us, since we'll get a
normalized diff that looks like:

 foo
+hello
 bar
 foo
baz
 foo
+world


We may have to process diffs separately, but it's going to be hard to do so without
causing new problems.

I'd be really interested in finding out how these files are getting so messed up.

--
You received this message because you are subscribed to the Google Groups 
"reviewboard-issues" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/reviewboard-issues?hl=en.

Reply via email to