Prevent comments spam for abandoned commit

If some change was abandoned but later submit (e.g. by cherry-picking to
another branch) then pushing a new branch that contains this change
adds a new comment.

We just need to check that a change is abandoned and do not add comment to it.

Change-Id: Id83046a0c415b8cd20958a0b23b18daa3a174d13
This commit is contained in:
Anatol Pomazau
2011-10-14 11:14:20 -07:00
parent fc6c07bbfc
commit 4e560dcbc7

View File

@@ -1746,7 +1746,8 @@ public class ReceiveCommits implements PreReceiveHook, PostReceiveHook {
return;
}
if (change.getStatus() == Change.Status.MERGED) {
if (change.getStatus() == Change.Status.MERGED ||
change.getStatus() == Change.Status.ABANDONED) {
// If its already merged, don't make further updates, it
// might just be moving from an experimental branch into
// a more stable branch.