Store topic of a change in Notedb

This adds a 'Topic' footer to  the commit messages of the
refs/changes/XX/YYYY/meta notes branch when the topic changes.

Similar as for hashtags we cannot rebuild the history for topic
changes since the database only stores the current topic.

Change-Id: I5ca2c1ed6326ba03dfbee21f1a7d2328b73ad322
Signed-off-by: Edwin Kempin <ekempin@google.com>
This commit is contained in:
Edwin Kempin
2015-10-21 18:16:14 +02:00
parent 232c18da1b
commit aa0a3f93a0
9 changed files with 105 additions and 2 deletions

View File

@@ -250,6 +250,7 @@ public class ChangeInserter extends BatchUpdate.InsertChangeOp {
}
db.patchSets().insert(Collections.singleton(patchSet));
db.changes().insert(Collections.singleton(change));
update.setTopic(change.getTopic());
LabelTypes labelTypes = ctl.getProjectControl().getLabelTypes();
approvalsUtil.addReviewers(db, update, labelTypes, change,
patchSet, patchSetInfo, reviewers, Collections.<Account.Id> emptySet());