Differential D15752 Diff 37961 src/applications/diffusion/conduit/DiffusionHistoryQueryConduitAPIMethod.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/diffusion/conduit/DiffusionHistoryQueryConduitAPIMethod.php
| Show First 20 Lines • Show All 125 Lines • ▼ Show 20 Lines | protected function getMercurialResult(ConduitAPIRequest $request) { | ||||
| list($stdout) = $repository->execxLocalCommand( | list($stdout) = $repository->execxLocalCommand( | ||||
| 'log --debug --template %s --limit %d %C --rev %s %C', | 'log --debug --template %s --limit %d %C --rev %s %C', | ||||
| '{node};{parents}\\n', | '{node};{parents}\\n', | ||||
| ($offset + $limit), // No '--skip' in Mercurial. | ($offset + $limit), // No '--skip' in Mercurial. | ||||
| $branch_arg, | $branch_arg, | ||||
| hgsprintf('reverse(ancestors(%s))', $commit_hash), | hgsprintf('reverse(ancestors(%s))', $commit_hash), | ||||
| $path_arg); | $path_arg); | ||||
| $stdout = PhabricatorRepository::filterMercurialDebugOutput($stdout); | $stdout = DiffusionMercurialCommandEngine::filterMercurialDebugOutput( | ||||
| $stdout); | |||||
| $lines = explode("\n", trim($stdout)); | $lines = explode("\n", trim($stdout)); | ||||
| $lines = array_slice($lines, $offset); | $lines = array_slice($lines, $offset); | ||||
| $hash_list = array(); | $hash_list = array(); | ||||
| $parent_map = array(); | $parent_map = array(); | ||||
| $last = null; | $last = null; | ||||
| foreach (array_reverse($lines) as $line) { | foreach (array_reverse($lines) as $line) { | ||||
| ▲ Show 20 Lines • Show All 128 Lines • Show Last 20 Lines | |||||