What steps will reproduce the problem?
1. create a new file using "svn copy"
2. create the diff and upload it
3. view the diff
What is the expected output?
the view off the diff
What do you see instead?
he patch to 'newFile.pl' didn't apply cleanly. The temporary files
have been left in '/tmp/reviewboard.HioriF' for debugging purposes.
`patch` returned: patching file /tmp/reviewboard.HioriF/tmpZSh4CR Hunk
#1 FAILED at 1. Hunk #2 FAILED at 14. 2 out of 2 hunks FAILED --
saving rejects to file /tmp/reviewboard.HioriF/tmpZSh4CR-new.rej
Traceback (most recent call last):
File "/home/mkobele/reviewboard/diffviewer/views.py", line 82, in
view_diff
files = get_diff_files(diffset, None, interdiffset, highlighting)
File "/home/mkobele/reviewboard/diffviewer/diffutils.py", line
594, in get_diff_files
enable_syntax_highlighting)
File "/home/mkobele/reviewboard/diffviewer/diffutils.py", line
513, in generate_files
lambda: get_chunks(filediff.diffset,
File "/home/mkobele/reviewboard/djblets/util/misc.py",
line 49, in cache_memoize
data = lookup_callable()
File "/home/mkobele/reviewboard/diffviewer/diffutils.py",
line 516, in <lambda>
enable_syntax_highlighting))
File "/home/mkobele/reviewboard/diffviewer/diffutils.py", line
317, in get_chunks
new = get_patched_file(old, filediff)
File "/home/mkobele/reviewboard/diffviewer/diffutils.py", line
233, in get_patched_file
return patch(filediff.diff, buffer, filediff.dest_file)
File "/home/mkobele/reviewboard/diffviewer/diffutils.py", line
119, in patch
(filename, tempdir, patch_output))
Exception: The patch to 'newFile.pl' didn't apply cleanly. The
temporary files have been left in '/tmp/reviewboard.HioriF' for
debugging purposes.
`patch` returned: patching file /tmp/reviewboard.HioriF/tmpZSh4CR
Hunk #1 FAILED at 1.
Hunk #2 FAILED at 14.
2 out of 2 hunks FAILED -- saving rejects to file /tmp/
reviewboard.HioriF/tmpZSh4CR-new.rej
Please provide any additional information below.
The problem might be that the diff header looks like this:
Index: newFile.pl
===================================================================
--- newFile.pl (revision 0)
+++ newFile.pl (working copy)
@@ -1,8 +1,8 @@
#!/usr/bin/perl
#
[...]
If it was a brand new file (svn add as opposed to svn copy)
the header would like this:
Index: newFile.pl
===================================================================
--- newFile.pl (revision 0)
+++ newFile.pl (revision 0)
@@ -0,0 +1,202 @@
#!/usr/bin/perl
#
[...]