Hi,

Newline normalization is very hard to get right at the best of times, and
impossible at other times. When there's something like \r\n\n, it shows
that there's a problem on the client side. Generally, it's due to your
editor not handling it right, or your source control tools attempting its
own normalization, which is conflicting with things. Sometimes it's that
people on different platforms checked files with mixed line endings into
the repository and no normalization ever took place.

Basically, we can't solve this for you. You'll need to figure out why it
looks that way on your end and take care of it in the repository.

Wish I had a better answer for you.

Christian

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


On Wed, May 9, 2012 at 8:22 AM, Jean-Noel Meneghetti <
jeannoel.meneghe...@gmail.com> wrote:

> Hi,
>
> Python version: 2.5
> RBtools version: 0.4.1
> reviewboard version: 1.6.6
>
> I have the following error when I upload a diff file generated by
> reviewboard:
>
> The patch to '//mypath/Annotations.xml' didn't apply cleanly. The
> temporary files have been left in '/tmp/reviewboard.fe-Ge_' for debugging
> purposes. `patch` returned: patching file /tmp/reviewboard.fe-Ge_/tmpAKbuGL
> Hunk #1 FAILED at 55. 1 out of 1 hunk FAILED -- saving rejects to file
> /tmp/reviewboard.fe-Ge_/tmpAKbuGL-new.rej missing header for unified diff
> at line 29 of patch can't find file to patch at input line 29 Perhaps you
> should have used the -p or --strip option? The text leading up to this was:
> -------------------------- | </Table> | | <Table
> TableName="JobModifiedEntity"> | |- <Bidirectional UpQuery="WHERE 1=0"
> DownQuery="WHERE 1=1" /> | |+ <Bidirectional UpQuery='WHERE
> ReplicationState == "Satellite"' DownQuery='WHERE ReplicationState !=
> "Satellite"' /> | | </Table> | | <Table
> TableName="ActivatedKeyGroupPermission"> | | <Down /> |
> -------------------------- File to patch: Skip this patch? [y] Skipping
> patch. patch: **** malformed patch at line 36:
>
> Traceback (most recent call last):
>   File 
> "/usr/lib/python2.5/site-packages/ReviewBoard-1.6.6-py2.5.egg/reviewboard/diffviewer/views.py",
>  line 151, in view_diff
>     interdiffset, highlighting, True)
>   File 
> "/usr/lib/python2.5/site-packages/ReviewBoard-1.6.6-py2.5.egg/reviewboard/diffviewer/diffutils.py",
>  line 1072, in get_diff_files
>     large_data=True)
>   File 
> "/usr/lib/python2.5/site-packages/Djblets-0.6.16-py2.5.egg/djblets/util/misc.py",
>  line 157, in cache_memoize
>     data = lookup_callable()
>   File 
> "/usr/lib/python2.5/site-packages/ReviewBoard-1.6.6-py2.5.egg/reviewboard/diffviewer/diffutils.py",
>  line 1071, in <lambda>
>     enable_syntax_highlighting)),
>   File 
> "/usr/lib/python2.5/site-packages/ReviewBoard-1.6.6-py2.5.egg/reviewboard/diffviewer/diffutils.py",
>  line 553, in get_chunks
>     new = get_patched_file(old, filediff)
>   File 
> "/usr/lib/python2.5/site-packages/ReviewBoard-1.6.6-py2.5.egg/reviewboard/diffviewer/diffutils.py",
>  line 375, in get_patched_file
>     return patch(filediff.diff, buffer, filediff.dest_file)
>   File 
> "/usr/lib/python2.5/site-packages/ReviewBoard-1.6.6-py2.5.egg/reviewboard/diffviewer/diffutils.py",
>  line 243, in patch
>     (filename, tempdir, patch_output))
> Exception: The patch to '//mypath/Annotations.xml' didn't apply cleanly. The 
> temporary files have been left in '/tmp/reviewboard.fe-Ge_' for debugging 
> purposes.
> `patch` returned: patching file /tmp/reviewboard.fe-Ge_/tmpAKbuGL
> Hunk #1 FAILED at 55.
> 1 out of 1 hunk FAILED -- saving rejects to file 
> /tmp/reviewboard.fe-Ge_/tmpAKbuGL-new.rej
> missing header for unified diff at line 29 of patch
> can't find file to patch at input line 29
> Perhaps you should have used the -p or --strip option?
> The text leading up to this was:
> --------------------------
> | </Table>
> |
> | <Table TableName="JobModifiedEntity">
> |
> |-  <Bidirectional UpQuery="WHERE 1=0" DownQuery="WHERE 1=1" />
> |
> |+  <Bidirectional UpQuery='WHERE ReplicationState == "Satellite"' 
> DownQuery='WHERE ReplicationState != "Satellite"' />
> |
> | </Table>
> |
> | <Table TableName="ActivatedKeyGroupPermission">
> |
> |   <Down />
> |
> --------------------------
> File to patch:
> Skip this patch? [y]
> Skipping patch.
> patch: **** malformed patch at line 36:
>
>
>
>
>
> the diff files contains /r/r/n at the end of every lines.
>
> however, if I remove the /r manually, the diff files are processed
> correctly.
>
> I joined a working and a not working file example.
> Is there anything I can do against such issue?
>
> Best regards,
> Jean-Noël
>
>  --
> 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

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