From 6e6c5cd072879e5ddad553f54f453b5e5049b456 Mon Sep 17 00:00:00 2001 From: Zalan Blenessy Date: Wed, 20 May 2015 11:27:26 +0200 Subject: [PATCH 1/3] Fixed regression caused by the defaultValue feature [1] added support for selecting default values for labels. Unfortunately it also broke the ability to remove labels as described in [2], more precisely by: "To remove a label in a child project, add an empty label with the same name as in the parent." This fix make it possible to push empty labels in project.config to refs/meta/config again. Without it, the following error is returned by gerrit: 'project.config: Invalid defaultValue "0" for label ...' [1] https://gerrit-review.googlesource.com/#/c/55750/ [2] https://gerrit-review.googlesource.com/Documentation/config-labels.html#label_custom Change-Id: Icd727f64cb7a904957a2acc5143fe801653cfabe --- .../google/gerrit/server/git/ProjectConfig.java | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/gerrit-server/src/main/java/com/google/gerrit/server/git/ProjectConfig.java b/gerrit-server/src/main/java/com/google/gerrit/server/git/ProjectConfig.java index a905385772..351394249c 100644 --- a/gerrit-server/src/main/java/com/google/gerrit/server/git/ProjectConfig.java +++ b/gerrit-server/src/main/java/com/google/gerrit/server/git/ProjectConfig.java @@ -684,13 +684,15 @@ public class ProjectConfig extends VersionedMetaData { label.setFunctionName(null); } - short dv = (short) rc.getInt(LABEL, name, KEY_DEFAULT_VALUE, 0); - if (isInRange(dv, values)) { - label.setDefaultValue(dv); - } else { - error(new ValidationError(PROJECT_CONFIG, String.format( - "Invalid %s \"%s\" for label \"%s\"", - KEY_DEFAULT_VALUE, dv, name))); + if (!values.isEmpty()) { + short dv = (short) rc.getInt(LABEL, name, KEY_DEFAULT_VALUE, 0); + if (isInRange(dv, values)) { + label.setDefaultValue(dv); + } else { + error(new ValidationError(PROJECT_CONFIG, String.format( + "Invalid %s \"%s\" for label \"%s\"", + KEY_DEFAULT_VALUE, dv, name))); + } } label.setCopyMinScore( rc.getBoolean(LABEL, name, KEY_COPY_MIN_SCORE, false)); From 6ee21487042ea711b5091f11df9045d8ca0505c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sa=C5=A1a=20=C5=BDivkov?= Date: Wed, 10 Jun 2015 16:08:18 +0200 Subject: [PATCH 2/3] Release notes for 2.10.5 Change-Id: I3b78cd335a2766cb710c5a2fbfebcad734f391b5 --- ReleaseNotes/ReleaseNotes-2.10.5.txt | 27 +++++++++++++++++++++++++++ ReleaseNotes/index.txt | 1 + 2 files changed, 28 insertions(+) create mode 100644 ReleaseNotes/ReleaseNotes-2.10.5.txt diff --git a/ReleaseNotes/ReleaseNotes-2.10.5.txt b/ReleaseNotes/ReleaseNotes-2.10.5.txt new file mode 100644 index 0000000000..eb48c31de3 --- /dev/null +++ b/ReleaseNotes/ReleaseNotes-2.10.5.txt @@ -0,0 +1,27 @@ +Release notes for Gerrit 2.10.5 +=============================== + +There are no schema changes from link:ReleaseNotes-2.10.4.html[2.10.4]. + +Download: +link:https://gerrit-releases.storage.googleapis.com/gerrit-2.10.5.war[ +https://gerrit-releases.storage.googleapis.com/gerrit-2.10.5.war] + +Bug Fixes +--------- + +* Update JGit to include a memory leak fix as discussed +link:https://groups.google.com/forum/#!topic/repo-discuss/RRQT_xCqz4o[here] + +* Attempt to fix the "Cannot read project" issue in Gerrit, as discussed +link:https://groups.google.com/forum/\#!topic/repo-discuss/ZeGWPyyJlrM[here] +and +link:https://groups.google.com/forum/#!topic/repo-discuss/CYYoHfDxCfA[here] + +* Fixed a regression caused by the defaultValue feature which broke the ability +to remove labels in subprojects + +Updates +------- + +* Update JGit to v4.0.0.201506090130-r diff --git a/ReleaseNotes/index.txt b/ReleaseNotes/index.txt index 3c167c6b61..2f741b6eb2 100644 --- a/ReleaseNotes/index.txt +++ b/ReleaseNotes/index.txt @@ -4,6 +4,7 @@ Gerrit Code Review - Release Notes [[2_10]] Version 2.10.x -------------- +* link:ReleaseNotes-2.10.5.html[2.10.5] * link:ReleaseNotes-2.10.4.html[2.10.4] * link:ReleaseNotes-2.10.3.1.html[2.10.3.1] * link:ReleaseNotes-2.10.3.html[2.10.3] From 0ffc46d87ea7d49c4e72423de0f28c08862af71b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sa=C5=A1a=20=C5=BDivkov?= Date: Thu, 11 Jun 2015 15:20:35 +0200 Subject: [PATCH 3/3] Update version to 2.10.5 --- VERSION | 2 +- gerrit-extension-api/pom.xml | 2 +- gerrit-plugin-api/pom.xml | 2 +- gerrit-plugin-archetype/pom.xml | 2 +- gerrit-plugin-gwt-archetype/pom.xml | 2 +- gerrit-plugin-gwtui/pom.xml | 2 +- gerrit-plugin-js-archetype/pom.xml | 2 +- gerrit-war/pom.xml | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/VERSION b/VERSION index d8eecf5386..7770ba723c 100644 --- a/VERSION +++ b/VERSION @@ -2,4 +2,4 @@ # Used by :api_install and :api_deploy targets # when talking to the destination repository. # -GERRIT_VERSION = '2.10.4' +GERRIT_VERSION = '2.10.5' diff --git a/gerrit-extension-api/pom.xml b/gerrit-extension-api/pom.xml index 62a5e47702..408e2b0289 100644 --- a/gerrit-extension-api/pom.xml +++ b/gerrit-extension-api/pom.xml @@ -2,7 +2,7 @@ 4.0.0 com.google.gerrit gerrit-extension-api - 2.10.4 + 2.10.5 jar Gerrit Code Review - Extension API API for Gerrit Extensions diff --git a/gerrit-plugin-api/pom.xml b/gerrit-plugin-api/pom.xml index c4366bd474..c68423465a 100644 --- a/gerrit-plugin-api/pom.xml +++ b/gerrit-plugin-api/pom.xml @@ -2,7 +2,7 @@ 4.0.0 com.google.gerrit gerrit-plugin-api - 2.10.4 + 2.10.5 jar Gerrit Code Review - Plugin API API for Gerrit Plugins diff --git a/gerrit-plugin-archetype/pom.xml b/gerrit-plugin-archetype/pom.xml index f1f9d07445..f62a0dd91e 100644 --- a/gerrit-plugin-archetype/pom.xml +++ b/gerrit-plugin-archetype/pom.xml @@ -20,7 +20,7 @@ limitations under the License. com.google.gerrit gerrit-plugin-archetype - 2.10.4 + 2.10.5 Gerrit Code Review - Plugin Archetype Maven Archetype for Gerrit Plugins http://code.google.com/p/gerrit/ diff --git a/gerrit-plugin-gwt-archetype/pom.xml b/gerrit-plugin-gwt-archetype/pom.xml index 899937c266..cdfd0da490 100644 --- a/gerrit-plugin-gwt-archetype/pom.xml +++ b/gerrit-plugin-gwt-archetype/pom.xml @@ -20,7 +20,7 @@ limitations under the License. com.google.gerrit gerrit-plugin-gwt-archetype - 2.10.4 + 2.10.5 Gerrit Code Review - Web UI GWT Plugin Archetype Maven Archetype for Gerrit Web UI GWT Plugins http://code.google.com/p/gerrit/ diff --git a/gerrit-plugin-gwtui/pom.xml b/gerrit-plugin-gwtui/pom.xml index e44b76f89c..170985fc4d 100644 --- a/gerrit-plugin-gwtui/pom.xml +++ b/gerrit-plugin-gwtui/pom.xml @@ -2,7 +2,7 @@ 4.0.0 com.google.gerrit gerrit-plugin-gwtui - 2.10.4 + 2.10.5 jar Gerrit Code Review - Plugin GWT UI Common Classes for Gerrit GWT UI Plugins diff --git a/gerrit-plugin-js-archetype/pom.xml b/gerrit-plugin-js-archetype/pom.xml index d5ded80bb2..fd7611afe1 100644 --- a/gerrit-plugin-js-archetype/pom.xml +++ b/gerrit-plugin-js-archetype/pom.xml @@ -20,7 +20,7 @@ limitations under the License. com.google.gerrit gerrit-plugin-js-archetype - 2.10.4 + 2.10.5 Gerrit Code Review - Web UI JavaScript Plugin Archetype Maven Archetype for Gerrit Web UI JavaScript Plugins http://code.google.com/p/gerrit/ diff --git a/gerrit-war/pom.xml b/gerrit-war/pom.xml index ec0d5eb740..39240f1935 100644 --- a/gerrit-war/pom.xml +++ b/gerrit-war/pom.xml @@ -2,7 +2,7 @@ 4.0.0 com.google.gerrit gerrit-war - 2.10.4 + 2.10.5 war Gerrit Code Review - WAR Gerrit WAR