Remove DiffusionBranchInformation in favor of DiffusionRepositoryRef
Summary: Ref T4327. At some point these two very similar classes got introduced. Collapse `DiffusionBranchInformation` into the nearly identical `DiffusionRepositoryRef`, which enjoys slightly more generality and support. Test Plan: Viewed branch overview and detail pages. Ran `repository refs` and `repository discover`. Grepped for removed symbols. Reviewers: btrahan Reviewed By: btrahan CC: aran Maniphest Tasks: T4327 Differential Revision: https://secure.phabricator.com/D8002
This commit is contained in:
@@ -18,15 +18,16 @@ final class DiffusionBranchTableController extends DiffusionController {
|
||||
$pager->setOffset($request->getInt('offset'));
|
||||
|
||||
// TODO: Add support for branches that contain commit
|
||||
$branches = DiffusionBranchInformation::newFromConduit(
|
||||
$this->callConduitWithDiffusionRequest(
|
||||
'diffusion.branchquery',
|
||||
array(
|
||||
'offset' => $pager->getOffset(),
|
||||
'limit' => $pager->getPageSize() + 1
|
||||
)));
|
||||
$branches = $this->callConduitWithDiffusionRequest(
|
||||
'diffusion.branchquery',
|
||||
array(
|
||||
'offset' => $pager->getOffset(),
|
||||
'limit' => $pager->getPageSize() + 1
|
||||
));
|
||||
$branches = $pager->sliceResults($branches);
|
||||
|
||||
$branches = DiffusionRepositoryRef::loadAllFromDictionaries($branches);
|
||||
|
||||
$content = null;
|
||||
if (!$branches) {
|
||||
$content = $this->renderStatusMessage(
|
||||
@@ -35,7 +36,7 @@ final class DiffusionBranchTableController extends DiffusionController {
|
||||
} else {
|
||||
$commits = id(new DiffusionCommitQuery())
|
||||
->setViewer($viewer)
|
||||
->withIdentifiers(mpull($branches, 'getHeadCommitIdentifier'))
|
||||
->withIdentifiers(mpull($branches, 'getCommitIdentifier'))
|
||||
->withRepository($repository)
|
||||
->execute();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user