I recently ran into a problem in my organization where a user attempted to upload what appeared to be a perfectly normal diff file in a new review request but received the dreaded "Oops something broke" message. After looking at the logs I found:
ERROR:root:Exception thrown for user abc at http://myhost.com/r/new/ No valid separator after the filename was found in the diff header Traceback (most recent call last): File "/usr/lib/python2.5/site-packages/Django-1.2.5-py2.5.egg/django/core/handlers/base.py", line 100, in get_response response = callback(request, *callback_args, **callback_kwargs) File "/usr/lib/python2.5/site-packages/Djblets-0.6.14-py2.5.egg/djblets/auth/util.py", line 46, in _checklogin return view_func(request, *args, **kwargs) File "/usr/lib/python2.5/site-packages/ReviewBoard-1.6.3-py2.5.egg/reviewboard/reviews/views.py", line 253, in new_review_request local_site=local_site) File "/usr/lib/python2.5/site-packages/ReviewBoard-1.6.3-py2.5.egg/reviewboard/reviews/forms.py", line 234, in create attach_to_history=True) File "/usr/lib/python2.5/site-packages/ReviewBoard-1.6.3-py2.5.egg/reviewboard/reviews/forms.py", line 286, in create history) File "/usr/lib/python2.5/site-packages/ReviewBoard-1.6.3-py2.5.egg/reviewboard/diffviewer/forms.py", line 63, in create diff_file, basedir, check_existance=(not parent_diff_file))) File "/usr/lib/python2.5/site-packages/ReviewBoard-1.6.3-py2.5.egg/reviewboard/diffviewer/forms.py", line 136, in _process_files for f in tool.get_parser(file.read()).parse(): File "/usr/lib/python2.5/site-packages/ReviewBoard-1.6.3-py2.5.egg/reviewboard/diffviewer/parser.py", line 49, in parse next_linenum, new_file = self.parse_change_header(i) File "/usr/lib/python2.5/site-packages/ReviewBoard-1.6.3-py2.5.egg/reviewboard/diffviewer/parser.py", line 75, in parse_change_header linenum = self.parse_diff_header(linenum, info) File "/usr/lib/python2.5/site-packages/ReviewBoard-1.6.3-py2.5.egg/reviewboard/diffviewer/parser.py", line 151, in parse_diff_header linenum) File "/usr/lib/python2.5/site-packages/ReviewBoard-1.6.3-py2.5.egg/reviewboard/diffviewer/parser.py", line 180, in parse_filename_header linenum) DiffParserError: No valid separator after the filename was found in the diff header The problem turned out to be caused by a section header in the diff file that looked something like this: Index: mydir00000001/dir02/filename000000000000000000001.c =================================================================== --- mydir00000001/dir02/filename000000000000000000001.c (revision 14811) +++ mydir00000001/dir02/filename000000000000000000001.c (working copy) The specific problem was caused by there being only one space character between the file/path and the revision information for the base and sandbox files above. When I changed the header for this file to look like this: Index: mydir00000001/dir02/filename000000000000000000001.c =================================================================== --- mydir00000001/dir02/filename000000000000000000001.c (revision 14811) +++ mydir00000001/dir02/filename000000000000000000001.c (working copy) The new review request was created just fine. Is this a known issue? Is there some reason it was not valid to have only one space there? This output was generated by 'svn diff', so I would expect it should work. If it matters, the number of characters in the paths above are exactly the same as those that caused the error, and fixed the error, I just changed the characters themselves to obscure names. Thanks, Jeff -- Want to help the Review Board project? Donate today at http://www.reviewboard.org/donate/ Happy user? Let us know at http://www.reviewboard.org/users/ -~----------~----~----~----~------~----~------~--~--- To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/reviewboard?hl=en
