2851: Error: The patch to 'ProcessCVSFiles.java' didn't apply cleanly

gju****@gmai***** (Google Code) (Is this you? Claim this profile.)
Jan. 10, 2013
What version are you running?
1.6.14

What's the URL of the page containing the problem?
http://reviewboard.alcatel-lucent.com/r/18659/diff/#index_header

What steps will reproduce the problem?
1. create a new review request
2. upload diff
3. click "diff"

What is the expected output? What do you see instead?
The expected output would be a normal diff rendering page

See error as below instead:
Diff currently unavailable.
Error: The patch to 'ProcessCVSFiles.java' didn't apply cleanly. The temporary files have been left in '/tmp/reviewboard.Hgacoh' for debugging purposes. `patch` returned: patching file /tmp/reviewboard.Hgacoh/tmpkYAmzh Hunk #1 FAILED at 1. 1 out of 1 hunk FAILED -- saving rejects to file /tmp/reviewboard.Hgacoh/tmpkYAmzh-new.rej
Details

Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/ReviewBoard-1.6.14-py2.7.egg/reviewboard/diffviewer/views.py", line 384, in view_diff_fragment
    file = get_requested_diff_file()
  File "/usr/local/lib/python2.7/dist-packages/ReviewBoard-1.6.14-py2.7.egg/reviewboard/diffviewer/views.py", line 310, in get_requested_diff_file
    populate_diff_chunks(files, highlighting)
  File "/usr/local/lib/python2.7/dist-packages/ReviewBoard-1.6.14-py2.7.egg/reviewboard/diffviewer/diffutils.py", line 1188, in populate_diff_chunks
    large_data=True)
  File "/usr/local/lib/python2.7/dist-packages/Djblets-0.6.27-py2.7.egg/djblets/util/misc.py", line 156, in cache_memoize
    data = lookup_callable()
  File "/usr/local/lib/python2.7/dist-packages/ReviewBoard-1.6.14-py2.7.egg/reviewboard/diffviewer/diffutils.py", line 1187, in <lambda>
    enable_syntax_highlighting)),
  File "/usr/local/lib/python2.7/dist-packages/ReviewBoard-1.6.14-py2.7.egg/reviewboard/diffviewer/diffutils.py", line 595, in get_chunks
    new = get_patched_file(old, filediff)
  File "/usr/local/lib/python2.7/dist-packages/ReviewBoard-1.6.14-py2.7.egg/reviewboard/diffviewer/diffutils.py", line 388, in get_patched_file
    return patch(diff, buffer, filediff.dest_file)
  File "/usr/local/lib/python2.7/dist-packages/ReviewBoard-1.6.14-py2.7.egg/reviewboard/diffviewer/diffutils.py", line 247, in patch
    (filename, tempdir, patch_output))
Exception: The patch to 'ProcessCVSFiles.java' didn't apply cleanly. The temporary files have been left in '/tmp/reviewboard.Hgacoh' for debugging purposes.
`patch` returned: patching file /tmp/reviewboard.Hgacoh/tmpkYAmzh
Hunk #1 FAILED at 1.
1 out of 1 hunk FAILED -- saving rejects to file /tmp/reviewboard.Hgacoh/tmpkYAmzh-new.rej

What operating system are you using? What browser?
Ubuntu 12.04
Firefox (and Google Chrome)
SCM is cvs

Please provide any additional information below.

