Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15382496
D15458.id37255.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D15458.id37255.diff
View Options
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
Details
Attached
Mime Type
text/plain
Expires
Sat, Mar 15, 12:42 PM (1 w, 18 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7693389
Default Alt Text
D15458.id37255.diff (1 KB)
Attached To
Mode
D15458: When replying to a ghost comment, attach the reply to the same place
Attached
Detach File
Event Timeline
Log In to Comment