1
0
Fork 0
mirror of https://we.phorge.it/source/arcanist.git synced 2024-11-25 16:22:42 +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:
epriestley 2012-05-07 08:16:14 -07:00
parent 9f3a0963cb
commit d40a30f10f
6 changed files with 12 additions and 14 deletions

View file

@ -161,7 +161,7 @@ final class BranchInfo {
*/
private static function getColorForStatus($status) {
static $status_to_color = array(
'Committed' => 'cyan',
'Closed' => 'cyan',
'Needs Review' => 'magenta',
'Needs Revision' => 'red',
'Accepted' => 'green',

View file

@ -21,8 +21,7 @@ final class ArcanistDifferentialRevisionStatus {
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) {

View file

@ -38,7 +38,7 @@ EOTEXT
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
);
@ -61,7 +61,7 @@ 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.',
@ -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() {
foreach ($this->branches as $id => $branch) {
@ -128,7 +128,7 @@ EOTEXT
continue; //never filter the current branch
}
$status = $branch->getStatus();
if ($status == 'Committed' || $status == 'Abandoned') {
if ($status == 'Closed' || $status == 'Abandoned') {
unset($this->branches[$id]);
}
}

View file

@ -143,9 +143,9 @@ EOTEXT
echo "Closing revision D{$revision_id} '{$revision_name}'...\n";
$conduit->callMethodSynchronous(
'differential.markcommitted',
'differential.close',
array(
'revision_id' => $revision_id,
'revisionID' => $revision_id,
));
}
}

View file

@ -121,9 +121,9 @@ EOTEXT
$futures = array();
foreach ($mark_revisions as $revision_id) {
$futures[] = $conduit->callMethod(
'differential.markcommitted',
'differential.close',
array(
'revision_id' => $revision_id,
'revisionID' => $revision_id,
));
}

View file

@ -810,12 +810,11 @@ EOTEXT
);
// 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;
}
}