4508: View diff not working on webUI

dressarosa94

What version are you running?

2.5.7

What's the URL of the page containing the problem?

someserver/r/16/diff/1#index_header

What steps will reproduce the problem?

  1. Making any changes to the code
  2. commiting the changes
  3. using "rbt post"

What is the expected output? What do you see instead?

Expected to see the diff.

There was an error displaying this diff.

The patch to 'README.md' didn't apply cleanly. The temporary files have been left in '/tmp/reviewboard.8EC481' for debugging purposes.

patch returned:

 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.

This is the error log

Traceback (most recent call last):

File "/usr/local/lib/python2.7/dist-packages/reviewboard/diffviewer/views.py", line 299, in get
response = renderer.render_to_response(request)
File "/usr/local/lib/python2.7/dist-packages/reviewboard/diffviewer/renderers.py", line 56, in render_to_response
return HttpResponse(self.render_to_string(request))
File "/usr/local/lib/python2.7/dist-packages/reviewboard/diffviewer/renderers.py", line 74, in render_to_string
large_data=True)
File "/usr/local/lib/python2.7/dist-packages/djblets/cache/backend.py", line 295, in cache_memoize
compress_large_data))
File "/usr/local/lib/python2.7/dist-packages/djblets/cache/backend.py", line 249, in cache_memoize_iter
items = items_or_callable()
File "/usr/local/lib/python2.7/dist-packages/djblets/cache/backend.py", line 292, in <lambda>
lambda: [lookup_callable()],
File "/usr/local/lib/python2.7/dist-packages/reviewboard/diffviewer/renderers.py", line 73, in <lambda>
lambda: self.render_to_string_uncached(request),
File "/usr/local/lib/python2.7/dist-packages/reviewboard/diffviewer/renderers.py", line 87, in render_to_string_uncached
request=request)
File "/usr/local/lib/python2.7/dist-packages/reviewboard/diffviewer/diffutils.py", line 667, in populate_diff_chunks
chunks = list(generator.get_chunks())
File "/usr/local/lib/python2.7/dist-packages/reviewboard/diffviewer/chunk_generator.py", line 756, in get_chunks
for chunk in super(DiffChunkGenerator, self).get_chunks(cache_key):
File "/usr/local/lib/python2.7/dist-packages/reviewboard/diffviewer/chunk_generator.py", line 107, in get_chunks
large_data=True)
File "/usr/local/lib/python2.7/dist-packages/djblets/cache/backend.py", line 295, in cache_memoize
compress_large_data))
File "/usr/local/lib/python2.7/dist-packages/djblets/cache/backend.py", line 249, in cache_memoize_iter
items = items_or_callable()
File "/usr/local/lib/python2.7/dist-packages/djblets/cache/backend.py", line 292, in <lambda>
lambda: [lookup_callable()],
File "/usr/local/lib/python2.7/dist-packages/reviewboard/diffviewer/chunk_generator.py", line 106, in <lambda>
lambda: list(self.get_chunks_uncached()),
File "/usr/local/lib/python2.7/dist-packages/reviewboard/diffviewer/chunk_generator.py", line 763, in get_chunks_uncached
new = get_patched_file(old, self.filediff, self.request)
File "/usr/local/lib/python2.7/dist-packages/reviewboard/diffviewer/diffutils.py", line 233, in get_patched_file
return patch(diff, buffer, filediff.dest_file, request)
File "/usr/local/lib/python2.7/dist-packages/reviewboard/diffviewer/diffutils.py", line 169, in patch
'output': stderr,
Exception: The patch to 'README.md' didn't apply cleanly. The temporary files have been left in '/tmp/reviewboard.vEIWOG' for debugging purposes.
patch returned:

What operating system are you using? What browser?

Ubuntu 14.04, Chrome, firefox

Please provide any additional information below.

On using rbt post -d, the following output was seen:

RBTools 0.7.5

Python 2.7.6 (default, Oct 26 2016, 20:30:19)
[GCC 4.8.4]
Running on Linux-3.13.0-76-generic-x86_64-with-Ubuntu-14.04-trusty
Home = /homes/somename
Current directory = /homes/somename/somefolder
Checking for a Subversion repository...
Running: svn --non-interactive info
Command exited with rc 126: ['svn', '--non-interactive', u'info']
/volume/buildtools/bin/svn: 99: exec: /volume/labtools/bin/svn: Permission denied


Checking for a Git repository...
Running: git rev-parse --git-dir
Running: git config core.bare
Running: git rev-parse --show-toplevel
Running: git symbolic-ref -q HEAD
Running: git config --get branch.master.merge
Running: git config --get branch.master.remote
Running: git config --get remote.origin.url
repository info: Path: https://git.somepath, Base path: , Supports changesets: False
Making HTTP GET request to http://someserver/api/
Running: git rev-parse refs/heads/master
Running: git merge-base 941983aaa9f032d1fb49bf45481936b674eb5896 origin/master
Running: git rev-parse 64e8962084075fba4884c6cb858501800d8a58f8
Running: git status --porcelain --untracked-files=no
Running: git rev-parse --git-dir
Running: git version
Running: git -c core.quotepath=false -c diff.noprefix=false diff --no-color --full-index --ignore-submodules -M --no-ext-diff 64e8962084075fba4884c6cb858501800d8a58f8..941983aaa9f032d1fb49bf45481936b674eb5896
Making HTTP GET request to http://someserver/api/validation/diffs/
Cached response for HTTP GET http://someserver/api/validation/diffs/ expired and was modified
Making HTTP POST request to http://someserver/api/validation/diffs/
Making HTTP GET request to http://someserver/api/review-requests/?only-links=create&only-fields=
Cached response for HTTP GET http://someserver/api/review-requests/?only-links=create&only-fields= expired and was modified
Making HTTP POST request to http://someserver/api/review-requests/
Making HTTP GET request to http://someserver/api/review-requests/16/diffs/?only-fields=
Added cache entry for HTTP GET request to http://someserver/api/review-requests/16/diffs/?only-fields=
Making HTTP POST request to http://someserver/api/review-requests/16/diffs/
Making HTTP GET request to http://someserver/api/review-requests/16/draft/?only-fields=commit_id
Added cache entry for HTTP GET request to http://someserver/api/review-requests/16/draft/?only-fields=commit_id
Running: git log --reverse --pretty=format:%s%n%n%b ^64e8962084075fba4884c6cb858501800d8a58f8 941983aaa9f032d1fb49bf45481936b674eb5896
Making HTTP PUT request to http://someserver/api/review-requests/16/draft/
Review request #16 posted.

Moreover in the location "/tmp/reviewboard.vEIWOG", the following results are seen:

  1. cat /tmp/reviewboard.vEIWOG/README.md.diff
    diff --git a/README.md b/README.md
    index 7e7385be8ca11bc32341e47ca24ccfef66157c53..9f563e723a313c2c33af13931873a79a0293e72e 100644
    --- a/README.md
    +++ b/README.md
    @@ -1,2 +1,4 @@
    To Be Done
    -TBD
    \ No newline at end of file
    +TBD
    +
    +

  2. cat /tmp/reviewboard.vEIWOG/tmphsIt9H-new.rej
    --- README.md
    +++ README.md
    @@ -1,2 +1,4 @@
    To Be Done
    -TBD+TBD
    +
    +

david
#1 david

This is almost certainly a problem with how things are configured. I see you've started a thread on the community mailing list--that's a better place to resolve this.

  • -New
    +SetupIssue