Differential D15752 Diff 37961 src/applications/diffusion/query/lowlevel/DiffusionLowLevelParentsQuery.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/diffusion/query/lowlevel/DiffusionLowLevelParentsQuery.php
| Show First 20 Lines • Show All 44 Lines • ▼ Show 20 Lines | final class DiffusionLowLevelParentsQuery | ||||
| } | } | ||||
| private function loadMercurialParents() { | private function loadMercurialParents() { | ||||
| $repository = $this->getRepository(); | $repository = $this->getRepository(); | ||||
| list($stdout) = $repository->execxLocalCommand( | list($stdout) = $repository->execxLocalCommand( | ||||
| 'log --debug --limit 1 --template={parents} --rev %s', | 'log --debug --limit 1 --template={parents} --rev %s', | ||||
| $this->identifier); | $this->identifier); | ||||
| $stdout = PhabricatorRepository::filterMercurialDebugOutput($stdout); | |||||
| $stdout = DiffusionMercurialCommandEngine::filterMercurialDebugOutput( | |||||
| $stdout); | |||||
| $hashes = preg_split('/\s+/', trim($stdout)); | $hashes = preg_split('/\s+/', trim($stdout)); | ||||
| foreach ($hashes as $key => $value) { | foreach ($hashes as $key => $value) { | ||||
| // Mercurial parents look like "23:ad9f769d6f786fad9f76d9a" -- we want | // Mercurial parents look like "23:ad9f769d6f786fad9f76d9a" -- we want | ||||
| // to strip out the local rev part. | // to strip out the local rev part. | ||||
| list($local, $global) = explode(':', $value); | list($local, $global) = explode(':', $value); | ||||
| $hashes[$key] = $global; | $hashes[$key] = $global; | ||||
| Show All 36 Lines | |||||