commit 0299ab131bfa8365f6e583d4fae9976cf045742c Author: Ivan Frade Date: Thu Oct 1 16:40:38 2020 -0700 BatchUpdate: getter for the Project.NameKey SubmissionListener implementors receive BatchUpdates but also need to know what repository is the BatchUpdate modifying. We could expose directly Repository or RepoView, but that breaks the encapsulation of BatchUpdate. Offer instead the Project.NameKey. Callers can open the repository if they need more information. Change-Id: If8a9a7b01ae8ab22bc8da82200f28d462e1068e7 diff --git a/java/com/google/gerrit/server/update/BatchUpdate.java b/java/com/google/gerrit/server/update/BatchUpdate.java index 9f696df..7fdf833 100644 --- a/java/com/google/gerrit/server/update/BatchUpdate.java +++ b/java/com/google/gerrit/server/update/BatchUpdate.java @@ -467,6 +467,10 @@ public class BatchUpdate implements AutoCloseable { return this; } + public Project.NameKey getProject() { + return project; + } + private void initRepository() throws IOException { if (repoView == null) { repoView = new RepoView(repoManager, project);