From 0d74afe18607fd1ce6a71ee4bd6b9e8126963b11 Mon Sep 17 00:00:00 2001 From: Janice Agustin Date: Fri, 15 May 2015 10:17:08 -0400 Subject: [PATCH] Use full name for refName RefUpdateAttribute RefUpdated events have an attribute called refName. EventFactory would create this attribute using the short name, which is inconsistent since all other events use full ref names. Create the event with the full ref name. Change-Id: I45dc114f48b801d0e5c9877c30e0526b8ecb8adb --- Documentation/json.txt | 2 +- .../main/java/com/google/gerrit/server/events/EventFactory.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/json.txt b/Documentation/json.txt index feef1a1f74..8ccd03b88a 100644 --- a/Documentation/json.txt +++ b/Documentation/json.txt @@ -156,7 +156,7 @@ oldRev:: The old value of the ref, prior to the update. newRev:: The new value the ref was updated to. -refName:: Ref name within project. +refName:: Full ref name within project. project:: Project path in Gerrit. diff --git a/gerrit-server/src/main/java/com/google/gerrit/server/events/EventFactory.java b/gerrit-server/src/main/java/com/google/gerrit/server/events/EventFactory.java index f0c0bc1d58..4a61e3e1aa 100644 --- a/gerrit-server/src/main/java/com/google/gerrit/server/events/EventFactory.java +++ b/gerrit-server/src/main/java/com/google/gerrit/server/events/EventFactory.java @@ -151,7 +151,7 @@ public class EventFactory { ru.newRev = newId != null ? newId.getName() : ObjectId.zeroId().getName(); ru.oldRev = oldId != null ? oldId.getName() : ObjectId.zeroId().getName(); ru.project = refName.getParentKey().get(); - ru.refName = refName.getShortName(); + ru.refName = refName.get(); return ru; }