Changeset View
Changeset View
Standalone View
Standalone View
src/repository/graph/ArcanistCommitGraph.php
Show All 35 Lines | final class ArcanistCommitGraph | ||||
public function newNode($hash) { | public function newNode($hash) { | ||||
if (isset($this->nodes[$hash])) { | if (isset($this->nodes[$hash])) { | ||||
throw new Exception( | throw new Exception( | ||||
pht( | pht( | ||||
'Graph already has a node "%s"!', | 'Graph already has a node "%s"!', | ||||
$hash)); | $hash)); | ||||
} | } | ||||
$this->nodes[$hash] = id(new ArcanistCommitNode()) | $this->nodes[$hash] = (new ArcanistCommitNode()) | ||||
->setCommitHash($hash); | ->setCommitHash($hash); | ||||
return $this->nodes[$hash]; | return $this->nodes[$hash]; | ||||
} | } | ||||
public function newPartitionQuery() { | public function newPartitionQuery() { | ||||
return id(new ArcanistCommitGraphPartitionQuery()) | return (new ArcanistCommitGraphPartitionQuery()) | ||||
->setGraph($this); | ->setGraph($this); | ||||
} | } | ||||
} | } |
Content licensed under Creative Commons Attribution-ShareAlike 4.0 (CC-BY-SA) unless otherwise noted; code licensed under Apache 2.0 or other open source licenses. · CC BY-SA 4.0 · Apache 2.0