Diff currently unavailable. Error: The patch to 'project_sam.xml' didn't apply cleanly. The temporary files have been left in '/tmp/reviewboard.CRgaUy' for debugging purposes. `patch` returned: patching file /tmp/reviewboard.CRgaUy/tmpGdkjyO Hunk #1 FAILED at 1. 1 out of 1 hunk FAILED -- saving rejects to file /tmp/reviewboard.CRgaUy/tmpGdkjyO-new.rej Details 
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/ReviewBoard-1.6.14-py2.7.egg/reviewboard/diffviewer/views.py", line 384, in view_diff_fragment
    file = get_requested_diff_file()
  File "/usr/local/lib/python2.7/dist-packages/ReviewBoard-1.6.14-py2.7.egg/reviewboard/diffviewer/views.py", line 310, in get_requested_diff_file
    populate_diff_chunks(files, highlighting)
  File "/usr/local/lib/python2.7/dist-packages/ReviewBoard-1.6.14-py2.7.egg/reviewboard/diffviewer/diffutils.py", line 1188, in populate_diff_chunks
    large_data=True)
  File "/usr/local/lib/python2.7/dist-packages/Djblets-0.6.27-py2.7.egg/djblets/util/misc.py", line 156, in cache_memoize
    data = lookup_callable()
  File "/usr/local/lib/python2.7/dist-packages/ReviewBoard-1.6.14-py2.7.egg/reviewboard/diffviewer/diffutils.py", line 1187, in <lambda>
    enable_syntax_highlighting)),
  File "/usr/local/lib/python2.7/dist-packages/ReviewBoard-1.6.14-py2.7.egg/reviewboard/diffviewer/diffutils.py", line 595, in get_chunks
    new = get_patched_file(old, filediff)
  File "/usr/local/lib/python2.7/dist-packages/ReviewBoard-1.6.14-py2.7.egg/reviewboard/diffviewer/diffutils.py", line 388, in get_patched_file
    return patch(diff, buffer, filediff.dest_file)
  File "/usr/local/lib/python2.7/dist-packages/ReviewBoard-1.6.14-py2.7.egg/reviewboard/diffviewer/diffutils.py", line 247, in patch
    (filename, tempdir, patch_output))
Exception: The patch to 'project_sam.xml' didn't apply cleanly. The temporary files have been left in '/tmp/reviewboard.CRgaUy' for debugging purposes.
`patch` returned: patching file /tmp/reviewboard.CRgaUy/tmpGdkjyO
Hunk #1 FAILED at 1.
1 out of 1 hunk FAILED -- saving rejects to file /tmp/reviewboard.CRgaUy/tmpGdkjyO-new.rej
david
#1 david
How did you create your diff? What is in those .rej files?
  • +NeedInfo
#2 gju****@gmai***** (Google Code) (Is this you? Claim this profile.)
we create the diff via cvs diff
I attached the .rej files as below
#3 gju****@gmai***** (Google Code) (Is this you? Claim this profile.)
  • +
    Index: ProcessCVSFiles.java
    --- ProcessCVSFiles.java	25 Oct 2012 13:40:17 -0000	1.69.4.2
    +++ ProcessCVSFiles.java	5 Nov 2012 21:50:23 -0000
    @@ -1,854 +1,899 @@
     /**************************************************************************
      *
      *   Filename:   ProcessCVSFiles.java
      *
      *   Author:     Claudio Ortega
      *
      *   Description: depending on argument -operation, will:
      *                (1) Will move/remove all files that were not CHECKED OUT FROM CVS
      *                Very useful if you want to rollback all changes resulting from an xml
      *                generation inder nms/javasrc directory.
      *                (2) backup all files in CVS
      *                (3) backup all files in CVS and changed or added to CVS but not checked
      *
      ***************************************************************************
      *
      *                 Source Control System Information
      *
      *   $Id: ProcessCVSFiles.java,v 1.69.4.2 2012/10/25 13:40:17 kmorin Exp $
      *
      ***********************
    +
    Index: project_sam.xml
    --- project_sam.xml	21 Dec 2012 18:14:34 -0000	1.181.2.4
    +++ project_sam.xml	7 Jan 2013 15:36:34 -0000
    @@ -1,5335 +1,5335 @@
     <!--
     ==========================================================================================
     
      $Id: project_sam.xml,v 1.181.2.4 2012/12/21 18:14:34 kmorin Exp $
     
      SAM Project descriptor file. This file describes applications in our project and
      defines sub-modules & libraries the application requires.
     
      See TWiki build documentation: http://shenzi/twiki/bin/view/Sam/SamPnTBuildDocumentation
     
      To validate the syntax of this file execute "ant parse.preprocessor"
     
      To generate the build targets from the project descriptor file execute "ant run.preprocessor"
     
      Copyright (c) 2011-2012 Alcatel-Lucent.
     ==========================================================================================
     -->
     <project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
              xsi:noNamespaceSchemaLocation="../tools/project/modules/mode
david
#4 david
Is this a newly-aded file?

We highly recommend using post-review to create your diffs.
#5 gju****@gmai***** (Google Code) (Is this you? Claim this profile.)
Its existing file in CVS and had frequent modifications.

Will take a look at post-review for sure.

Thanks!
Gene
david
#6 david
The .rej file you attached doesn't seem to indicate a properly-formatted diff. I think using post-review is probably going to be your best bet.
  • -NeedInfo
    +UserError