Don't share the extra_data instance between a review request and draft.

Review Request #6813 — Created Jan. 19, 2015 and submitted — Latest diff uploaded

Information

Review Board
release-2.0.x
10b08e4...

Reviewers

When creating a draft from a review request, the extra_data instance was
being assigned to the draft, instead of being copied over. This meant
that if any code tried to write into the draft's extra_data, it would
also appear in the review request's.

This was first noticed when attempting to do an API POST to the draft
resource that both changed an extra_data field on the draft and
published in one go. The publish code thought that the data hadn't been
changed, since it was in the shared extra_data, and would complain.

We now do a deepcopy of extra_data to prevent any sharing issues.

Added a new unit test that failed with the old behavior. It now passes.

All other unit tests pass too.