*/
private static function getColorForStatus($status) {
static $status_to_color = array(
- 'Committed' => 'cyan',
+ 'Closed' => 'cyan',
'Needs Review' => 'magenta',
'Needs Revision' => 'red',
'Accepted' => 'green',
const NEEDS_REVIEW = 0;
const NEEDS_REVISION = 1;
const ACCEPTED = 2;
- const COMMITTED = 3; // TODO: Remove.
- const CLOSED = 3; // NOTE: Duplicate of "COMMITTED".
+ const CLOSED = 3;
const ABANDONED = 4;
public static function getNameForRevisionStatus($status) {
A wrapper on 'git branch'. It pulls data from Differential and
displays the revision status next to the branch name.
Branches are sorted in ascending order by the last commit time.
- By default branches with committed/abandoned revisions
+ By default branches with closed/abandoned revisions
are not displayed.
EOTEXT
);
return array(
'view-all' => array(
'help' =>
- "Include committed and abandoned revisions",
+ "Include closed and abandoned revisions",
),
'by-status' => array(
'help' => 'Group output by revision status.',
}
/**
- * Removes the branches with status either committed or abandoned.
+ * Removes the branches with status either closed or abandoned.
*/
private function filterOutFinished() {
foreach ($this->branches as $id => $branch) {
continue; //never filter the current branch
}
$status = $branch->getStatus();
- if ($status == 'Committed' || $status == 'Abandoned') {
+ if ($status == 'Closed' || $status == 'Abandoned') {
unset($this->branches[$id]);
}
}
echo "Closing revision D{$revision_id} '{$revision_name}'...\n";
$conduit->callMethodSynchronous(
- 'differential.markcommitted',
+ 'differential.close',
array(
- 'revision_id' => $revision_id,
+ 'revisionID' => $revision_id,
));
}
}
$futures = array();
foreach ($mark_revisions as $revision_id) {
$futures[] = $conduit->callMethod(
- 'differential.markcommitted',
+ 'differential.close',
array(
- 'revision_id' => $revision_id,
+ 'revisionID' => $revision_id,
));
}
);
- // grab the latest committed revision only
+ // grab the latest closed revision only
$found_revision = null;
$revisions = isort($revisions, 'dateModified');
foreach ($revisions as $revision) {
- if ($revision['status'] ==
- ArcanistDifferentialRevisionStatus::COMMITTED) {
+ if ($revision['status'] == ArcanistDifferentialRevisionStatus::CLOSED) {
$found_revision = $revision;
}
}