Remove nbrPatchSets from Change

The nbrPatchSets counter was used to generate the next PatchSetId.
Instead, find the first reference after the currentPatchSetId() that
does not exist by examining the references themselves.

Also in a few locations, the use of currPatchSetId() was corrected
to be currentPatchSetId().

Change-Id: I06bcf52798f1dad1ea602f914784dfcbc7d97086
This commit is contained in:
Colby Ranger
2012-11-28 16:43:18 -08:00
committed by Shawn Pearce
parent c3657e0b10
commit fcdd5c9fc9
8 changed files with 48 additions and 86 deletions

View File

@@ -50,7 +50,7 @@ public class ChangeInfo {
lastUpdatedOn = c.getLastUpdatedOn();
sortKey = c.getSortKey();
patchSetId = patchId;
latest = patchSetId == null || c.currPatchSetId().equals(patchSetId);
latest = patchSetId == null || patchSetId.equals(c.currentPatchSetId());
}
public ChangeInfo(final Change c) {