From 62b3e4aea355c1361e20e3bac68871d78d17d465 Mon Sep 17 00:00:00 2001 From: Nick Harper Date: Fri, 10 Aug 2012 16:15:37 -0700 Subject: [PATCH] Remove a check for closing revisions Summary: I ran into a case where a commit isn't "new" but hasn't been closed. I think the check on the status of the differential revision should be enough and this check isn't needed. Test Plan: used the reparse.php script to close a revision that previously wouldn't close. Reviewers: epriestley, vrana Reviewed By: vrana CC: aran, Korvin Differential Revision: https://secure.phabricator.com/D3232 --- .../PhabricatorRepositoryCommitMessageParserWorker.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/applications/repository/worker/commitmessageparser/PhabricatorRepositoryCommitMessageParserWorker.php b/src/applications/repository/worker/commitmessageparser/PhabricatorRepositoryCommitMessageParserWorker.php index 27eb70a93c..1ed4eab633 100644 --- a/src/applications/repository/worker/commitmessageparser/PhabricatorRepositoryCommitMessageParserWorker.php +++ b/src/applications/repository/worker/commitmessageparser/PhabricatorRepositoryCommitMessageParserWorker.php @@ -106,7 +106,6 @@ abstract class PhabricatorRepositoryCommitMessageParserWorker DifferentialRevision::TABLE_COMMIT, $revision->getID(), $commit->getPHID()); - $commit_is_new = $conn_w->getAffectedRows(); $committer_phid = $data->getCommitDetail('committerPHID'); if ($committer_phid) { @@ -142,8 +141,7 @@ abstract class PhabricatorRepositoryCommitMessageParserWorker $revision->getAuthorPHID()); $status_closed = ArcanistDifferentialRevisionStatus::CLOSED; - $should_close = $commit_is_new && - ($revision->getStatus() != $status_closed) && + $should_close = ($revision->getStatus() != $status_closed) && $repository->shouldAutocloseCommit($commit, $data); if ($should_close) {