Port comments through time and space in the common/best case
Summary:
Ref T7447. This ports comments forward and backward in the best case:
- The old comment is on a changeset with the same filename.
- The old and new files are pretty much the same, line-for-line.
This will fail to port a lot of comments around and probably port a lot of comments into goofy places. We can see how bad it is in practice.
Errata:
- Design is me cobbling something together, probably worth tweaking.
- "Old Comment" should, at a minimum, say "Newer Comment" sometimes, or we should come up with some better name for this stuff.
Test Plan: {F377214}
Reviewers: chad, btrahan
Reviewed By: btrahan
Subscribers: johnny-bit, yelirekim, epriestley
Maniphest Tasks: T7447
Differential Revision: https://secure.phabricator.com/D12484
This commit is contained in:
@@ -13,7 +13,6 @@ final class DifferentialInlineCommentQuery
|
||||
private $phids;
|
||||
private $drafts;
|
||||
private $authorPHIDs;
|
||||
private $changesetIDs;
|
||||
private $revisionPHIDs;
|
||||
private $deletedDrafts;
|
||||
|
||||
@@ -46,11 +45,6 @@ final class DifferentialInlineCommentQuery
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function withChangesetIDs(array $ids) {
|
||||
$this->changesetIDs = $ids;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function withRevisionPHIDs(array $revision_phids) {
|
||||
$this->revisionPHIDs = $revision_phids;
|
||||
return $this;
|
||||
@@ -116,13 +110,6 @@ final class DifferentialInlineCommentQuery
|
||||
$this->revisionPHIDs);
|
||||
}
|
||||
|
||||
if ($this->changesetIDs !== null) {
|
||||
$where[] = qsprintf(
|
||||
$conn_r,
|
||||
'changesetID IN (%Ld)',
|
||||
$this->changesetIDs);
|
||||
}
|
||||
|
||||
if ($this->drafts === null) {
|
||||
if ($this->deletedDrafts) {
|
||||
$where[] = qsprintf(
|
||||
|
||||
Reference in New Issue
Block a user