Changeset View
Changeset View
Standalone View
Standalone View
src/repository/api/ArcanistMercurialAPI.php
Show First 20 Lines • Show All 577 Lines • ▼ Show 20 Lines | foreach ($matches as $match) { | ||||
$return[] = array( | $return[] = array( | ||||
'current' => (bool)$current, | 'current' => (bool)$current, | ||||
'name' => rtrim($name), | 'name' => rtrim($name), | ||||
); | ); | ||||
} | } | ||||
return $return; | return $return; | ||||
} | } | ||||
public function getAllBranchRefs() { | |||||
$branches = $this->getAllBranches(); | |||||
$refs = array(); | |||||
foreach ($branches as $branch) { | |||||
$refs[] = $this->newBranchRef() | |||||
->setBranchName($branch['name']) | |||||
->setIsCurrentBranch($branch['current']); | |||||
} | |||||
return $refs; | |||||
} | |||||
public function hasLocalCommit($commit) { | public function hasLocalCommit($commit) { | ||||
try { | try { | ||||
$this->getCanonicalRevisionName($commit); | $this->getCanonicalRevisionName($commit); | ||||
return true; | return true; | ||||
} catch (Exception $ex) { | } catch (Exception $ex) { | ||||
return false; | return false; | ||||
} | } | ||||
} | } | ||||
▲ Show 20 Lines • Show All 535 Lines • Show Last 20 Lines |