mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-10 00:42:41 +01:00
Use transactions in saving comment
Summary: We had a real issue where revision was marked as accepted but the comment wasn't saved. Test Plan: Reclaim abandoned revision. Reviewers: epriestley Reviewed By: epriestley CC: jungejason, aran, Koolvin Differential Revision: https://secure.phabricator.com/D2463
This commit is contained in:
parent
820a6d407a
commit
d85425e654
1 changed files with 5 additions and 0 deletions
|
@ -452,6 +452,9 @@ final class DifferentialCommentEditor {
|
|||
$revision->setLastReviewerPHID($actor_phid);
|
||||
}
|
||||
|
||||
// TODO: Call beginReadLocking() prior to loading the revision.
|
||||
$revision->openTransaction();
|
||||
|
||||
// Always save the revision (even if we didn't actually change any of its
|
||||
// properties) so that it jumps to the top of the revision list when sorted
|
||||
// by "updated". Notably, this allows "ping" comments to push it to the
|
||||
|
@ -522,6 +525,8 @@ final class DifferentialCommentEditor {
|
|||
}
|
||||
}
|
||||
|
||||
$revision->saveTransaction();
|
||||
|
||||
$phids = array($this->actorPHID);
|
||||
$handles = id(new PhabricatorObjectHandleData($phids))
|
||||
->loadHandles();
|
||||
|
|
Loading…
Reference in a new issue