Changeset View
Changeset View
Standalone View
Standalone View
src/repository/api/ArcanistMercurialAPI.php
| Show First 20 Lines • Show All 791 Lines • ▼ Show 20 Lines | list($summary) = $this->execxLocal( | ||||
| 'log --template {desc} --limit 1 --rev %s', | 'log --template {desc} --limit 1 --rev %s', | ||||
| $commit); | $commit); | ||||
| $summary = head(explode("\n", $summary)); | $summary = head(explode("\n", $summary)); | ||||
| return trim($summary); | return trim($summary); | ||||
| } | } | ||||
| public function backoutCommit($commit_hash) { | |||||
| $this->execxLocal('backout -r %s', $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('Backed out changeset %s,', $commit_hash); | |||||
| } | |||||
| public function resolveBaseCommitRule($rule, $source) { | public function resolveBaseCommitRule($rule, $source) { | ||||
| list($type, $name) = explode(':', $rule, 2); | list($type, $name) = explode(':', $rule, 2); | ||||
| // NOTE: This function MUST return node hashes or symbolic commits (like | // NOTE: This function MUST return node hashes or symbolic commits (like | ||||
| // branch names or the word "tip"), not revsets. This includes ".^" and | // branch names or the word "tip"), not revsets. This includes ".^" and | ||||
| // similar, which a revset, not a symbolic commit identifier. If you return | // similar, which a revset, not a symbolic commit identifier. If you return | ||||
| // a revset it will be escaped later and looked up literally. | // a revset it will be escaped later and looked up literally. | ||||
| ▲ Show 20 Lines • Show All 304 Lines • Show Last 20 Lines | |||||