Prevent creation of inline comments with mismatched changesetID / revisionPHID
Ref T11092. With Quicksand (or, possibly, some as-yet-unknown non-Quicksand workflow) the client can get stuck with an out-of-date revision PHID.
We then save comments with a revisionPHID from one revision and a changesetID from a different one.
Detect and prevent this. This stops the workflow immediately when the use first clicks, so it should allow us to detect this issue if it has some other non-Quicksand cause.
- Opened revision D123.
- Pressed \ to enable the sidebar and Quicksand.
- Clicked a link to revision D124.
- Added inlines.
Previously, these could ghost. The exact UI behavior is difficult to describe, but in the database they end up with a changesetID for D124 but the original revisionPHID for D123, presumably because state is sticking around from the first page.
After this patch, an exception is thrown immediately. Additionally:
- Reloaded to clear quicksand state, added comments fine.
- Disabled sidebar/quicksand, added comments fine.
Reviewed By: chad
Maniphest Tasks: T11092
Differential Revision: https://secure.phabricator.com/D16031