Provide a sane error if encountering multiple conflicting repositories.
Review Request #7459 — Created June 26, 2015 and submitted
If two repositories conflict (one has a Mirror Path matching the Path of
another repository), then validating a diff or creating a review request
in the API will result in an HTTP 500 error, due to a
MultipleObjectsReturned
exception.We now check for this and provide a more reasonable error message
instead, with a suggestion for how to resolve the issue.
Unit tests pass.
Description | From | Last Updated |
---|---|---|
I thought we were moving away from doing IO in tests just to read data? |
brennie |
-
-
reviewboard/webapi/tests/test_validate_diff.py (Diff revision 1) I thought we were moving away from doing IO in tests just to read data?
Change Summary:
Removed the disk IO from the new unit test.
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 2 (+81 -2) |
-
Tool: Pyflakes Processed Files: reviewboard/webapi/resources/validate_diff.py reviewboard/webapi/tests/test_validate_diff.py reviewboard/webapi/resources/review_request.py reviewboard/webapi/tests/test_review_request.py Tool: PEP8 Style Checker Processed Files: reviewboard/webapi/resources/validate_diff.py reviewboard/webapi/tests/test_validate_diff.py reviewboard/webapi/resources/review_request.py reviewboard/webapi/tests/test_review_request.py