- Change Summary:
-
Removed a change that was accidentally included.
- Description:
-
Fix counters when discarding or deleting draft review requests.
The counters in the sidebar would get messed up when discarding or
deleting a draft review request. The code assumed that if we were saving or deleting a non-pending review request, we should decrement counts. However, this needed to take into account the old public state to determine if it had already incremented these counts. New unit tests were added to check for these conditions and to check
for incrementing/decrementing on fields not yet initialized (such as after an upgrade). - - Log more information on generic SCMErrors when creating review requests.
- - An unexpected SCMError would just return a REPO_INFO_ERROR when attempting
- to create a review request. This didn't tell us much of anything. Now we - log the error with a full stack trace.
Fix counters when discarding or deleting draft review requests.
Review Request #2504 — Created July 31, 2011 and submitted
Fix counters when discarding or deleting draft review requests. The counters in the sidebar would get messed up when discarding or deleting a draft review request. The code assumed that if we were saving or deleting a non-pending review request, we should decrement counts. However, this needed to take into account the old public state to determine if it had already incremented these counts. New unit tests were added to check for these conditions and to check for incrementing/decrementing on fields not yet initialized (such as after an upgrade).
Unit tests pass.