Show whether a related change is merged or old.

Include a colored circle at the end of the related change line to
indicate the state. Use a black circle when the change is a link to
gitweb and a orange circle when the link to the change is not the
current patch set. Expose the current_revision_number on the
ChangeAndCommit object.

Change-Id: I5c629ecac61a4b9c6fc709f328a290313e3d6093
This commit is contained in:
Colby Ranger
2013-12-12 15:25:11 -08:00
parent fbd91eaf7a
commit c818dc46b0
5 changed files with 36 additions and 1 deletions

View File

@@ -287,12 +287,15 @@ public class GetRelated implements RestReadView<RevisionResource> {
CommitInfo commit;
Integer _changeNumber;
Integer _revisionNumber;
Integer _currentRevisionNumber;
ChangeAndCommit(@Nullable Change change, @Nullable PatchSet ps, RevCommit c) {
if (change != null) {
changeId = change.getKey().get();
_changeNumber = change.getChangeId();
_revisionNumber = ps != null ? ps.getPatchSetId() : null;
PatchSet.Id curr = change.currentPatchSetId();
_currentRevisionNumber = curr != null ? curr.get() : null;
}
commit = new CommitInfo();