Changeset View
Changeset View
Standalone View
Standalone View
src/ref/ArcanistWorkingCopyStateRefPro.php
| <?php | <?php | ||||
| final class ArcanistWorkingCopyStateRefPro | final class ArcanistWorkingCopyStateRefPro | ||||
| extends ArcanistRefPro { | extends ArcanistRefPro { | ||||
| const HARDPOINT_COMMITREF = 'commitRef'; | const HARDPOINT_COMMITREF = 'commitRef'; | ||||
| const HARDPOINT_BRANCHREF = 'branchRef'; | |||||
| const HARDPOINT_REVISIONREFS = 'revisionRefs'; | const HARDPOINT_REVISIONREFS = 'revisionRefs'; | ||||
| public function getRefDisplayName() { | public function getRefDisplayName() { | ||||
| // TODO: This could check attached hardpoints and render something more | // TODO: This could check attached hardpoints and render something more | ||||
| // insightful. | // insightful. | ||||
| return pht('Working Copy State'); | return pht('Working Copy State'); | ||||
| } | } | ||||
| protected function newHardpoints() { | protected function newHardpoints() { | ||||
| $object_list = new ArcanistObjectListHardpoint(); | |||||
| return array( | return array( | ||||
| $this->newHardpoint(self::HARDPOINT_COMMITREF), | $this->newHardpoint(self::HARDPOINT_COMMITREF), | ||||
| $this->newHardpoint(self::HARDPOINT_BRANCHREF), | $this->newTemplateHardpoint(self::HARDPOINT_REVISIONREFS, $object_list), | ||||
| $this->newVectorHardpoint(self::HARDPOINT_REVISIONREFS), | |||||
| ); | ); | ||||
| } | } | ||||
| public function attachBranchRef(ArcanistBranchRef $branch_ref) { | // TODO: This should be "attachCommitRef()". | ||||
| return $this->attachHardpoint(self::HARDPOINT_BRANCHREF, $branch_ref); | public function setCommitRef(ArcanistCommitRefPro $commit_ref) { | ||||
| } | |||||
| public function getBranchRef() { | |||||
| return $this->getHardpoint(self::HARDPOINT_BRANCHREF); | |||||
| } | |||||
| public function setCommitRef(ArcanistCommitRef $commit_ref) { | |||||
| return $this->attachHardpoint(self::HARDPOINT_COMMITREF, $commit_ref); | return $this->attachHardpoint(self::HARDPOINT_COMMITREF, $commit_ref); | ||||
| } | } | ||||
| public function getCommitRef() { | public function getCommitRef() { | ||||
| return $this->getHardpoint(self::HARDPOINT_COMMITREF); | return $this->getHardpoint(self::HARDPOINT_COMMITREF); | ||||
| } | } | ||||
| public function getRevisionRefs() { | public function getRevisionRefs() { | ||||
| Show All 22 Lines | |||||