Update utility "bin/repository parents" workflow to work with RefPosition
Summary: Ref T11823. I think this is the last callsite which relies on the old data format: `bin/repository parents` rebuilds a cache which we don't currently use very heavily. Update it to work with the new data. Test Plan: Ran `bin/repository parents <repository> --trace`, saw successful script execution and reasonable-looking output. Reviewers: amckinley Reviewed By: amckinley Maniphest Tasks: T11823 Differential Revision: https://secure.phabricator.com/D18615
This commit is contained in:
@@ -54,6 +54,7 @@ final class PhabricatorRepositoryManagementParentsWorkflow
|
||||
->setViewer($this->getViewer())
|
||||
->withRefTypes(array(PhabricatorRepositoryRefCursor::TYPE_BRANCH))
|
||||
->withRepositoryPHIDs(array($repo->getPHID()))
|
||||
->needPositions(true)
|
||||
->execute();
|
||||
|
||||
$graph = array();
|
||||
@@ -66,8 +67,7 @@ final class PhabricatorRepositoryManagementParentsWorkflow
|
||||
"%s\n",
|
||||
pht('Rebuilding branch "%s"...', $ref->getRefName()));
|
||||
|
||||
$commit = $ref->getCommitIdentifier();
|
||||
|
||||
foreach ($ref->getPositionIdentifiers() as $commit) {
|
||||
if ($repo->isGit()) {
|
||||
$stream = new PhabricatorGitGraphStream($repo, $commit);
|
||||
} else {
|
||||
@@ -86,6 +86,7 @@ final class PhabricatorRepositoryManagementParentsWorkflow
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$console->writeOut(
|
||||
"%s\n",
|
||||
|
||||
Reference in New Issue
Block a user