Issue 1868: Add ability to disallow review emitted from the wrong branch
Status:  New
Owner: ----
Reported by florent....@intersec.com, Apr 16, 2013
We often encounter a situation where we have two (or more branches):
* master development branch
* main maintenance branch

Sometimes, developper make a patch on master that fix a bug, then are told that they should push on maint. This often lead to a situation where the developper do git push origin HEAD:refs/for/maint, which lead to a situation where a patch made on master is pushed for review as a fix for maint. Since gerrit is configured to issue a merge, this will cause a merge of master into maint, which is broken.

This case is hard to identify for humans (this requires checking the parent of the patch). However, it probably could probably be automatically detected by gerrit by checking if the new patch has dependencies that are not already present in the destination branch. In that case, the review should be rejected.