mirror of
https://we.phorge.it/source/arcanist.git
synced 2024-12-01 19:22:41 +01:00
Finish "Committed" -> "Closed" changes
Summary: Clean up the remaining odds-and-ends here -- move to "differential.close", get rid of the old constant, etc. I'll wait a week or two to land this since "differential.close" just landed and all the other stuff is trivial. Test Plan: Grepped for "committed". Reviewers: btrahan, vrana, Makinde Reviewed By: btrahan CC: aran Maniphest Tasks: T909, T1182 Differential Revision: https://secure.phabricator.com/D2309
This commit is contained in:
parent
9f3a0963cb
commit
d40a30f10f
6 changed files with 12 additions and 14 deletions
|
@ -161,7 +161,7 @@ final class BranchInfo {
|
||||||
*/
|
*/
|
||||||
private static function getColorForStatus($status) {
|
private static function getColorForStatus($status) {
|
||||||
static $status_to_color = array(
|
static $status_to_color = array(
|
||||||
'Committed' => 'cyan',
|
'Closed' => 'cyan',
|
||||||
'Needs Review' => 'magenta',
|
'Needs Review' => 'magenta',
|
||||||
'Needs Revision' => 'red',
|
'Needs Revision' => 'red',
|
||||||
'Accepted' => 'green',
|
'Accepted' => 'green',
|
||||||
|
|
|
@ -21,8 +21,7 @@ final class ArcanistDifferentialRevisionStatus {
|
||||||
const NEEDS_REVIEW = 0;
|
const NEEDS_REVIEW = 0;
|
||||||
const NEEDS_REVISION = 1;
|
const NEEDS_REVISION = 1;
|
||||||
const ACCEPTED = 2;
|
const ACCEPTED = 2;
|
||||||
const COMMITTED = 3; // TODO: Remove.
|
const CLOSED = 3;
|
||||||
const CLOSED = 3; // NOTE: Duplicate of "COMMITTED".
|
|
||||||
const ABANDONED = 4;
|
const ABANDONED = 4;
|
||||||
|
|
||||||
public static function getNameForRevisionStatus($status) {
|
public static function getNameForRevisionStatus($status) {
|
||||||
|
|
|
@ -38,7 +38,7 @@ EOTEXT
|
||||||
A wrapper on 'git branch'. It pulls data from Differential and
|
A wrapper on 'git branch'. It pulls data from Differential and
|
||||||
displays the revision status next to the branch name.
|
displays the revision status next to the branch name.
|
||||||
Branches are sorted in ascending order by the last commit time.
|
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.
|
are not displayed.
|
||||||
EOTEXT
|
EOTEXT
|
||||||
);
|
);
|
||||||
|
@ -61,7 +61,7 @@ EOTEXT
|
||||||
return array(
|
return array(
|
||||||
'view-all' => array(
|
'view-all' => array(
|
||||||
'help' =>
|
'help' =>
|
||||||
"Include committed and abandoned revisions",
|
"Include closed and abandoned revisions",
|
||||||
),
|
),
|
||||||
'by-status' => array(
|
'by-status' => array(
|
||||||
'help' => 'Group output by revision status.',
|
'help' => 'Group output by revision status.',
|
||||||
|
@ -120,7 +120,7 @@ EOTEXT
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Removes the branches with status either committed or abandoned.
|
* Removes the branches with status either closed or abandoned.
|
||||||
*/
|
*/
|
||||||
private function filterOutFinished() {
|
private function filterOutFinished() {
|
||||||
foreach ($this->branches as $id => $branch) {
|
foreach ($this->branches as $id => $branch) {
|
||||||
|
@ -128,7 +128,7 @@ EOTEXT
|
||||||
continue; //never filter the current branch
|
continue; //never filter the current branch
|
||||||
}
|
}
|
||||||
$status = $branch->getStatus();
|
$status = $branch->getStatus();
|
||||||
if ($status == 'Committed' || $status == 'Abandoned') {
|
if ($status == 'Closed' || $status == 'Abandoned') {
|
||||||
unset($this->branches[$id]);
|
unset($this->branches[$id]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -143,9 +143,9 @@ EOTEXT
|
||||||
echo "Closing revision D{$revision_id} '{$revision_name}'...\n";
|
echo "Closing revision D{$revision_id} '{$revision_name}'...\n";
|
||||||
|
|
||||||
$conduit->callMethodSynchronous(
|
$conduit->callMethodSynchronous(
|
||||||
'differential.markcommitted',
|
'differential.close',
|
||||||
array(
|
array(
|
||||||
'revision_id' => $revision_id,
|
'revisionID' => $revision_id,
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -121,9 +121,9 @@ EOTEXT
|
||||||
$futures = array();
|
$futures = array();
|
||||||
foreach ($mark_revisions as $revision_id) {
|
foreach ($mark_revisions as $revision_id) {
|
||||||
$futures[] = $conduit->callMethod(
|
$futures[] = $conduit->callMethod(
|
||||||
'differential.markcommitted',
|
'differential.close',
|
||||||
array(
|
array(
|
||||||
'revision_id' => $revision_id,
|
'revisionID' => $revision_id,
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -810,12 +810,11 @@ EOTEXT
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
// grab the latest committed revision only
|
// grab the latest closed revision only
|
||||||
$found_revision = null;
|
$found_revision = null;
|
||||||
$revisions = isort($revisions, 'dateModified');
|
$revisions = isort($revisions, 'dateModified');
|
||||||
foreach ($revisions as $revision) {
|
foreach ($revisions as $revision) {
|
||||||
if ($revision['status'] ==
|
if ($revision['status'] == ArcanistDifferentialRevisionStatus::CLOSED) {
|
||||||
ArcanistDifferentialRevisionStatus::COMMITTED) {
|
|
||||||
$found_revision = $revision;
|
$found_revision = $revision;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue