Hi,

Your diff appears to have a bad mixture of line endings. Some lines use \n
(everything but the diff content), whereas the diff content uses \r\n. This
mixture is what's causing the parsing errors, as patch (and anything else)
will see extra newlines in the diff content.

This might be something you'd need to fix in the repository in this case,
but can you show me the full command you used to post the diff, along with
the --debug flag?

Was the source tree checked out on the Ubuntu system, or was it copied over
from another system?

Christian

-- 
Christian Hammond - christ...@beanbaginc.com
Review Board - https://www.reviewboard.org
Beanbag, Inc. - https://www.beanbaginc.com

On Thu, Feb 4, 2016 at 3:00 AM, Waqar Ali Khan <waqar.kha...@gmail.com>
wrote:

> Hello everyone,
> I am using Reviewboard 2.5.2 on Ubuntu and on client side using latest
> version of RBTools which is 0.7.5.
> When i am trying to post review for some files the diff is not showing
> giving following error. My repository is CVS based. I have attached the
> temporary files referenced in the error.
> My guess is that either CVS is not generating diff correctly or Review
> Board cannot read some of the diff files.
>
>      There was an error displaying this diff.
>     The patch to
> 'stencils/jasperReports/quickReports/AP/form1099Report.jrxml' didn't apply
> cleanly. The temporary files have been left in '/tmp/reviewboard.W0_4Ee'
> for debugging purposes.
> `patch` returned: patch: **** malformed patch at line 8499:
>
>      This may be a bug in the software, a temporary outage, or an issue
>      with the format of your diff.
>      Please try again, and if you still have trouble,
>      contact support.
>
> Traceback (most recent call last):
>   File
> "/opt/reviewboard/venv/local/lib/python2.7/site-packages/ReviewBoard-2.5.2-py2.7.egg/reviewboard/diffviewer/views.py",
> line 275, in get
>     response = renderer.render_to_response(request)
>   File
> "/opt/reviewboard/venv/local/lib/python2.7/site-packages/ReviewBoard-2.5.2-py2.7.egg/reviewboard/diffviewer/renderers.py",
> line 56, in render_to_response
>     return HttpResponse(self.render_to_string(request))
>   File
> "/opt/reviewboard/venv/local/lib/python2.7/site-packages/ReviewBoard-2.5.2-py2.7.egg/reviewboard/diffviewer/renderers.py",
> line 74, in render_to_string
>     large_data=True)
>   File
> "/opt/reviewboard/venv/local/lib/python2.7/site-packages/Djblets-0.9-py2.7.egg/djblets/cache/backend.py",
> line 295, in cache_memoize
>     compress_large_data))
>   File
> "/opt/reviewboard/venv/local/lib/python2.7/site-packages/Djblets-0.9-py2.7.egg/djblets/cache/backend.py",
> line 249, in cache_memoize_iter
>     items = items_or_callable()
>   File
> "/opt/reviewboard/venv/local/lib/python2.7/site-packages/Djblets-0.9-py2.7.egg/djblets/cache/backend.py",
> line 292, in <lambda>
>     lambda: [lookup_callable()],
>   File
> "/opt/reviewboard/venv/local/lib/python2.7/site-packages/ReviewBoard-2.5.2-py2.7.egg/reviewboard/diffviewer/renderers.py",
> line 73, in <lambda>
>     lambda: self.render_to_string_uncached(request),
>   File
> "/opt/reviewboard/venv/local/lib/python2.7/site-packages/ReviewBoard-2.5.2-py2.7.egg/reviewboard/diffviewer/renderers.py",
> line 87, in render_to_string_uncached
>     request=request)
>   File
> "/opt/reviewboard/venv/local/lib/python2.7/site-packages/ReviewBoard-2.5.2-py2.7.egg/reviewboard/diffviewer/diffutils.py",
> line 422, in populate_diff_chunks
>     chunks = list(generator.get_chunks())
>   File
> "/opt/reviewboard/venv/local/lib/python2.7/site-packages/ReviewBoard-2.5.2-py2.7.egg/reviewboard/diffviewer/chunk_generator.py",
> line 756, in get_chunks
>     for chunk in super(DiffChunkGenerator, self).get_chunks(cache_key):
>   File
> "/opt/reviewboard/venv/local/lib/python2.7/site-packages/ReviewBoard-2.5.2-py2.7.egg/reviewboard/diffviewer/chunk_generator.py",
> line 107, in get_chunks
>     large_data=True)
>   File
> "/opt/reviewboard/venv/local/lib/python2.7/site-packages/Djblets-0.9-py2.7.egg/djblets/cache/backend.py",
> line 295, in cache_memoize
>     compress_large_data))
>   File
> "/opt/reviewboard/venv/local/lib/python2.7/site-packages/Djblets-0.9-py2.7.egg/djblets/cache/backend.py",
> line 249, in cache_memoize_iter
>     items = items_or_callable()
>   File
> "/opt/reviewboard/venv/local/lib/python2.7/site-packages/Djblets-0.9-py2.7.egg/djblets/cache/backend.py",
> line 292, in <lambda>
>     lambda: [lookup_callable()],
>   File
> "/opt/reviewboard/venv/local/lib/python2.7/site-packages/ReviewBoard-2.5.2-py2.7.egg/reviewboard/diffviewer/chunk_generator.py",
> line 106, in <lambda>
>     lambda: list(self.get_chunks_uncached()),
>   File
> "/opt/reviewboard/venv/local/lib/python2.7/site-packages/ReviewBoard-2.5.2-py2.7.egg/reviewboard/diffviewer/chunk_generator.py",
> line 763, in get_chunks_uncached
>     new = get_patched_file(old, self.filediff, self.request)
>   File
> "/opt/reviewboard/venv/local/lib/python2.7/site-packages/ReviewBoard-2.5.2-py2.7.egg/reviewboard/diffviewer/diffutils.py",
> line 232, in get_patched_file
>     return patch(diff, buffer, filediff.dest_file, request)
>   File
> "/opt/reviewboard/venv/local/lib/python2.7/site-packages/ReviewBoard-2.5.2-py2.7.egg/reviewboard/diffviewer/diffutils.py",
> line 168, in patch
>     'output': stderr,
> Exception: The patch to
> 'stencils/jasperReports/quickReports/AP/form1099Report.jrxml' didn't apply
> cleanly. The temporary files have been left in '/tmp/reviewboard.W0_4Ee'
> for debugging purposes.
> `patch` returned: patch: **** malformed patch at line 8499:
>
> --
> Supercharge your Review Board with Power Pack:
> https://www.reviewboard.org/powerpack/
> Want us to host Review Board for you? Check out RBCommons:
> https://rbcommons.com/
> Happy user? Let us know! https://www.reviewboard.org/users/
> ---
> You received this message because you are subscribed to the Google Groups
> "reviewboard" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to reviewboard+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
Supercharge your Review Board with Power Pack: 
https://www.reviewboard.org/powerpack/
Want us to host Review Board for you? Check out RBCommons: 
https://rbcommons.com/
Happy user? Let us know! https://www.reviewboard.org/users/
--- 
You received this message because you are subscribed to the Google Groups 
"reviewboard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to reviewboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to