Hi Cynthia,

Is Linux at all used in any way for the client here (such as having the code
checked out on Linux and mounted on Windows), or is it purely Windows?

We have newline normalization that should take care of the newlines coming
from the diff and from the repository. In some cases, with very strange
newlines, this can fail. This appears to be one of those cases. Your
newlines look like \r\n\r, which we can't really normalize properly without
introducing new problems with other files.

Now, Perforce *should* be properly handling newlines between clients, if
you're dealing with an environment consisting of both Linux and Windows
Perforce clients. I don't know how you'd otherwise get a file into the state
you're showing in the attached file. That is, unless those characters are
there intentionally as part of some dataset, rather than being a consistent
newline indicator. If that's the case, then that is being tracked in our bug
tracker already, but is actually a really tricky problem to solve and
everything we've tried has broken other things.

Christian

-- 
Christian Hammond - chip...@chipx86.com
Review Board - http://www.reviewboard.org
VMware, Inc. - http://www.vmware.com


On Thu, Aug 12, 2010 at 10:40 PM, Cynthia Yu <cynthia.j...@gmail.com> wrote:

> I'm using review board 1.0.6, which is installed in Unbuntu. And I'm using 
> perforce as the source manangement system.
> At the same time, I'm using post-review tool to post review request from a 
> Window client on which installed Perforce client.
>
>
> I have a file created from Windows and it contains Windows endline charactor. 
> In Vim editer tool, this Win endline charator is shown as "^M".
> When I do modification for this file and post review request using 
> post-review, everything looks OK.
>
>
> But when I try to see the diff (clicking "View Diff" button) from review 
> board web GUI, weired error occured, like this:
>
> =========================
> Diff currently unavailable.
> Error: The patch to '//depot/playpen/b.txt' didn't apply cleanly. The 
> temporary files have been left in '/tmp/reviewboard.76Xlcj' for debugging 
> purposes. `patch` returned: patching file /tmp/reviewboard.76Xlcj/tmpOEenSn 
> patch: **** malformed patch at line 8: fgg
>
>
> Details
>
> Traceback (most recent call last):
>   File 
> "/usr/local/lib/python2.6/dist-packages/ReviewBoard-1.0.6-py2.6.egg/reviewboard/diffviewer/views.py",
>  line 214, in view_diff_fragment
>     file = get_requested_diff_file()
>
>
>   File 
> "/usr/local/lib/python2.6/dist-packages/ReviewBoard-1.0.6-py2.6.egg/reviewboard/diffviewer/views.py",
>  line 190, in get_requested_diff_file
>     get_chunks)
>   File 
> "/usr/local/lib/python2.6/dist-packages/ReviewBoard-1.0.6-py2.6.egg/reviewboard/diffviewer/diffutils.py",
>  line 623, in get_diff_files
>
>
>     large_data=True)
>   File 
> "/usr/local/lib/python2.6/dist-packages/Djblets-0.5.9-py2.6.egg/djblets/util/misc.py",
>  line 166, in cache_memoize
>     data = lookup_callable()
>   File 
> "/usr/local/lib/python2.6/dist-packages/ReviewBoard-1.0.6-py2.6.egg/reviewboard/diffviewer/diffutils.py",
>  line 622, in <lambda>
>
>
>     enable_syntax_highlighting),
>   File 
> "/usr/local/lib/python2.6/dist-packages/ReviewBoard-1.0.6-py2.6.egg/reviewboard/diffviewer/diffutils.py",
>  line 345, in get_chunks
>     new = get_patched_file(old, filediff)
>
>
>   File 
> "/usr/local/lib/python2.6/dist-packages/ReviewBoard-1.0.6-py2.6.egg/reviewboard/diffviewer/diffutils.py",
>  line 261, in get_patched_file
>     return patch(filediff.diff, buffer, filediff.dest_file)
>   File 
> "/usr/local/lib/python2.6/dist-packages/ReviewBoard-1.0.6-py2.6.egg/reviewboard/diffviewer/diffutils.py",
>  line 129, in patch
>
>
>     (filename, tempdir, patch_output))
> Exception: The patch to '//depot/playpen/b.txt' didn't apply cleanly. The 
> temporary files have been left in '/tmp/reviewboard.76Xlcj' for debugging 
> purposes.
>
>
> `patch` returned: patching file /tmp/reviewboard.76Xlcj/tmpOEenSn
> patch: **** malformed patch at line 8: fgg
>
> ======================
>
> I attached the file that I'm using, please take a look.
>
> Thanks
>
>
> Cynthia.J.Yu
>
>  --
> Want to help the Review Board project? Donate today at
> http://www.reviewboard.org/donate/
> Happy user? Let us know at http://www.reviewboard.org/users/
> -~----------~----~----~----~------~----~------~--~---
> To unsubscribe from this group, send email to
> reviewboard+unsubscr...@googlegroups.com<reviewboard%2bunsubscr...@googlegroups.com>
> For more options, visit this group at
> http://groups.google.com/group/reviewboard?hl=en

-- 
Want to help the Review Board project? Donate today at 
http://www.reviewboard.org/donate/
Happy user? Let us know at http://www.reviewboard.org/users/
-~----------~----~----~----~------~----~------~--~---
To unsubscribe from this group, send email to 
reviewboard+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/reviewboard?hl=en

Reply via email to