Changeset View
Changeset View
Standalone View
Standalone View
src/workflow/ArcanistFeatureBaseWorkflow.php
Show First 20 Lines • Show All 185 Lines • ▼ Show 20 Lines | foreach ($states as $objects) { | ||||
$revision = $state->getRevisionRef(); | $revision = $state->getRevisionRef(); | ||||
if ($revision) { | if ($revision) { | ||||
$status = $revision->getStatusDisplayName(); | $status = $revision->getStatusDisplayName(); | ||||
} else { | } else { | ||||
$status = pht('No Revision'); | $status = pht('No Revision'); | ||||
} | } | ||||
} | } | ||||
if (!$this->getArgument('view-all') && !$branch->getIsCurrentBranch()) { | if (!$this->getArgument('view-all') && !$branch->getIsActive()) { | ||||
if ($status == 'Closed' || $status == 'Abandoned') { | if ($status == 'Closed' || $status == 'Abandoned') { | ||||
continue; | continue; | ||||
} | } | ||||
} | } | ||||
$commit = $branch->getCommitRef(); | $commit = $branch->getCommitRef(); | ||||
$epoch = $commit->getCommitEpoch(); | $epoch = $commit->getCommitEpoch(); | ||||
$color = idx($color_map, $status, 'default'); | $color = idx($color_map, $status, 'default'); | ||||
$epoch_vector = id(new PhutilSortVector()) | $epoch_vector = id(new PhutilSortVector()) | ||||
->addInt($epoch); | ->addInt($epoch); | ||||
$status_vector = id(new PhutilSortVector()) | $status_vector = id(new PhutilSortVector()) | ||||
->addInt(idx($ssort_map, $status, 0)) | ->addInt(idx($ssort_map, $status, 0)) | ||||
->addInt($epoch); | ->addInt($epoch); | ||||
if ($revision) { | if ($revision) { | ||||
$desc = $revision->getFullName(); | $desc = $revision->getFullName(); | ||||
} else { | } else { | ||||
$desc = $commit->getSummary(); | $desc = $commit->getSummary(); | ||||
} | } | ||||
$out[] = array( | $out[] = array( | ||||
'name' => $branch->getBranchName(), | 'name' => $branch->getName(), | ||||
'current' => $branch->getIsCurrentBranch(), | 'current' => $branch->getIsActive(), | ||||
'status' => $status, | 'status' => $status, | ||||
'desc' => $desc, | 'desc' => $desc, | ||||
'revision' => $revision ? $revision->getID() : null, | 'revision' => $revision ? $revision->getID() : null, | ||||
'color' => $color, | 'color' => $color, | ||||
'epoch' => $epoch, | 'epoch' => $epoch, | ||||
'esort' => $epoch_vector, | 'esort' => $epoch_vector, | ||||
'ssort' => $status_vector, | 'ssort' => $status_vector, | ||||
▲ Show 20 Lines • Show All 58 Lines • Show Last 20 Lines |