Preserve negative approvals when replacing patch sets

Prior versions of Gerrit correctly saved a negative approval when
a replacement patch set was uploaded.  This was a specific feature
we added to allow project leads to reject a change until they are
satisfied with the replacement, even if other developers on that
project were able to review and approve subsequent patch sets.

Since approvals are now per-patch set we have to copy the approval
records from the prior patch set to this one, if the value is < 0.

Signed-off-by: Shawn O. Pearce <sop@google.com>
2 files changed