ReplaceOp: Add more precise change kind messages

Using "Patch Set N was rebased" misleads the reader into thinking the
kind is TRIVIAL_REBASE, even though this message was previously used for
other types as well.

Change-Id: If4526c6ffae7d45b3ae16df9dc90bb4245906598
This commit is contained in:
Dave Borowitz
2018-02-06 10:57:21 -05:00
parent 804082c5ae
commit 0211869220

View File

@@ -377,9 +377,17 @@ public class ReplaceOp implements BatchUpdateOp {
private String changeKindMessage(ChangeKind changeKind) {
switch (changeKind) {
case MERGE_FIRST_PARENT_UPDATE:
return ": New merge patch set was added with a new first parent relative to Patch Set "
+ priorPatchSetId.get()
+ ".";
case TRIVIAL_REBASE:
case NO_CHANGE:
return ": Patch Set " + priorPatchSetId.get() + " was rebased.";
case NO_CHANGE:
return ": New patch set was added with same tree, parent"
+ (commit.getParentCount() != 1 ? "s" : "")
+ ", and commit message as Patch Set "
+ priorPatchSetId.get()
+ ".";
case NO_CODE_CHANGE:
return ": Commit message was updated.";
case REWORK: