2754: Unmodified file in a perforce changeset prevents diff file generation

jeannoel.**********@gmai***** (Google Code) (Is this you? Claim this profile.)
March 14, 2013
What version are you running?
RBTools 0.4.2
ReviewBoard-1.6.12
python 2.5
Djblets-0.6.23

What's the URL of the page containing the problem?
http://reviewboard.xxxx.com/r/1115/

What steps will reproduce the problem?
0. On perforce, submit a change list with an unmodified file.

1. On the command line, type "post-review changelistnumber"
2. the output of this command is :
Warning: //my/path/is/relatively/short/myproject.file in your changeset is unmodified
Review request #1115 posted.
3. the review is created.
4. When we want to view the diff files posted on the server, we have this:

 1 The patch to '//my/path/is/relatively/short/myproject.file' didn't apply cleanly. The temporary files have been left in '/tmp/reviewboard.MCrTEw' for debugging purposes. `patch` returned: patch: **** Only garbage was found in the patch input.
 2 
 3 Traceback (most recent call last):
 4   File "/usr/lib/python2.5/site-packages/ReviewBoard-1.6.12-py2.5.egg/reviewboard/diffviewer/views.py", line 254, in view_diff
 5     populate_diff_chunks(temp_files, highlighting)
 6   File "/usr/lib/python2.5/site-packages/ReviewBoard-1.6.12-py2.5.egg/reviewboard/diffviewer/diffutils.py", line 1182, in populate_diff_chunks
 7     large_data=True)
 8   File "/usr/lib/python2.5/site-packages/Djblets-0.6.23-py2.5.egg/djblets/util/misc.py", line 156, in cache_memoize
 9     data = lookup_callable()
10   File "/usr/lib/python2.5/site-packages/ReviewBoard-1.6.12-py2.5.egg/reviewboard/diffviewer/diffutils.py", line 1181, in <lambda>
11     enable_syntax_highlighting)),
12   File "/usr/lib/python2.5/site-packages/ReviewBoard-1.6.12-py2.5.egg/reviewboard/diffviewer/diffutils.py", line 589, in get_chunks
13     new = get_patched_file(old, filediff)
14   File "/usr/lib/python2.5/site-packages/ReviewBoard-1.6.12-py2.5.egg/reviewboard/diffviewer/diffutils.py", line 381, in get_patched_file
15     return patch(diff, buffer, filediff.dest_file)
16   File "/usr/lib/python2.5/site-packages/ReviewBoard-1.6.12-py2.5.egg/reviewboard/diffviewer/diffutils.py", line 247, in patch
17     (filename, tempdir, patch_output))
18 Exception: The patch to '//my/path/is/relatively/short/myproject.file' didn't apply cleanly. The temporary files have been left in '/tmp/reviewboard.MCrTEw' for debugging purposes.
19 `patch` returned: patch: **** Only garbage was found in the patch input.

What is the expected output? What do you see instead?
We should see the diff file, as we usually do. It is worth knowing that with a normal changelist (every files have been modified), everything works as expected

What operating system are you using? What browser?
Same issue can be found with windows(for post-review)/mozilla and linux/mozilla

Please provide any additional information below.
#1 jeannoel.**********@gmai***** (Google Code) (Is this you? Claim this profile.)
Hi,
we solved the issue by generating the diff file that way:
post-review-script.py -n changelistnumber > difffile.diff

Then, we edited the diff file by removing the lines mentioning the unchanged file. When we uploaded the diff file to reviewboard, everything worked as expected.

I hope that helped.
Best regards,
Jean-Noël
david
#2 david
  • +Component-RBTools
  • +Unmodified file in a perforce changeset prevents diff file generation
#3 ata****@gmai***** (Google Code) (Is this you? Claim this profile.)
The fix for this turned out to be pretty simple...

http://reviews.reviewboard.org/r/3944/
chipx86
#4 chipx86
Fixed on master (74d0a42).
  • +Fixed