1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-22 14:52:41 +01:00

Use "closed", not "committed", in Differential

Summary: "Committed" is SVN-specific language, and confusing in Git and Mercurial. Use neutral language instead.

Test Plan: Inspection.

Reviewers: btrahan, Makinde, vrana, jungejason

Reviewed By: vrana

CC: aran

Maniphest Tasks: T909

Differential Revision: https://secure.phabricator.com/D2087
This commit is contained in:
epriestley 2012-04-23 17:40:57 -07:00
parent 42b1c73f41
commit 20a5c9b261
27 changed files with 188 additions and 82 deletions

View file

@ -36,7 +36,7 @@ $args->setSynopsis(<<<EOSYNOPSIS
2. Put all their identifiers (commit hashes in git/hg, revision
numbers in svn) into a file, one per line.
3. Pipe that file into this script with relevant arguments.
4. Revisions marked "committed" by those commits will be
4. Revisions marked "closed" by those commits will be
restored to their previous state.
EOSYNOPSIS
@ -90,7 +90,7 @@ if (!$commits) {
$commit_phids = mpull($commits, 'getPHID', 'getPHID');
echo "Looking up revisions marked 'committed' by these commits...\n";
echo "Looking up revisions marked 'closed' by these commits...\n";
$revision_ids = queryfx_all(
id(new DifferentialRevision())->establishConnection('r'),
'SELECT DISTINCT revisionID from %T WHERE commitPHID IN (%Ls)',
@ -104,7 +104,7 @@ if (!$revision_ids) {
return;
}
$status_committed = ArcanistDifferentialRevisionStatus::COMMITTED;
$status_closed = ArcanistDifferentialRevisionStatus::CLOSED;
$revisions = array();
$map = array();
@ -114,8 +114,8 @@ if ($revision_ids) {
echo "Assessing revision D{$revision_id}...\n";
$revision = id(new DifferentialRevision())->load($revision_id);
if ($revision->getStatus() != $status_committed) {
echo "Revision is not 'committed', skipping.\n";
if ($revision->getStatus() != $status_closed) {
echo "Revision is not 'closed', skipping.\n";
}
$assoc_commits = queryfx_all(

View file

@ -124,6 +124,7 @@ phutil_register_library_map(array(
'ConduitAPI_conduit_ping_Method' => 'applications/conduit/method/conduit/ping',
'ConduitAPI_daemon_launched_Method' => 'applications/conduit/method/daemon/launched',
'ConduitAPI_daemon_log_Method' => 'applications/conduit/method/daemon/log',
'ConduitAPI_differential_close_Method' => 'applications/conduit/method/differential/close',
'ConduitAPI_differential_createcomment_Method' => 'applications/conduit/method/differential/createcomment',
'ConduitAPI_differential_creatediff_Method' => 'applications/conduit/method/differential/creatediff',
'ConduitAPI_differential_createrevision_Method' => 'applications/conduit/method/differential/createrevision',
@ -1116,6 +1117,7 @@ phutil_register_library_map(array(
'ConduitAPI_conduit_ping_Method' => 'ConduitAPIMethod',
'ConduitAPI_daemon_launched_Method' => 'ConduitAPIMethod',
'ConduitAPI_daemon_log_Method' => 'ConduitAPIMethod',
'ConduitAPI_differential_close_Method' => 'ConduitAPIMethod',
'ConduitAPI_differential_createcomment_Method' => 'ConduitAPIMethod',
'ConduitAPI_differential_creatediff_Method' => 'ConduitAPIMethod',
'ConduitAPI_differential_createrevision_Method' => 'ConduitAPIMethod',

View file

@ -0,0 +1,77 @@
<?php
/*
* Copyright 2012 Facebook, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @group conduit
*/
final class ConduitAPI_differential_close_Method
extends ConduitAPIMethod {
public function getMethodDescription() {
return "Close a Differential revision.";
}
public function defineParamTypes() {
return array(
'revisionID' => 'required int',
);
}
public function defineReturnType() {
return 'void';
}
public function defineErrorTypes() {
return array(
'ERR_NOT_FOUND' => 'Revision was not found.',
);
}
protected function execute(ConduitAPIRequest $request) {
$id = $request->getValue('revisionID');
$revision = id(new DifferentialRevision())->load($id);
if (!$revision) {
throw new ConduitException('ERR_NOT_FOUND');
}
if ($revision->getStatus() == ArcanistDifferentialRevisionStatus::CLOSED) {
// This can occur if someone runs 'close-revision' and hits a race, or
// they have a remote hook installed but don't have the
// 'remote_hook_installed' flag set, or similar. In any case, just treat
// it as a no-op rather than adding another "X closed this revision"
// message to the revision comments.
return;
}
$revision->loadRelationships();
$editor = new DifferentialCommentEditor(
$revision,
$request->getUser()->getPHID(),
DifferentialAction::ACTION_CLOSE);
$editor->save();
$revision->setStatus(ArcanistDifferentialRevisionStatus::CLOSED);
$revision->setDateCommitted(time());
$revision->save();
return;
}
}

View file

@ -0,0 +1,20 @@
<?php
/**
* This file is automatically generated. Lint this module to rebuild it.
* @generated
*/
phutil_require_module('arcanist', 'differential/constants/revisionstatus');
phutil_require_module('phabricator', 'applications/conduit/method/base');
phutil_require_module('phabricator', 'applications/conduit/protocol/exception');
phutil_require_module('phabricator', 'applications/differential/constants/action');
phutil_require_module('phabricator', 'applications/differential/editor/comment');
phutil_require_module('phabricator', 'applications/differential/storage/revision');
phutil_require_module('phutil', 'utils');
phutil_require_source('ConduitAPI_differential_close_Method.php');

View file

@ -76,7 +76,7 @@ final class ConduitAPI_differential_creatediff_Method extends ConduitAPIMethod {
$parent_rev = id(new DifferentialRevision())->load($parent_id);
if ($parent_rev) {
if ($parent_rev->getStatus() !=
ArcanistDifferentialRevisionStatus::COMMITTED) {
ArcanistDifferentialRevisionStatus::CLOSED) {
$diff->setParentRevisionID($parent_id);
}
}

View file

@ -18,12 +18,21 @@
/**
* @group conduit
* @deprecated
*/
final class ConduitAPI_differential_markcommitted_Method
extends ConduitAPIMethod {
public function getMethodStatus() {
return self::METHOD_STATUS_DEPRECATED;
}
public function getMethodStatusDescription() {
return "Replaced by 'differential.close'.";
}
public function getMethodDescription() {
return "Mark Differential revisions as committed.";
return "Mark a revision closed.";
}
public function defineParamTypes() {
@ -50,13 +59,7 @@ final class ConduitAPI_differential_markcommitted_Method
throw new ConduitException('ERR_NOT_FOUND');
}
if ($revision->getStatus() ==
ArcanistDifferentialRevisionStatus::COMMITTED) {
// This can occur if someone runs 'mark-committed' and hits a race, or
// they have a remote hook installed but don't have the
// 'remote_hook_installed' flag set, or similar. In any case, just treat
// it as a no-op rather than adding another "X committed this revision"
// message to the revision comments.
if ($revision->getStatus() == ArcanistDifferentialRevisionStatus::CLOSED) {
return;
}
@ -65,10 +68,8 @@ final class ConduitAPI_differential_markcommitted_Method
$editor = new DifferentialCommentEditor(
$revision,
$request->getUser()->getPHID(),
DifferentialAction::ACTION_COMMIT);
DifferentialAction::ACTION_CLOSE);
$editor->save();
return;
}
}

View file

@ -34,7 +34,7 @@ final class ConduitAPI_differential_query_Method
DifferentialRevisionQuery::STATUS_ANY,
DifferentialRevisionQuery::STATUS_OPEN,
DifferentialRevisionQuery::STATUS_ACCEPTED,
DifferentialRevisionQuery::STATUS_COMMITTED,
DifferentialRevisionQuery::STATUS_CLOSED,
);
$status_types = implode(', ', $status_types);

View file

@ -44,7 +44,7 @@ final class ConduitAPI_differential_updaterevision_Method
'ERR_BAD_DIFF' => 'Bad diff ID.',
'ERR_BAD_REVISION' => 'Bad revision ID.',
'ERR_WRONG_USER' => 'You are not the author of this revision.',
'ERR_COMMITTED' => 'This revision has already been committed.',
'ERR_CLOSED' => 'This revision has already been closed.',
);
}
@ -63,9 +63,8 @@ final class ConduitAPI_differential_updaterevision_Method
throw new ConduitException('ERR_WRONG_USER');
}
if ($revision->getStatus() ==
ArcanistDifferentialRevisionStatus::COMMITTED) {
throw new ConduitException('ERR_COMMITTED');
if ($revision->getStatus() == ArcanistDifferentialRevisionStatus::CLOSED) {
throw new ConduitException('ERR_CLOSED');
}
$content_source = PhabricatorContentSource::newForSource(

View file

@ -18,7 +18,7 @@
final class DifferentialAction {
const ACTION_COMMIT = 'commit';
const ACTION_CLOSE = 'commit';
const ACTION_COMMENT = 'none';
const ACTION_ACCEPT = 'accept';
const ACTION_REJECT = 'reject';
@ -42,7 +42,7 @@ final class DifferentialAction {
self::ACTION_REJECT => 'requested changes to',
self::ACTION_RETHINK => 'planned changes to',
self::ACTION_ABANDON => 'abandoned',
self::ACTION_COMMIT => 'committed',
self::ACTION_CLOSE => 'closed',
self::ACTION_REQUEST => 'requested a review of',
self::ACTION_RECLAIM => 'reclaimed',
self::ACTION_UPDATE => 'updated',
@ -74,7 +74,7 @@ final class DifferentialAction {
self::ACTION_RESIGN => 'Resign as Reviewer',
self::ACTION_ADDREVIEWERS => 'Add Reviewers',
self::ACTION_ADDCCS => 'Add CCs',
self::ACTION_COMMIT => 'Mark Committed',
self::ACTION_CLOSE => 'Close Revision',
self::ACTION_CLAIM => 'Commandeer Revision',
);

View file

@ -379,7 +379,7 @@ final class DifferentialRevisionListController extends DifferentialController {
array(
'all' => 'All',
'open' => 'Open',
'committed' => 'Committed',
'closed' => 'Closed',
'abandoned' => 'Abandoned',
));
case 'order':
@ -406,8 +406,8 @@ final class DifferentialRevisionListController extends DifferentialController {
case 'status':
if ($params['status'] == 'open') {
$query->withStatus(DifferentialRevisionQuery::STATUS_OPEN);
} else if ($params['status'] == 'committed') {
$query->withStatus(DifferentialRevisionQuery::STATUS_COMMITTED);
} else if ($params['status'] == 'closed') {
$query->withStatus(DifferentialRevisionQuery::STATUS_CLOSED);
} else if ($params['status'] == 'abandoned') {
$query->withStatus(DifferentialRevisionQuery::STATUS_ABANDONED);
}

View file

@ -101,7 +101,7 @@ final class DifferentialRevisionStatsController extends DifferentialController {
$side_nav->setBaseURI(id(new PhutilURI('/differential/stats/'))
->alter('phid', $params['phid']));
foreach (array(
DifferentialAction::ACTION_COMMIT,
DifferentialAction::ACTION_CLOSE,
DifferentialAction::ACTION_ACCEPT,
DifferentialAction::ACTION_REJECT,
DifferentialAction::ACTION_UPDATE,
@ -112,7 +112,7 @@ final class DifferentialRevisionStatsController extends DifferentialController {
}
$this->filter =
$side_nav->selectFilter($this->filter,
DifferentialAction::ACTION_COMMIT);
DifferentialAction::ACTION_CLOSE);
$panels = array();
$handles = id(new PhabricatorObjectHandleData(array($params['phid'])))

View file

@ -499,9 +499,9 @@ final class DifferentialRevisionViewController extends DifferentialController {
$actions[DifferentialAction::ACTION_ABANDON] = true;
$actions[DifferentialAction::ACTION_REQUEST] = true;
$actions[DifferentialAction::ACTION_RETHINK] = true;
$actions[DifferentialAction::ACTION_COMMIT] = true;
$actions[DifferentialAction::ACTION_CLOSE] = true;
break;
case ArcanistDifferentialRevisionStatus::COMMITTED:
case ArcanistDifferentialRevisionStatus::CLOSED:
break;
case ArcanistDifferentialRevisionStatus::ABANDONED:
$actions[DifferentialAction::ACTION_RECLAIM] = true;
@ -523,11 +523,11 @@ final class DifferentialRevisionViewController extends DifferentialController {
$actions[DifferentialAction::ACTION_RESIGN] =
$viewer_is_reviewer && !$viewer_did_accept;
break;
case ArcanistDifferentialRevisionStatus::COMMITTED:
case ArcanistDifferentialRevisionStatus::CLOSED:
case ArcanistDifferentialRevisionStatus::ABANDONED:
break;
}
if ($status != ArcanistDifferentialRevisionStatus::COMMITTED) {
if ($status != ArcanistDifferentialRevisionStatus::CLOSED) {
$actions[DifferentialAction::ACTION_CLAIM] = true;
}
}

View file

@ -150,10 +150,10 @@ final class DifferentialCommentEditor {
throw new Exception('You can only abandon your own revisions.');
}
if ($revision_status == ArcanistDifferentialRevisionStatus::COMMITTED) {
if ($revision_status == ArcanistDifferentialRevisionStatus::CLOSED) {
throw new DifferentialActionHasNoEffectException(
"You can not abandon this revision because it has already ".
"been committed.");
"been closed.");
}
if ($revision_status == ArcanistDifferentialRevisionStatus::ABANDONED) {
@ -183,10 +183,10 @@ final class DifferentialCommentEditor {
throw new DifferentialActionHasNoEffectException(
"You can not accept this revision because it has been ".
"abandoned.");
case ArcanistDifferentialRevisionStatus::COMMITTED:
case ArcanistDifferentialRevisionStatus::CLOSED:
throw new DifferentialActionHasNoEffectException(
"You can not accept this revision because it has already ".
"been committed.");
"been closed.");
default:
throw new Exception(
"Unexpected revision state '{$revision_status}'!");
@ -225,10 +225,10 @@ final class DifferentialCommentEditor {
throw new DifferentialActionHasNoEffectException(
"You can not request review of this revision because it has ".
"been abandoned.");
case ArcanistDifferentialRevisionStatus::COMMITTED:
case ArcanistDifferentialRevisionStatus::CLOSED:
throw new DifferentialActionHasNoEffectException(
"You can not request review of this revision because it has ".
"already been committed.");
"already been closed.");
default:
throw new Exception(
"Unexpected revision state '{$revision_status}'!");
@ -260,10 +260,10 @@ final class DifferentialCommentEditor {
throw new DifferentialActionHasNoEffectException(
"You can not request changes to this revision because it has ".
"been abandoned.");
case ArcanistDifferentialRevisionStatus::COMMITTED:
case ArcanistDifferentialRevisionStatus::CLOSED:
throw new DifferentialActionHasNoEffectException(
"You can not request changes to this revision because it has ".
"already been committed.");
"already been closed.");
default:
throw new Exception(
"Unexpected revision state '{$revision_status}'!");
@ -297,10 +297,10 @@ final class DifferentialCommentEditor {
throw new DifferentialActionHasNoEffectException(
"You can not plan changes to this revision because it has ".
"been abandoned.");
case ArcanistDifferentialRevisionStatus::COMMITTED:
case ArcanistDifferentialRevisionStatus::CLOSED:
throw new DifferentialActionHasNoEffectException(
"You can not plan changes to this revision because it has ".
"already been committed.");
"already been closed.");
default:
throw new Exception(
"Unexpected revision state '{$revision_status}'!");
@ -325,30 +325,30 @@ final class DifferentialCommentEditor {
->setStatus(ArcanistDifferentialRevisionStatus::NEEDS_REVIEW);
break;
case DifferentialAction::ACTION_COMMIT:
case DifferentialAction::ACTION_CLOSE:
// NOTE: The daemons can mark things committed from any state. We treat
// NOTE: The daemons can mark things closed from any state. We treat
// them as completely authoritative.
if (!$this->isDaemonWorkflow) {
if (!$actor_is_author) {
throw new Exception(
"You can not mark a revision you don't own as committed.");
"You can not mark a revision you don't own as closed.");
}
$status_committed = ArcanistDifferentialRevisionStatus::COMMITTED;
$status_closed = ArcanistDifferentialRevisionStatus::CLOSED;
$status_accepted = ArcanistDifferentialRevisionStatus::ACCEPTED;
if ($revision_status == $status_committed) {
if ($revision_status == $status_closed) {
throw new DifferentialActionHasNoEffectException(
"You can not mark this revision as committed because it has ".
"already been marked as committed.");
"You can not mark this revision as closed because it has ".
"already been marked as closed.");
}
if ($revision_status != $status_accepted) {
throw new DifferentialActionHasNoEffectException(
"You can not mark this revision as committed because it has ".
"not been accepted.");
"You can not mark this revision as closed because it is ".
"has not been accepted.");
}
}
@ -356,8 +356,7 @@ final class DifferentialCommentEditor {
$revision->setDateCommitted(time());
}
$revision
->setStatus(ArcanistDifferentialRevisionStatus::COMMITTED);
$revision->setStatus(ArcanistDifferentialRevisionStatus::CLOSED);
break;
case DifferentialAction::ACTION_ADDREVIEWERS:
@ -423,10 +422,10 @@ final class DifferentialCommentEditor {
}
switch ($revision_status) {
case ArcanistDifferentialRevisionStatus::COMMITTED:
case ArcanistDifferentialRevisionStatus::CLOSED:
throw new DifferentialActionHasNoEffectException(
"You can not commandeer this revision because it has ".
"already been committed.");
"already been closed.");
break;
}

View file

@ -388,12 +388,12 @@ final class DifferentialRevisionEditor {
$this->updateAffectedPathTable($revision, $diff, $changesets);
$this->updateRevisionHashTable($revision, $diff);
// An updated diff should require review, as long as it's not committed
// An updated diff should require review, as long as it's not closed
// or accepted. The "accepted" status is "sticky" to encourage courtesy
// re-diffs after someone accepts with minor changes/suggestions.
$status = $revision->getStatus();
if ($status != ArcanistDifferentialRevisionStatus::COMMITTED &&
if ($status != ArcanistDifferentialRevisionStatus::CLOSED &&
$status != ArcanistDifferentialRevisionStatus::ACCEPTED) {
$revision->setStatus(ArcanistDifferentialRevisionStatus::NEEDS_REVIEW);
}

View file

@ -55,14 +55,14 @@ final class DifferentialCommentMail extends DifferentialMail {
case DifferentialAction::ACTION_ADDCCS:
$tags[] = MetaMTANotificationType::TYPE_DIFFERENTIAL_CC;
break;
case DifferentialAction::ACTION_COMMIT:
$tags[] = MetaMTANotificationType::TYPE_DIFFERENTIAL_COMMITTED;
case DifferentialAction::ACTION_CLOSE:
$tags[] = MetaMTANotificationType::TYPE_DIFFERENTIAL_CLOSED;
break;
}
if (strlen(trim($comment->getContent()))) {
switch ($action) {
case DifferentialAction::ACTION_COMMIT:
case DifferentialAction::ACTION_CLOSE:
// Commit comments are auto-generated and not especially interesting,
// so don't tag them as having a comment.
break;
@ -179,7 +179,7 @@ final class DifferentialCommentMail extends DifferentialMail {
}
}
if ($status == ArcanistDifferentialRevisionStatus::COMMITTED) {
if ($status == ArcanistDifferentialRevisionStatus::CLOSED) {
$phids = $revision->loadCommitPHIDs();
if ($phids) {
$handles = id(new PhabricatorObjectHandleData($phids))->loadHandles();

View file

@ -38,7 +38,8 @@ final class DifferentialRevisionQuery {
const STATUS_ANY = 'status-any';
const STATUS_OPEN = 'status-open';
const STATUS_ACCEPTED = 'status-accepted';
const STATUS_COMMITTED = 'status-committed';
const STATUS_CLOSED = 'status-closed'; // NOTE: Same as 'committed'.
const STATUS_COMMITTED = 'status-committed'; // TODO: Remove.
const STATUS_ABANDONED = 'status-abandoned';
private $authors = array();
@ -681,11 +682,17 @@ final class DifferentialRevisionQuery {
));
break;
case self::STATUS_COMMITTED:
phlog(
"WARNING: DifferentialRevisionQuery using deprecated ".
"STATUS_COMMITTED constant. This will be removed soon. ".
"Use STATUS_CLOSED.");
// fallthrough
case self::STATUS_CLOSED:
$where[] = qsprintf(
$conn_r,
'status IN (%Ld)',
array(
ArcanistDifferentialRevisionStatus::COMMITTED,
ArcanistDifferentialRevisionStatus::CLOSED,
));
break;
case self::STATUS_ABANDONED:

View file

@ -16,6 +16,7 @@ phutil_require_module('phabricator', 'applications/differential/storage/revision
phutil_require_module('phabricator', 'storage/qsprintf');
phutil_require_module('phabricator', 'storage/queryfx');
phutil_require_module('phutil', 'error');
phutil_require_module('phutil', 'utils');

View file

@ -210,7 +210,7 @@ final class DifferentialRevision extends DifferentialDAO {
$reviewer = null;
if ($this->status == ArcanistDifferentialRevisionStatus::ACCEPTED ||
$this->status == ArcanistDifferentialRevisionStatus::COMMITTED) {
$this->status == ArcanistDifferentialRevisionStatus::CLOSED) {
$comments = $this->loadComments();
foreach ($comments as $comment) {
$action = $comment->getAction();

View file

@ -54,7 +54,7 @@ final class PhabricatorFeedStoryDifferential extends PhabricatorFeedStory {
$action = $data->getValue('action');
switch ($action) {
case DifferentialAction::ACTION_CREATE:
case DifferentialAction::ACTION_COMMIT:
case DifferentialAction::ACTION_CLOSE:
$full_size = true;
break;
default:

View file

@ -19,7 +19,7 @@
final class MetaMTANotificationType
extends MetaMTAConstants {
const TYPE_DIFFERENTIAL_COMMITTED = 'differential-committed';
const TYPE_DIFFERENTIAL_CLOSED = 'differential-committed';
const TYPE_DIFFERENTIAL_CC = 'differential-cc';
const TYPE_DIFFERENTIAL_COMMENT = 'differential-comment';

View file

@ -204,8 +204,8 @@ final class PhabricatorUserEmailPreferenceSettingsPanelController
return array(
MetaMTANotificationType::TYPE_DIFFERENTIAL_CC =>
"Send me email when a revision's CCs change.",
MetaMTANotificationType::TYPE_DIFFERENTIAL_COMMITTED =>
"Send me email when a revision is committed.",
MetaMTANotificationType::TYPE_DIFFERENTIAL_CLOSED =>
"Send me email when a revision is closed.",
MetaMTANotificationType::TYPE_MANIPHEST_PROJECTS =>
"Send me email when a task's associated projects change.",
MetaMTANotificationType::TYPE_MANIPHEST_PRIORITY =>
@ -230,7 +230,7 @@ final class PhabricatorUserEmailPreferenceSettingsPanelController
$this->getMailTags(),
array(
MetaMTANotificationType::TYPE_DIFFERENTIAL_CC,
MetaMTANotificationType::TYPE_DIFFERENTIAL_COMMITTED,
MetaMTANotificationType::TYPE_DIFFERENTIAL_CLOSED,
));
}

View file

@ -222,7 +222,7 @@ final class PhabricatorObjectHandleData {
$handle->setComplete(true);
$status = $rev->getStatus();
if (($status == ArcanistDifferentialRevisionStatus::COMMITTED) ||
if (($status == ArcanistDifferentialRevisionStatus::CLOSED) ||
($status == ArcanistDifferentialRevisionStatus::ABANDONED)) {
$closed = PhabricatorObjectHandleStatus::STATUS_CLOSED;
$handle->setStatus($closed);

View file

@ -42,7 +42,7 @@ class PhabricatorRepositoryDefaultCommitMessageDetailParser
// NOTE: We now accept ONLY full URIs because if we accept numeric IDs
// then anyone importing the Phabricator repository will have their
// first few thousand revisions marked committed. This does mean that
// first few thousand revisions marked closed. This does mean that
// some older revisions won't re-parse correctly, but that shouldn't
// really affect anyone. If necessary, an install can extend the parser
// and restore the older, more-liberal parsing fairly easily.

View file

@ -94,7 +94,7 @@ abstract class PhabricatorRepositoryCommitMessageParserWorker
$commit->getPHID());
if ($revision->getStatus() !=
ArcanistDifferentialRevisionStatus::COMMITTED) {
ArcanistDifferentialRevisionStatus::CLOSED) {
$date_committed = $this->getDateCommitted($commit);
if ($date_committed) {
@ -105,12 +105,12 @@ abstract class PhabricatorRepositoryCommitMessageParserWorker
$committer = $data->getCommitDetail('authorPHID');
if (!$committer) {
$committer = $revision->getAuthorPHID();
$message = 'Change committed by '.$data->getAuthorName().'.';
$message = 'Closed by '.$data->getAuthorName().'.';
}
$editor = new DifferentialCommentEditor(
$revision,
$committer,
DifferentialAction::ACTION_COMMIT);
DifferentialAction::ACTION_CLOSE);
$editor->setIsDaemonWorkflow(true);
$editor->setMessage($message)->save();
}
@ -127,7 +127,7 @@ abstract class PhabricatorRepositoryCommitMessageParserWorker
* This function identifies the "best" revision from such a set. Typically,
* there is only one revision found. Otherwise, we try to pick an accepted
* revision first, followed by an open revision, and otherwise we go with a
* committed or abandoned revision as a last resort.
* closed or abandoned revision as a last resort.
*/
private function identifyBestRevision(array $revisions) {
assert_instances_of($revisions, 'DifferentialRevision');
@ -153,7 +153,7 @@ abstract class PhabricatorRepositoryCommitMessageParserWorker
// default is a wtf? here
default:
case ArcanistDifferentialRevisionStatus::ABANDONED:
case ArcanistDifferentialRevisionStatus::COMMITTED:
case ArcanistDifferentialRevisionStatus::CLOSED:
$third_choice[] = $revision;
break;
}

View file

@ -43,7 +43,7 @@ final class PhabricatorSearchDifferentialIndexer
PhabricatorPHIDConstants::PHID_TYPE_USER,
$rev->getDateCreated());
if ($rev->getStatus() != ArcanistDifferentialRevisionStatus::COMMITTED &&
if ($rev->getStatus() != ArcanistDifferentialRevisionStatus::CLOSED &&
$rev->getStatus() != ArcanistDifferentialRevisionStatus::ABANDONED) {
$doc->addRelationship(
PhabricatorSearchRelationship::RELATIONSHIP_OPEN,
@ -81,7 +81,7 @@ final class PhabricatorSearchDifferentialIndexer
$rev->loadRelationships();
// If a revision needs review, the owners are the reviewers. Otherwise, the
// owner is the author (e.g., accepted, rejected, committed).
// owner is the author (e.g., accepted, rejected, closed).
if ($rev->getStatus() == ArcanistDifferentialRevisionStatus::NEEDS_REVIEW) {
foreach ($rev->getReviewers() as $phid) {
$doc->addRelationship(

View file

@ -266,7 +266,7 @@ You can also generate full-name references to some objects by using braces:
{T123} # Link to Maniphest task T123 with the full name
These references will also show when an object changes state (for instance, a
task is closed or a revision is committed).
task or revision is closed).
= Quoting Text =

View file

@ -143,7 +143,7 @@ final class PhabricatorIRCWhatsNewHandler extends PhabricatorIRCHandler {
return 'updated';
break;
case 'commit':
return 'committed';
return 'closed';
break;
case 'create':
return 'created';