From ba2963ecb3bb52b59cbf4be6faaa0bbe90c6ea51 Mon Sep 17 00:00:00 2001 From: Bob Trahan Date: Fri, 17 Oct 2014 09:41:27 -0700 Subject: [PATCH] Diffusion - fix commits not importing fully Summary: Fixes T6336. Turns out that the function to update the import status updates that database and doesn't update the object. If the object doesn't get the pertinent update AND there's a herald rule that runs, then the object is later re-saved without ever getting the update flag. Test Plan: logic in the ole sandbox and going to push it to prod and run re-parse on impacted commits Reviewers: epriestley Reviewed By: epriestley Subscribers: Korvin, epriestley, chad Maniphest Tasks: T6336 Differential Revision: https://secure.phabricator.com/D10723 --- src/applications/audit/editor/PhabricatorAuditEditor.php | 7 ++++++- .../repository/storage/PhabricatorRepositoryCommit.php | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/applications/audit/editor/PhabricatorAuditEditor.php b/src/applications/audit/editor/PhabricatorAuditEditor.php index 825f56cae6..95656d7202 100644 --- a/src/applications/audit/editor/PhabricatorAuditEditor.php +++ b/src/applications/audit/editor/PhabricatorAuditEditor.php @@ -22,7 +22,12 @@ final class PhabricatorAuditEditor if (isset($this->auditReasonMap[$phid])) { return $this->auditReasonMap[$phid]; } - return array('Added by '.$this->getActor()->getUsername().'.'); + if ($this->getIsHeraldEditor()) { + $name = 'herald'; + } else { + $name = $this->getActor()->getUsername(); + } + return array('Added by '.$name.'.'); } public function setRawPatch($patch) { diff --git a/src/applications/repository/storage/PhabricatorRepositoryCommit.php b/src/applications/repository/storage/PhabricatorRepositoryCommit.php index 159177c8e9..eab247497f 100644 --- a/src/applications/repository/storage/PhabricatorRepositoryCommit.php +++ b/src/applications/repository/storage/PhabricatorRepositoryCommit.php @@ -59,6 +59,7 @@ final class PhabricatorRepositoryCommit $this->getTableName(), $flag, $this->getID()); + $this->setImportStatus($this->getImportStatus() | $flag); return $this; }