Page MenuHomePhabricator

D15458.id37255.diff
No OneTemporary

D15458.id37255.diff

diff --git a/src/infrastructure/diff/PhabricatorInlineCommentController.php b/src/infrastructure/diff/PhabricatorInlineCommentController.php
--- a/src/infrastructure/diff/PhabricatorInlineCommentController.php
+++ b/src/infrastructure/diff/PhabricatorInlineCommentController.php
@@ -305,13 +305,18 @@
pht('Failed to load comment "%s".', $reply_phid));
}
- // NOTE: It's fine to reply to a comment from a different changeset, so
- // the reply comment may not appear on the same changeset that the new
- // comment appears on. This is expected in the case of ghost comments.
- // We currently put the new comment on the visible changeset, not the
- // original comment's changeset.
-
+ // When replying, force the new comment into the same location as the
+ // old comment. If we don't do this, replying to a ghost comment from
+ // diff A while viewing diff B can end up placing the two comments in
+ // different places while viewing diff C, because the porting algorithm
+ // makes a different decision. Forcing the comments to bind to the same
+ // place makes sure they stick together no matter which diff is being
+ // viewed. See T10562 for discussion.
+
+ $this->changesetID = $reply_comment->getChangesetID();
$this->isNewFile = $reply_comment->getIsNewFile();
+ $this->lineNumber = $reply_comment->getLineNumber();
+ $this->lineLength = $reply_comment->getLineLength();
}
}

File Metadata

Mime Type
text/plain
Expires
Fri, Sep 20, 9:25 AM (14 h, 15 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6623173
Default Alt Text
D15458.id37255.diff (1 KB)

Event Timeline