Support ChangeUpdates from InternalUser
In a few codepaths, such as auto-abandoning open changes on deleted projects, we might have ChangeMessages with no Account.Id, indicating the message was written by the server. Support this in notedb by comparing the author and committer on the meta commit. Fail during parsing if we would need to store a null account anywhere other than the ChangeMessage. Change-Id: Ie3f087e5bd326747906a6d824f721ee97ab9f9c6
This commit is contained in:
@@ -234,7 +234,7 @@ public class ChangeDraftUpdate extends AbstractChangeUpdate {
|
||||
protected CommitBuilder applyImpl(ObjectInserter ins)
|
||||
throws OrmException, IOException {
|
||||
CommitBuilder cb = new CommitBuilder();
|
||||
cb.setAuthor(newIdent(getUser().getAccount(), when));
|
||||
cb.setAuthor(newAuthorIdent());
|
||||
cb.setCommitter(new PersonIdent(serverIdent, when));
|
||||
cb.setMessage("Update draft comments");
|
||||
AtomicBoolean removedAllComments = new AtomicBoolean();
|
||||
|
Reference in New Issue
Block a user