diff options
author | Mika Hamalainen <mika.hamalainen@accenture.com> | 2011-09-09 13:00:13 +0300 |
---|---|---|
committer | Mika Hamalainen <mika.hamalainen@accenture.com> | 2011-09-09 13:00:13 +0300 |
commit | c8fe28cde21cde3cff9304eb600478a05f46c8b6 (patch) | |
tree | 9f609eda9b7c0ff8c796bc863db20874ab77af9c | |
parent | c5f60b28850ab3e1c9d55a7a657056eb4a7508b0 (diff) |
Fixed error when pushing to a staged change
Added check for staging category when analysing approval
categories for an existing change. Staging state needs
a similar handling as the submitted state.
Change-Id: I4fdd0d0e80c6434899502ed6f8a72b8d01fbd2ea
-rw-r--r-- | gerrit-server/src/main/java/com/google/gerrit/server/git/ReceiveCommits.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gerrit-server/src/main/java/com/google/gerrit/server/git/ReceiveCommits.java b/gerrit-server/src/main/java/com/google/gerrit/server/git/ReceiveCommits.java index 9c58bf5b0e..bd6f0da7b7 100644 --- a/gerrit-server/src/main/java/com/google/gerrit/server/git/ReceiveCommits.java +++ b/gerrit-server/src/main/java/com/google/gerrit/server/git/ReceiveCommits.java @@ -1741,7 +1741,8 @@ public class ReceiveCommits implements PreReceiveHook, PostReceiveHook { } // ApprovalCategory.SUBMIT is still in db but not relevant in git-store - if (!ApprovalCategory.SUBMIT.equals(a.getCategoryId())) { + if (!ApprovalCategory.SUBMIT.equals(a.getCategoryId()) && + !ApprovalCategory.STAGING.equals(a.getCategoryId())) { final ApprovalType type = approvalTypes.byId(a.getCategoryId()); if (a.getPatchSetId().equals(priorPatchSet) @@ -1861,6 +1862,7 @@ public class ReceiveCommits implements PreReceiveHook, PostReceiveHook { repo, mergeFactory, merger, hooks); } catch (NoSuchRefException e) { // Destination branch not available. + log.error("Could not rebuild staging branch. No destination branch.", e); } } return result != null ? result.info.getKey() : null; |