1408: seemingly clean diff with special characters reports error

vitor.******@gmai***** (Google Code) (Is this you? Claim this profile.)
Nov. 28, 2009
What version are you running?
1.0

What's the URL of the page containing the problem?
http://bu-review/r/1536/diff/#index_header

What steps will reproduce the problem?
1. create a review based off of attached diff
2.
3.

What is the expected output? What do you see instead?
I see this error:
The patch to 'save/clntinfo.c' didn't apply cleanly. The temporary files
have been left in '/tmp/reviewboard.2fFiR6' for debugging purposes. `patch`
returned: patching file /tmp/reviewboard.2fFiR6/tmpsmvkYQ patch: ****
malformed patch at line 13: ????????????*\n\

Traceback (most recent call last):
  File
"/usr/lib/python2.4/site-packages/ReviewBoard-1.0-py2.4.egg/reviewboard/diffviewer/views.py",
line 152, in view_diff
    interdiffset, highlighting, True)
  File
"/usr/lib/python2.4/site-packages/ReviewBoard-1.0-py2.4.egg/reviewboard/diffviewer/diffutils.py",
line 623, in get_diff_files
    large_data=True)
  File
"/usr/lib/python2.4/site-packages/Djblets-0.5-py2.4.egg/djblets/util/misc.py",
line 143, in cache_memoize
    data = lookup_callable()
  File
"/usr/lib/python2.4/site-packages/ReviewBoard-1.0-py2.4.egg/reviewboard/diffviewer/diffutils.py",
line 622, in <lambda>
    enable_syntax_highlighting),
  File
"/usr/lib/python2.4/site-packages/ReviewBoard-1.0-py2.4.egg/reviewboard/diffviewer/diffutils.py",
line 345, in get_chunks
    new = get_patched_file(old, filediff)
  File
"/usr/lib/python2.4/site-packages/ReviewBoard-1.0-py2.4.egg/reviewboard/diffviewer/diffutils.py",
line 261, in get_patched_file
    return patch(filediff.diff, buffer, filediff.dest_file)
  File
"/usr/lib/python2.4/site-packages/ReviewBoard-1.0-py2.4.egg/reviewboard/diffviewer/diffutils.py",
line 126, in patch
    raise Exception(_("The patch to '%s' didn't apply cleanly. The
temporary " +
Exception: The patch to 'save/clntinfo.c' didn't apply cleanly. The
temporary files have been left in '/tmp/reviewboard.2fFiR6' for debugging
purposes.
`patch` returned: patching file /tmp/reviewboard.2fFiR6/tmpsmvkYQ
patch: **** malformed patch at line 13: ????????????*\n\


What operating system are you using? What browser?
Puppy Linux running SeaMonkey 1.0.6


Please provide any additional information below.
Index: server/nsr_rap.c
===================================================================
RCS file: /cvs/ipprod/cvs_root/dev/nsr/server/nsr_rap.c,v
retrieving revision 6.295.8.38.2.3
diff -u -r6.295.8.38.2.3 nsr_rap.c
--- server/nsr_rap.c    4 Mar 2009 20:47:48 -0000       6.295.8.38.2.3
+++ server/nsr_rap.c    24 Nov 2009 16:22:07 -0000
@@ -1088,6 +1088,15 @@
        vallist_free(vl);
        vallist_free(defaults);
 
+       vl = vallist_build(NSRVAL_YES, NSRVAL_NO, NULL_STR);
+       defaults = val_new(NSRVAL_YES);
+       attrhand_set(type, NSRATTR_JOBDB_BOOTSTRAP,
+               RESINFO_SINGLE | RESINFO_BOOL | RESINFO_NULLOK,
+msg_mlit_create(-1, "Whether or not the jobsdb is included in bootstrap backups
."),
+                    defaults, hand_choice, (caddr_t)vl);
+       vallist_free(vl);
+       vallist_free(defaults);
+
        attrhand_set(type, NSRATTR_BMRSERVER, RESINFO_SINGLE|RESINFO_NULLOK,
 msg_mlit_create(64181, "Hostname of the Bare Metal Recovery server."),
     
#1 vitor.******@gmai***** (Google Code) (Is this you? Claim this profile.)
My mistake.  The diff is indeed invalid.
david
#2 david
  • +UserError