Create change ref from ChangeInserter

Reduce some duplicated code. However, there are still a few special
snowflakes, so leave a flag to turn this off:
 - ReceiveCommits manages its own BatchRefUpdate. (It also doesn't
   even use PatchSetInserter for the new patch set case.)
 - ReviewProjectAccess updates the ref using VersionedMetaData, which
   I'm not going to touch for now.

Change-Id: I6f4f9fb8a6364627a737698d1001ad29ce8a981a
This commit is contained in:
Dave Borowitz
2015-10-08 13:26:37 -04:00
parent fd22122b25
commit 9f22f40286
6 changed files with 37 additions and 63 deletions

View File

@@ -1766,6 +1766,7 @@ public class ReceiveCommits {
.setMessage("Uploaded patch set " + ps.getPatchSetId() + ".")
.setRequestScopePropagator(requestScopePropagator)
.setSendMail(true)
.setUpdateRef(false)
.insert();
created = true;