]> khamidou — GitHub mirrors - arcanist.git/commitdiff
Use repository info from arcanist.projectinfo if available
authorvrana <jakubv@fb.com>
Mon, 10 Dec 2012 23:10:31 +0000 (15:10 -0800)
committervrana <jakubv@fb.com>
Mon, 10 Dec 2012 23:18:52 +0000 (15:18 -0800)
Test Plan: Added a debug output there and ran.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin
Differential Revision: https://secure.phabricator.com/D4147

src/workflow/ArcanistBaseWorkflow.php

index 71f16a27927ce7f7a0dfa3dce6f05fb3c15a2f2f..efe9ef2bff3d0c93722e68385f166ea71eb472ae 100644 (file)
@@ -1427,7 +1427,13 @@ abstract class ArcanistBaseWorkflow {
   }
 
   protected function loadProjectRepository() {
-    $repository_phid = idx($this->getProjectInfo(), 'repositoryPHID');
+    $project = $this->getProjectInfo();
+    if (isset($project['repository'])) {
+      return $project['repository'];
+    }
+    // NOTE: The rest of the code is here for backwards compatibility.
+
+    $repository_phid = idx($project, 'repositoryPHID');
     if (!$repository_phid) {
       return array();
     }