Fix: cannot apply review labels when restoring a change over SSH
When abandoning a change over SSH, it is possible to apply review
labels to the change at the same time:
gerrit review --abandon --code-review -1 sha1
However it is not possible to do the same when restoring a change:
gerrit review --restore --code-review +2 sha1
The change will be restored, but the given review labels will not be
applied.
This is because the SSH command implementation applies the review
labels before the abandon/restore operation. When restoring a change
this does not work because it is not allowed to apply a review label
to an abandoned change.
Refactor the command so that it applies the review labels before the
abandon operation, but after the restore operation, thus making it
possible to restore a change and apply review labels at the same time.
Change-Id: Ief5ca4e329fba6d686fb431f895df08e1a07e884
1 file changed