Merge branch 'stable-2.14'

* stable-2.14:
  Set reflog message and identity when merging change

Change-Id: Ia7c856fe081d674c886ae983d59ce89fc9a5fe9b
This commit is contained in:
David Pursehouse
2017-06-20 10:33:15 +09:00
2 changed files with 4 additions and 1 deletions

View File

@@ -204,7 +204,7 @@ public class MergeOpRepoManager implements AutoCloseable {
throws NoSuchProjectException, IOException {
List<BatchUpdate> updates = new ArrayList<>(projects.size());
for (Project.NameKey project : projects) {
updates.add(getRepo(project).getUpdate(batchUpdateFactory));
updates.add(getRepo(project).getUpdate(batchUpdateFactory).setRefLogMessage("merged"));
}
return updates;
}

View File

@@ -416,6 +416,9 @@ class ReviewDbBatchUpdate extends BatchUpdate {
batchRefUpdate.setRefLogMessage(refLogMessage, true);
batchRefUpdate.setAllowNonFastForwards(true);
repoView.getCommands().addTo(batchRefUpdate);
if (user.isIdentifiedUser()) {
batchRefUpdate.setRefLogIdent(user.asIdentifiedUser().newRefLogIdent(when, tz));
}
logDebug("Executing batch of {} ref updates", batchRefUpdate.getCommands().size());
if (dryrun) {
return;