Changeset View
Changeset View
Standalone View
Standalone View
src/ref/ArcanistWorkingCopyStateRef.php
<?php | <?php | ||||
final class ArcanistWorkingCopyStateRef | final class ArcanistWorkingCopyStateRef | ||||
extends ArcanistRef { | extends ArcanistRef { | ||||
private $rootDirectory; | |||||
public function getRefIdentifier() { | public function getRefIdentifier() { | ||||
// 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'); | ||||
} | } | ||||
public function defineHardpoints() { | public function defineHardpoints() { | ||||
return array( | return array( | ||||
'commitRef' => array( | 'commitRef' => array( | ||||
'type' => 'ArcanistCommitRef', | 'type' => 'ArcanistCommitRef', | ||||
), | ), | ||||
'branchRef' => array( | 'branchRef' => array( | ||||
'type' => 'ArcanistBranchRef', | 'type' => 'ArcanistBranchRef', | ||||
), | ), | ||||
'revisionRefs' => array( | 'revisionRefs' => array( | ||||
'type' => 'ArcanistRevisionRef', | 'type' => 'ArcanistRevisionRef', | ||||
'vector' => true, | 'vector' => true, | ||||
), | ), | ||||
); | ); | ||||
} | } | ||||
public function setRootDirectory($root_directory) { | |||||
$this->rootDirectory = $root_directory; | |||||
return $this; | |||||
} | |||||
public function getRootDirectory() { | |||||
return $this->rootDirectory; | |||||
} | |||||
public function attachBranchRef(ArcanistBranchRef $branch_ref) { | public function attachBranchRef(ArcanistBranchRef $branch_ref) { | ||||
return $this->attachHardpoint('branchRef', $branch_ref); | return $this->attachHardpoint('branchRef', $branch_ref); | ||||
} | } | ||||
public function getBranchRef() { | public function getBranchRef() { | ||||
return $this->getHardpoint('branchRef'); | return $this->getHardpoint('branchRef'); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 77 Lines • Show Last 20 Lines |