2158: Viewdiff throws an python exception

niles*****@gmai***** (Google Code) (Is this you? Claim this profile.)
Nov. 18, 2012
What version are you running?
1.0

What's the URL of the page containing the problem?

http://ccsd.######.com/ccsd/r/22831

What steps will reproduce the problem?
1. Made one line changes in somefile.h
2. When looking into p4 diff output i saw that files contains changes in two lines, but i actually made changes in one line. The other line which shows diff as 

52c52
<       property.title_len = strlen(property.title);
---
>       property.title_len = (length_t)strlen(property.title);
71c71
<                ---
>

From the above diff line number shows "---" which i havn't changed
3. the post a review

4. Got to View diff tab and we see the error

What is the expected output? What do you see instead?

52c52
<       property.title_len = strlen(property.title);
---
>       property.title_len = (length_t)strlen(property.title);

What operating system are you using? What browser?

Linux 5.4, IE

Please provide any additional information below.

<workspace location>/somefile.h'  didn't apply cleanly.

Can someone help me how to ignore these "---" lines in the diff. Any workaround would be appreciated. Actually when doing p4 diff we got some different result as above due to which when RB diff utility tries the same RB gets confused and reported error. It might be the file which is present in the server is having the issue but how we can resolve this issue from review board side ...I know we need to modify diffutils.py

Please provide your input, if i make the changes in diffutils.py as below will it work? I haven't tried will try once your response.

In subroutine convert_line_endings(data)

if i add one more line as 
temp = data.replace('---', '\n')

Will this change work.. I am new to python.

Please help
#1 niles*****@gmai***** (Google Code) (Is this you? Claim this profile.)
Just to update we user post-review tool to post the review request.
david
#2 david
This:

52c52
<       property.title_len = strlen(property.title);
---
>       property.title_len = (length_t)strlen(property.title);
71c71

looks like a "context" diff instead of a "unified" diff. post-review should be generating unified diffs so I'm not sure how this happened. Can you clarify?
  • +NeedInfo
david
#3 david
  • -NeedInfo
    +Incomplete