Update "phabricator/" for "topological" API changes
Summary: Ref T13325. Test Plan: - Grepped for `topograph`. - Viewed a task graph since that's easy, looked fine. Reviewers: amckinley Reviewed By: amckinley Subscribers: PHID-OPKG-gm6ozazyms6q6i22gyam Maniphest Tasks: T13325 Differential Revision: https://secure.phabricator.com/D20599
This commit is contained in:
@@ -25,8 +25,7 @@ final class HarbormasterBuildGraph extends AbstractDirectedGraph {
|
|||||||
$graph = id(new HarbormasterBuildGraph($steps_by_phid))
|
$graph = id(new HarbormasterBuildGraph($steps_by_phid))
|
||||||
->addNodes($step_phids);
|
->addNodes($step_phids);
|
||||||
|
|
||||||
$raw_results =
|
$raw_results = $graph->getNodesInRoughTopologicalOrder();
|
||||||
$graph->getBestEffortTopographicallySortedNodes();
|
|
||||||
|
|
||||||
$results = array();
|
$results = array();
|
||||||
foreach ($raw_results as $node) {
|
foreach ($raw_results as $node) {
|
||||||
|
|||||||
@@ -398,7 +398,7 @@ final class PhabricatorRepositoryDiscoveryEngine
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Now, sort them topographically.
|
// Now, sort them topologically.
|
||||||
$commits = $this->reduceGraph($graph);
|
$commits = $this->reduceGraph($graph);
|
||||||
|
|
||||||
$refs = array();
|
$refs = array();
|
||||||
@@ -437,7 +437,7 @@ final class PhabricatorRepositoryDiscoveryEngine
|
|||||||
$graph = new PhutilDirectedScalarGraph();
|
$graph = new PhutilDirectedScalarGraph();
|
||||||
$graph->addNodes($edges);
|
$graph->addNodes($edges);
|
||||||
|
|
||||||
$commits = $graph->getTopographicallySortedNodes();
|
$commits = $graph->getNodesInTopologicalOrder();
|
||||||
|
|
||||||
// NOTE: We want the most ancestral nodes first, so we need to reverse the
|
// NOTE: We want the most ancestral nodes first, so we need to reverse the
|
||||||
// list we get out of AbstractDirectedGraph.
|
// list we get out of AbstractDirectedGraph.
|
||||||
|
|||||||
@@ -189,7 +189,7 @@ abstract class PhabricatorObjectGraph
|
|||||||
|
|
||||||
$order = id(new PhutilDirectedScalarGraph())
|
$order = id(new PhutilDirectedScalarGraph())
|
||||||
->addNodes($ancestry)
|
->addNodes($ancestry)
|
||||||
->getTopographicallySortedNodes();
|
->getNodesInTopologicalOrder();
|
||||||
|
|
||||||
$ancestry = array_select_keys($ancestry, $order);
|
$ancestry = array_select_keys($ancestry, $order);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user