Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 1166 by f...@datasynapse.com: view diff failed for files contain  
Mac newline char (i.e. CR \r)  -- use SVN client
http://code.google.com/p/reviewboard/issues/detail?id=1166

*NOTE: Do not post confidential information in this bug report.*

What version are you running?
RB 1.0rc2 on linux
RBTools-0.2beta1-py2.5 on windows

What's the URL of the page containing the problem?
click "view diff"

What steps will reproduce the problem?
1. in my svn repos, i have a file that uses \r as line separater in
portions, make some change in working copy and use post-review to create
review request
2. click "view diff" it says "The patch to '/modules/cpp-
support/trunk/build/openssl/pom.win32-vc6.xml' didn't apply cleanly, blah
blah"


What is the expected output? What do you see instead?
click "view diff" it says "The patch to '/modules/cpp-
support/trunk/build/openssl/pom.win32-vc6.xml' didn't apply cleanly, blah
blah"


What operating system are you using? What browser?
run post-review on windows; ReviewBoard server on linux; SVN

Please provide any additional information below.
As some portion of the file contains only \r, GNU diff doesn't treat it as
a line separator, the generated patch file has very small line number in
chunk range and long single context lines contains \r. However post-review
sets 'universal_newlines=True' in execute(), when long context lines are
splitted when "svn diff" returns from execute() and thus generates a
corrupted patch file.
What's more review board also tries to normalize new lines in
reviewboard/diffviewer/diffutils.py, so this will damage patches lines
that contains only '\r'

I'm attaching the source file and the corrupted diff file, as you can see,
also the chunk range says @@ -1,3 +1,3 @@, there are around a dozen
context lines in the chunk.

--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

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

Reply via email to