stream-events: fix change subject in patchset-created event

If a new patch set is uploaded for an existing change that changes the
subject of the change, then the patchset-created event that is sent
for the stream-events command does not contain the new change subject,
but the subject as it was before the upload of the new patch set.

With this change the new change subject is now properly returned.

Change-Id: I0835fd881d2f043f5609eadd52693cbb28dc5126
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
This commit is contained in:
Edwin Kempin
2011-09-08 11:44:10 +02:00
parent 813123b520
commit 4450825ecc

View File

@@ -1192,9 +1192,11 @@ public class ReceiveCommits implements PreReceiveHook, PostReceiveHook {
final Ref mergedInto = findMergedInto(change.getDest().get(), c);
result.mergedIntoRef = mergedInto != null ? mergedInto.getName() : null;
}
final PatchSetInfo info = patchSetInfoFactory.get(c, ps.getId());
change.setCurrentPatchSet(info);
result.change = change;
result.patchSet = ps;
result.info = patchSetInfoFactory.get(c, ps.getId());
result.info = info;
final Account.Id authorId =
result.info.getAuthor() != null ? result.info.getAuthor().getAccount()