Load notes in ChangeUpdate.storeCommentsInNotes()

ChangeUpdate assumes the NoteMap in ChangeNotes is already
loaded. However, the ChangeNotes were never loaded, so the NoteMap
will always be empty. Therefore, we loaded the ChangeNotes.

Change-Id: Ibebb0d8c75dcac57178438b633e18447ec3cdb2e
This commit is contained in:
Yacob Yonas
2014-07-14 10:28:47 -07:00
committed by Shawn Pearce
parent 4b216ca643
commit 4a11e44a85

View File

@@ -205,7 +205,7 @@ public class ChangeUpdate extends AbstractChangeUpdate {
/** @return the tree id for the updated tree */
private ObjectId storeCommentsInNotes() throws OrmException, IOException {
ChangeNotes notes = ctl.getNotes();
ChangeNotes notes = ctl.getNotes().load();
NoteMap noteMap = notes.getNoteMap();
if (noteMap == null) {
noteMap = NoteMap.newEmptyMap();