Merge "Fetch parent groups of the authGroups" into stable-2.11
diff --git a/src/main/java/com/googlesource/gerrit/plugins/replication/PushOne.java b/src/main/java/com/googlesource/gerrit/plugins/replication/PushOne.java
index 36e3ecb..255c51b 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/replication/PushOne.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/replication/PushOne.java
@@ -372,7 +372,6 @@
PushResult res;
try {
res = pushVia(tn);
- updateHead();
} finally {
try {
tn.close();
@@ -546,11 +545,6 @@
cmds.add(new RemoteRefUpdate(git, (Ref) null, dst, force, null, null));
}
- private void updateHead() throws IOException {
- replicationQueue.updateHead(projectName, git.getRef(Constants.HEAD)
- .getTarget().getName());
- }
-
private void updateStates(Collection<RemoteRefUpdate> refUpdates)
throws LockFailureException {
Set<String> doneRefs = new HashSet<>();
diff --git a/src/main/java/com/googlesource/gerrit/plugins/replication/ReplicationQueue.java b/src/main/java/com/googlesource/gerrit/plugins/replication/ReplicationQueue.java
index c3b4675..95693d9 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/replication/ReplicationQueue.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/replication/ReplicationQueue.java
@@ -163,13 +163,9 @@
@Override
public void onHeadUpdated(HeadUpdatedListener.Event event) {
- updateHead(new Project.NameKey(event.getProjectName()),
- event.getNewHeadName());
- }
-
- void updateHead(Project.NameKey project, String newHeadName) {
- for (URIish uri : getURIs(project, FilterType.ALL)) {
- updateHead(uri, newHeadName);
+ for (URIish uri : getURIs(new Project.NameKey(event.getProjectName()),
+ FilterType.ALL)) {
+ updateHead(uri, event.getNewHeadName());
}
}