Changeset View
Changeset View
Standalone View
Standalone View
src/land/engine/ArcanistMercurialLandEngine.php
| Show First 20 Lines • Show All 354 Lines • ▼ Show 20 Lines | final class ArcanistMercurialLandEngine | ||||
| } | } | ||||
| private function fetchTarget(ArcanistLandTarget $target) { | private function fetchTarget(ArcanistLandTarget $target) { | ||||
| $api = $this->getRepositoryAPI(); | $api = $this->getRepositoryAPI(); | ||||
| $log = $this->getLogEngine(); | $log = $this->getLogEngine(); | ||||
| // TODO: Support bookmarks. | // TODO: Support bookmarks. | ||||
| // TODO: Deal with bookmark save/restore behavior. | // TODO: Deal with bookmark save/restore behavior. | ||||
| // TODO: Format this nicely with passthru. | |||||
| // TODO: Raise a good error message when the ref does not exist. | // TODO: Raise a good error message when the ref does not exist. | ||||
| $api->execPassthru( | $err = $this->newPassthru( | ||||
| 'pull -b %s -- %s', | 'pull -b %s -- %s', | ||||
| $target->getRef(), | $target->getRef(), | ||||
| $target->getRemote()); | $target->getRemote()); | ||||
| // TODO: Deal with errors. | |||||
| // TODO: Deal with multiple branch heads. | // TODO: Deal with multiple branch heads. | ||||
| list($stdout) = $api->execxLocal( | list($stdout) = $api->execxLocal( | ||||
| 'log --rev %s --template %s --', | 'log --rev %s --template %s --', | ||||
| hgsprintf( | hgsprintf( | ||||
| 'last(ancestors(%s) and !outgoing(%s))', | 'last(ancestors(%s) and !outgoing(%s))', | ||||
| $target->getRef(), | $target->getRef(), | ||||
| $target->getRemote()), | $target->getRemote()), | ||||
| ▲ Show 20 Lines • Show All 123 Lines • ▼ Show 20 Lines | protected function executeMerge(ArcanistLandCommitSet $set, $into_commit) { | ||||
| return $new_cursor; | return $new_cursor; | ||||
| } | } | ||||
| protected function pushChange($into_commit) { | protected function pushChange($into_commit) { | ||||
| $api = $this->getRepositoryAPI(); | $api = $this->getRepositoryAPI(); | ||||
| // TODO: This does not respect "--into" or "--onto" properly. | // TODO: This does not respect "--into" or "--onto" properly. | ||||
| $api->execxLocal( | $this->newPassthru( | ||||
| 'push --rev %s -- %s', | 'push --rev %s -- %s', | ||||
| hgsprintf('%s', $into_commit), | hgsprintf('%s', $into_commit), | ||||
| $this->getOntoRemote()); | $this->getOntoRemote()); | ||||
| } | } | ||||
| protected function cascadeState(ArcanistLandCommitSet $set, $into_commit) { | protected function cascadeState(ArcanistLandCommitSet $set, $into_commit) { | ||||
| $api = $this->getRepositoryAPI(); | $api = $this->getRepositoryAPI(); | ||||
| $log = $this->getLogEngine(); | $log = $this->getLogEngine(); | ||||
| ▲ Show 20 Lines • Show All 137 Lines • Show Last 20 Lines | |||||