Hi Christian,

Thank you for your reply.

We have both Windows and Linux clients need to take care of. Engineers
choose the client by themselves. And we also have both Windows and Linux
clients for perforce.

And in this weired case, the file exists in perforce for long time before
using ReviewBoard. Actually, I don't know who and how created it. So when
this case happened, I just suggested the engineer remove the \r\n\r and it
worked fine.
But unfortunately, two weeks ago, another engineer met a simular case, and
at this time, she had to keep this newline since her script didn't work on
Windows without this strange newline.  :( So, I suggested her to send the
perforce diff file through email to the reviewer and at the same time, I
filed bug to ReviewBoard org and also sent a email to the mail list.

Anyway, this kind of case is very rare, and I can ask engineer to do the
review by email instead of ReviewBoard. And of course, if RB team can
resolve this issue, it's the best result.

Thanks
Cynthia.

On Fri, Aug 13, 2010 at 6:39 PM, Christian Hammond <chip...@chipx86.com>wrote:

> 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<reviewboard%2bunsubscr...@googlegroups.com>
> For more options, visit this group at
> http://groups.google.com/group/reviewboard?hl=en
>



-- 
Best Regards.
=========================================================
  Cynthia.J.Yu
  Post Addr : 6-501, No.89, Mudan Road, Pudong,Shanghai, China
  Post Code : 201204
  Tel : 021-50590725
  Email : cynthia.j...@gmail.com
=========================================================

-- 
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