]> khamidou — GitHub mirrors - arcanist.git/commitdiff
Use more modern detection of repositories in "arc close-revision"
authorepriestley <git@epriestley.com>
Fri, 14 Mar 2014 01:01:53 +0000 (18:01 -0700)
committerepriestley <git@epriestley.com>
Fri, 14 Mar 2014 01:01:53 +0000 (18:01 -0700)
Summary:
Fixes T4603. We fire `arc close-revision --finalize` implicitly from `arc land`, which may close a corresponding Differential revision.

We want to close if the repository is not present in Phabricator (i.e., we'll never be able to close in response to the commit message, since we'll never see it). Historically, we used Arcanist Project -> "Tracked" to make this determination. Instead, just check if the working copy is associated with a repository. This is simpler, easier, and works better.

Test Plan: Ran `arc close-revision --finalize`.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: aran, epriestley

Maniphest Tasks: T4603

Differential Revision: https://secure.phabricator.com/D8523

src/workflow/ArcanistCloseRevisionWorkflow.php

index 1fee95f923cc81389a7eddffa867f844d2048962..735dc8b1e8fcb850f29a8615b17ea0d6fe2892b7 100644 (file)
@@ -112,8 +112,7 @@ EOTEXT
 
       $actually_close = true;
       if ($is_finalize) {
-        $project_info = $this->getProjectInfo();
-        if (idx($project_info, 'tracked') ||
+        if ($this->getRepositoryPHID() ||
             $revision['status'] != $status_accepted) {
           $actually_close = false;
         }