Merge branch 'stable-3.2'

* stable-3.2:
  Receive: Only attempt to create UpdateGroupsRequest for patch-set refs
  Upgrade auto-value to 1.7.3

Change-Id: I266533f4dddc5eac124300145fafbf063310163d
This commit is contained in:
David Pursehouse
2020-06-24 09:40:34 +09:00
2 changed files with 9 additions and 8 deletions

View File

@@ -650,18 +650,18 @@ maven_jar(
sha1 = "a3ae34e57fa8a4040e28247291d0cc3d6b8c7bcf", sha1 = "a3ae34e57fa8a4040e28247291d0cc3d6b8c7bcf",
) )
AUTO_VALUE_VERSION = "1.7.2" AUTO_VALUE_VERSION = "1.7.3"
maven_jar( maven_jar(
name = "auto-value", name = "auto-value",
artifact = "com.google.auto.value:auto-value:" + AUTO_VALUE_VERSION, artifact = "com.google.auto.value:auto-value:" + AUTO_VALUE_VERSION,
sha1 = "895dbc8f1764f162c1dae34cc29e300220d6d4ba", sha1 = "cbd30873f839545c7c9264bed61d500bf85bd33e",
) )
maven_jar( maven_jar(
name = "auto-value-annotations", name = "auto-value-annotations",
artifact = "com.google.auto.value:auto-value-annotations:" + AUTO_VALUE_VERSION, artifact = "com.google.auto.value:auto-value-annotations:" + AUTO_VALUE_VERSION,
sha1 = "7eec707327ec1663b9387c8671efb6808750e039", sha1 = "59ce5ee6aea918f674229f1147da95fdf7f31ce6",
) )
declare_nongoogle_deps() declare_nongoogle_deps()

View File

@@ -2144,9 +2144,10 @@ class ReceiveCommits {
// A's group. // A's group.
// C) Commit is a PatchSet of a pre-existing change uploaded with a // C) Commit is a PatchSet of a pre-existing change uploaded with a
// different target branch. // different target branch.
for (Ref ref : existingRefs) { existingRefs.stream()
updateGroups.add(new UpdateGroupsRequest(ref, c)); .map(r -> PatchSet.Id.fromRef(r.getName()))
} .filter(Objects::nonNull)
.forEach(i -> updateGroups.add(new UpdateGroupsRequest(i, c)));
if (!(newChangeForAllNotInTarget || magicBranch.base != null)) { if (!(newChangeForAllNotInTarget || magicBranch.base != null)) {
continue; continue;
} }
@@ -3019,8 +3020,8 @@ class ReceiveCommits {
final RevCommit commit; final RevCommit commit;
List<String> groups = ImmutableList.of(); List<String> groups = ImmutableList.of();
UpdateGroupsRequest(Ref ref, RevCommit commit) { UpdateGroupsRequest(PatchSet.Id psId, RevCommit commit) {
this.psId = requireNonNull(PatchSet.Id.fromRef(ref.getName())); this.psId = psId;
this.commit = commit; this.commit = commit;
} }