]> khamidou — GitHub mirrors - arcanist.git/commitdiff
Check that rev is accepted in arc mark-committed --finalize
authorNick Harper <nharper@fb.com>
Fri, 11 Nov 2011 00:02:40 +0000 (16:02 -0800)
committerNick Harper <nharper@fb.com>
Fri, 11 Nov 2011 00:18:17 +0000 (16:18 -0800)
Summary:
If arc amend is run on a rev that isn't accepted, it runs arc mark-committed
--finalize. The rev shouldn't be marked as committed if it hasn't been accepted,
so this diff adds in that check.

Test Plan:
Ran arc amend on a rev that hasn't been accepted, checked that it didn't get
marked as completed.

Reviewers: jungejason, epriestley

Reviewed By: epriestley

CC: aran, epriestley, nh
Differential Revision: 1104

src/workflow/mark-committed/ArcanistMarkCommittedWorkflow.php

index 654b9718a9285bdafa79ec666fbe3d8b8ca7535d..a83b5f25b35a2007ba3c6fad8026663bb9d0f63b 100644 (file)
@@ -121,7 +121,7 @@ EOTEXT
           array(
             'name' => $this->getWorkingCopy()->getProjectID(),
           ));
-        if ($project_info['tracked']) {
+        if ($project_info['tracked'] || $revision['statusName'] != 'Accepted') {
           $actually_mark = false;
         }
       }