ChangeSet: No longer be an AutoValue

Originally this class was designed as to be an AutoValue such that it
can be hashed and used for identification in the MergeQueue. The MergeQueue
is gone and we do not need to have the hashing in ChangeSet any more.

We rather want to carry the set of changes around, such that we do not
need to reconstruct the changes again and again. So this commit ought to
be a performance improvement.

Change-Id: I8b2a683d6f02e9cef1cd41b23e351f5384a4480d
This commit is contained in:
Stefan Beller
2015-08-24 14:28:39 -07:00
committed by Shawn Pearce
parent 3b2aa8aace
commit 53167f8095
8 changed files with 138 additions and 115 deletions

View File

@@ -60,8 +60,8 @@ public class SubmittedTogether implements RestReadView<ChangeResource> {
ResourceConflictException, Exception {
try {
ChangeSet cs = mergeSuperSet.completeChangeSet(dbProvider.get(),
ChangeSet.create(resource.getChange()));
if (cs.ids().size() > 1) {
resource.getChange());
if (cs.size() > 1) {
return json.create(EnumSet.of(
ListChangesOption.CURRENT_REVISION,
ListChangesOption.CURRENT_COMMIT))