Add helper for comparing a bundle of Change-related entities

Currently this just does a field-by-field comparison of all entities
rooted at a single change. Eventually it will understand the subtle
differences between ReviewDb and NoteDb (e.g. timestamp rounding), and
will be used for consistency checks before/after migration.

Change-Id: I8bd97bcee7a907bed2126aaf6f77bba993374884
This commit is contained in:
Dave Borowitz
2016-02-24 16:31:39 -05:00
parent 59da717398
commit b0cfc534c5
4 changed files with 734 additions and 15 deletions

View File

@@ -55,21 +55,6 @@ public final class PatchLineComment {
public void set(String newValue) {
uuid = newValue;
}
@Override
public String toString() {
StringBuilder builder = new StringBuilder();
builder.append("PatchLineComment.Key{");
builder.append("Change.Id=")
.append(getParentKey().getParentKey().getParentKey().get()).append(',');
builder.append("PatchSet.Id=")
.append(getParentKey().getParentKey().get()).append(',');
builder.append("filename=")
.append(getParentKey().getFileName()).append(',');
builder.append("uuid=").append(get());
builder.append("}");
return builder.toString();
}
}
public static final char STATUS_DRAFT = 'd';