Changeset View
Changeset View
Standalone View
Standalone View
src/repository/api/ArcanistMercurialAPI.php
| Show First 20 Lines • Show All 590 Lines • ▼ Show 20 Lines | foreach ($branches as $branch) { | ||||
| $refs[] = $this->newBranchRef() | $refs[] = $this->newBranchRef() | ||||
| ->setBranchName($branch['name']) | ->setBranchName($branch['name']) | ||||
| ->setIsCurrentBranch($branch['current']); | ->setIsCurrentBranch($branch['current']); | ||||
| } | } | ||||
| return $refs; | return $refs; | ||||
| } | } | ||||
| public function getBaseCommitRef() { | |||||
| $base_commit = $this->getBaseCommit(); | |||||
| if ($base_commit === 'null') { | |||||
| return null; | |||||
| } | |||||
| $base_message = $this->getCommitMessage($base_commit); | |||||
| return $this->newCommitRef() | |||||
| ->setCommitHash($base_commit) | |||||
| ->attachMessage($base_message); | |||||
| } | |||||
| 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 | |||||