Differential D18817 Diff 45157 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 124 Lines • ▼ Show 20 Lines | protected function getMercurialResult(ConduitAPIRequest $request) { | ||||
if (strlen($path)) { | if (strlen($path)) { | ||||
$path_arg = csprintf('%s', $path); | $path_arg = csprintf('%s', $path); | ||||
$revset_arg = hgsprintf( | $revset_arg = hgsprintf( | ||||
'reverse(ancestors(%s))', | 'reverse(ancestors(%s))', | ||||
$commit_hash); | $commit_hash); | ||||
} else { | } else { | ||||
$path_arg = ''; | $path_arg = ''; | ||||
$revset_arg = hgsprintf( | $revset_arg = hgsprintf( | ||||
'branch(%s) and reverse(ancestors(%s))', | 'reverse(ancestors(%s)) and branch(%s)', | ||||
$drequest->getBranch(), | $drequest->getBranch(), | ||||
$commit_hash); | $commit_hash); | ||||
} | } | ||||
list($stdout) = $repository->execxLocalCommand( | list($stdout) = $repository->execxLocalCommand( | ||||
'log --debug --template %s --limit %d --rev %s -- %C', | 'log --debug --template %s --limit %d --rev %s -- %C', | ||||
'{node};{parents}\\n', | '{node};{parents}\\n', | ||||
($offset + $limit), // No '--skip' in Mercurial. | ($offset + $limit), // No '--skip' in Mercurial. | ||||
▲ Show 20 Lines • Show All 141 Lines • Show Last 20 Lines |