Changeset View
Changeset View
Standalone View
Standalone View
src/repository/api/ArcanistGitAPI.php
| Show First 20 Lines • Show All 1,272 Lines • ▼ Show 20 Lines | public function getCommitSummary($commit) { | ||||
| list($summary) = $this->execxLocal( | list($summary) = $this->execxLocal( | ||||
| 'log -n 1 --format=%C %s', | 'log -n 1 --format=%C %s', | ||||
| '%s', | '%s', | ||||
| $commit); | $commit); | ||||
| return trim($summary); | return trim($summary); | ||||
| } | } | ||||
| public function backoutCommit($commit_hash) { | |||||
| $this->execxLocal('revert %s -n --no-edit', $commit_hash); | |||||
| $this->reloadWorkingCopy(); | |||||
| if (!$this->getUncommittedStatus()) { | |||||
| throw new ArcanistUsageException( | |||||
| pht('%s has already been reverted.', $commit_hash)); | |||||
| } | |||||
| } | |||||
| public function getBackoutMessage($commit_hash) { | |||||
| return pht('This reverts commit %s.', $commit_hash); | |||||
| } | |||||
| public function isGitSubversionRepo() { | public function isGitSubversionRepo() { | ||||
| return Filesystem::pathExists($this->getPath('.git/svn')); | return Filesystem::pathExists($this->getPath('.git/svn')); | ||||
| } | } | ||||
| public function resolveBaseCommitRule($rule, $source) { | public function resolveBaseCommitRule($rule, $source) { | ||||
| list($type, $name) = explode(':', $rule, 2); | list($type, $name) = explode(':', $rule, 2); | ||||
| switch ($type) { | switch ($type) { | ||||
| ▲ Show 20 Lines • Show All 393 Lines • Show Last 20 Lines | |||||