Fix reply to comment on left side
When replying to a comment on the left side and the left side is showing the base gerrit presented a server error: Parent comment must be on same side This was caused by the file being initialized to '1', meaning the comment should be on the right side, which is incorrect. If the base is used on the left side we need the comment to be on side '0'. Bug: GERRIT-282 (issue 281) Change-Id: I917022b08a9d8b00173f34d6e9c1e9897c695bd2 Signed-off-by: Shawn O. Pearce <sop@google.com>
This commit is contained in:
@@ -254,7 +254,9 @@ public abstract class AbstractPatchContentTable extends NavigationTable<Object>
|
||||
final String uuid = c.getKey().get();
|
||||
final PatchSet.Id psId = c.getKey().getParentKey().getParentKey();
|
||||
final short file;
|
||||
if (idSideB.equals(psId)) {
|
||||
if (idSideA == null) {
|
||||
file = c.getSide();
|
||||
} else if (idSideB.equals(psId)) {
|
||||
file = 1;
|
||||
} else {
|
||||
file = 0;
|
||||
|
||||
Reference in New Issue
Block a user