Unedited p4 files caused server side stacktraces

Review Request #3944 — Created March 7, 2013 and submitted — Latest diff uploaded

Information

RBTools

Reviewers

If you make a perforce-backed code review with an unedited (but opened) file
then ReviewBoard chokes on the empty diff content. Based on the recentness of
this issue I suspect that it's regression for us from upgrading ReviewBoard
from 1.5 to 1.6. 

This issue has been discussed by others on...

http://code.google.com/p/reviewboard/issues/detail?id=2754

========================================

Steps to repro:

1. p4 edit some/file/with/stuff
2. run postreview

Expected:

Post-review should error out if you don't have any edits. If you have other
modifications then it should just make a code review with that.

Actual:

Post-review always succeeds, but the unedited file renders as a stacktrace in
ReviewBoard.


This can be pulled from my issue2754 branch...

https://github.com/atagar/rbtools/tree/issue2754
This was tested on an older version of post-review by both...

* creating a code review where the only opened file was unedited (post-review now properly tells you "There don't seem to be any diffs!")
* mixed with other changes, the code review is still made but now excludes the unedited file
    Loading...