From 6e6c5cd072879e5ddad553f54f453b5e5049b456 Mon Sep 17 00:00:00 2001 From: Zalan Blenessy Date: Wed, 20 May 2015 11:27:26 +0200 Subject: [PATCH 1/8] 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 8d73b76bd911652170578196b2e695b507faea3e Mon Sep 17 00:00:00 2001 From: Dave Borowitz Date: Fri, 5 Jun 2015 12:40:51 -0700 Subject: [PATCH 2/8] ChangeKindCacheImpl: Assume REWORK if we hit LargeObjectException Change-Id: I0fd752fdc7e2c35987a94afe83fc524c240d20db (cherry picked from commit 75f39623296d6efdffb5adf4b948ed8574651586) --- .../gerrit/server/change/ChangeKindCacheImpl.java | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/gerrit-server/src/main/java/com/google/gerrit/server/change/ChangeKindCacheImpl.java b/gerrit-server/src/main/java/com/google/gerrit/server/change/ChangeKindCacheImpl.java index 23039aa486..a2b78aaebc 100644 --- a/gerrit-server/src/main/java/com/google/gerrit/server/change/ChangeKindCacheImpl.java +++ b/gerrit-server/src/main/java/com/google/gerrit/server/change/ChangeKindCacheImpl.java @@ -38,6 +38,7 @@ import com.google.inject.Module; import com.google.inject.Singleton; import com.google.inject.name.Named; +import org.eclipse.jgit.errors.LargeObjectException; import org.eclipse.jgit.lib.Config; import org.eclipse.jgit.lib.ObjectId; import org.eclipse.jgit.lib.Repository; @@ -218,12 +219,16 @@ public class ChangeKindCacheImpl implements ChangeKindCache { ThreeWayMerger merger = MergeUtil.newThreeWayMerger( key.repo, MergeUtil.createDryRunInserter(key.repo), key.strategyName); merger.setBase(prior.getParent(0)); - if (merger.merge(next.getParent(0), prior) - && merger.getResultTreeId().equals(next.getTree())) { - return ChangeKind.TRIVIAL_REBASE; - } else { - return ChangeKind.REWORK; + try { + if (merger.merge(next.getParent(0), prior) + && merger.getResultTreeId().equals(next.getTree())) { + return ChangeKind.TRIVIAL_REBASE; + } + } catch (LargeObjectException e) { + // Some object is too large for the merge attempt to succeed. Assume + // it was a rework. } + return ChangeKind.REWORK; } finally { key.repo = null; } From 6a4d2b63cf483a8b21758b95a9c104683496d38e Mon Sep 17 00:00:00 2001 From: David Pursehouse Date: Wed, 22 Apr 2015 18:39:28 +0900 Subject: [PATCH 3/8] Allow to push a tag that points to a non-commit object When pushing a tag that points to a non-commit object, like `v2.6.11` on linux-stable [1] which points to a tree, or `spearce-gpg-pub` on jgit [2] which points to a blob, Gerrit rejects the push with the error message 'missing object(s)'. This causes problems in the use case where a repository is being synched from somewhere else, for example Github, and pushed into Gerrit with: git push mirror refs/heads/*:refs/heads/* --tags In the validation of received commits, instead of trying to parse the received object as a commit and failing if it is not, parse it first as any object and return early if it's not a commit. [1] https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/tag/?id=v2.6.11 [2] https://git.eclipse.org/c/jgit/jgit.git/tag/?id=spearce-gpg-pub Bug: Issue 3328 Change-Id: I013c75db9de44e4b562b712bec8dc7381750740a (cherry picked from commit 853157fb09aab8c3e486922c714fd3caeba79e9f) --- .../java/com/google/gerrit/server/git/ReceiveCommits.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/gerrit-server/src/main/java/com/google/gerrit/server/git/ReceiveCommits.java b/gerrit-server/src/main/java/com/google/gerrit/server/git/ReceiveCommits.java index f83bab66c8..57849b4425 100644 --- a/gerrit-server/src/main/java/com/google/gerrit/server/git/ReceiveCommits.java +++ b/gerrit-server/src/main/java/com/google/gerrit/server/git/ReceiveCommits.java @@ -2372,9 +2372,12 @@ public class ReceiveCommits { walk.reset(); walk.sort(RevSort.NONE); try { - walk.markStart(walk.parseCommit(cmd.getNewId())); + RevObject parsedObject = walk.parseAny(cmd.getNewId()); + if (!(parsedObject instanceof RevCommit)) { + return; + } + walk.markStart((RevCommit)parsedObject); markHeadsAsUninteresting(walk, cmd.getRefName()); - Set existing = changeRefsById().keySet(); for (RevCommit c; (c = walk.next()) != null;) { if (existing.contains(c)) { From 6b870dece5671a64bf57dab9ae9feeb72dad2787 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sa=C5=A1a=20=C5=BDivkov?= Date: Tue, 26 May 2015 17:31:37 +0200 Subject: [PATCH 4/8] Bump JGit to v4.0.0.201506090130-r This JGit version includes the bugfix [1] which is an attempt to fix the "Cannot read project" issue in Gerrit, as discussed in [2] and [3]. This version of JGit also removes the 'release()' method in many interfaces/classes in favor or the implementing the AutoCloseable interface. In stable-2.10 we just replace all usages of the release() method with the close() method. Refactoring the code to make use of the AutoCloseable in stable-2.10 would be a larger change which wouldn't justify itself as we don't expect any major development in stable-2.10 and the usage of AutoCloseable in the master branch is already done. [1] https://git.eclipse.org/r/48288 [2] https://groups.google.com/forum/#!topic/repo-discuss/ZeGWPyyJlrM [3] https://groups.google.com/forum/#!topic/repo-discuss/CYYoHfDxCfA Change-Id: Ie540296238e3bbaf453c9e29426825431e15d423 Signed-off-by: Matthias Sohn --- .../com/google/gerrit/acceptance/GitUtil.java | 2 +- .../gerrit/acceptance/git/SubmitOnPushIT.java | 4 ++-- .../acceptance/rest/change/AbstractSubmit.java | 6 +++--- .../acceptance/rest/project/CreateProjectIT.java | 4 ++-- .../com/google/gerrit/httpd/raw/CatServlet.java | 2 +- .../gerrit/pgm/init/AllProjectsConfig.java | 6 +++--- .../com/google/gerrit/server/ChangeUtil.java | 8 ++++---- .../server/change/ChangeKindCacheImpl.java | 2 +- .../gerrit/server/change/CherryPickChange.java | 4 ++-- .../gerrit/server/change/CreateChange.java | 4 ++-- .../com/google/gerrit/server/change/Files.java | 2 +- .../google/gerrit/server/change/GetArchive.java | 4 ++-- .../google/gerrit/server/change/GetContent.java | 4 ++-- .../google/gerrit/server/change/GetPatch.java | 4 ++-- .../google/gerrit/server/change/GetRelated.java | 2 +- .../google/gerrit/server/change/IncludedIn.java | 4 ++-- .../google/gerrit/server/change/Mergeable.java | 2 +- .../gerrit/server/changedetail/RebaseChange.java | 4 ++-- .../com/google/gerrit/server/git/BanCommit.java | 6 +++--- .../com/google/gerrit/server/git/MergeOp.java | 4 ++-- .../com/google/gerrit/server/git/MergeUtil.java | 2 +- .../gerrit/server/git/NotesBranchUtil.java | 4 ++-- .../google/gerrit/server/git/SubmoduleOp.java | 4 ++-- .../com/google/gerrit/server/git/TagSet.java | 4 ++-- .../gerrit/server/git/VersionedMetaData.java | 6 +++--- .../gerrit/server/index/ChangeBatchIndexer.java | 6 +++--- .../google/gerrit/server/mail/ChangeEmail.java | 2 +- .../server/mail/PatchSetNotificationSender.java | 2 +- .../google/gerrit/server/notedb/ChangeNotes.java | 2 +- .../google/gerrit/server/patch/PatchFile.java | 2 +- .../gerrit/server/patch/PatchListLoader.java | 8 ++++---- .../gerrit/server/patch/PatchScriptBuilder.java | 2 +- .../gerrit/server/patch/PatchSetInfoFactory.java | 2 +- .../gerrit/server/project/CommitsCollection.java | 2 +- .../google/gerrit/server/project/GetHead.java | 2 +- .../gerrit/server/project/ListDashboards.java | 4 ++-- .../server/project/PerformCreateProject.java | 2 +- .../gerrit/server/query/change/ChangeData.java | 2 +- .../server/query/change/ConflictsPredicate.java | 2 +- .../server/query/change/RevWalkPredicate.java | 2 +- .../main/java/gerrit/PRED_commit_edits_2.java | 4 ++-- .../server/change/IncludedInResolverTest.java | 2 +- .../gerrit/server/notedb/ChangeNotesTest.java | 16 ++++++++-------- .../server/tools/hooks/CommitMsgHookTest.java | 4 ++-- lib/jgit/BUCK | 12 ++++++------ plugins/reviewnotes | 2 +- 46 files changed, 90 insertions(+), 90 deletions(-) diff --git a/gerrit-acceptance-tests/src/test/java/com/google/gerrit/acceptance/GitUtil.java b/gerrit-acceptance-tests/src/test/java/com/google/gerrit/acceptance/GitUtil.java index 3234ffdf27..0356f72cdc 100644 --- a/gerrit-acceptance-tests/src/test/java/com/google/gerrit/acceptance/GitUtil.java +++ b/gerrit-acceptance-tests/src/test/java/com/google/gerrit/acceptance/GitUtil.java @@ -184,7 +184,7 @@ public class GitUtil { return ChangeIdUtil.computeChangeId(null, null, i, i, msg); } } finally { - rw.release(); + rw.close(); } } diff --git a/gerrit-acceptance-tests/src/test/java/com/google/gerrit/acceptance/git/SubmitOnPushIT.java b/gerrit-acceptance-tests/src/test/java/com/google/gerrit/acceptance/git/SubmitOnPushIT.java index a73169dc18..763b25fe8e 100644 --- a/gerrit-acceptance-tests/src/test/java/com/google/gerrit/acceptance/git/SubmitOnPushIT.java +++ b/gerrit-acceptance-tests/src/test/java/com/google/gerrit/acceptance/git/SubmitOnPushIT.java @@ -292,7 +292,7 @@ public class SubmitOnPushIT extends AbstractDaemonTest { assertEquals(admin.email, c.getAuthorIdent().getEmailAddress()); assertEquals(admin.email, c.getCommitterIdent().getEmailAddress()); } finally { - rw.release(); + rw.close(); } } finally { r.close(); @@ -310,7 +310,7 @@ public class SubmitOnPushIT extends AbstractDaemonTest { assertEquals(admin.email, c.getAuthorIdent().getEmailAddress()); assertEquals(serverIdent.getEmailAddress(), c.getCommitterIdent().getEmailAddress()); } finally { - rw.release(); + rw.close(); } } finally { r.close(); diff --git a/gerrit-acceptance-tests/src/test/java/com/google/gerrit/acceptance/rest/change/AbstractSubmit.java b/gerrit-acceptance-tests/src/test/java/com/google/gerrit/acceptance/rest/change/AbstractSubmit.java index ab8a5fcd8c..6c36e37498 100644 --- a/gerrit-acceptance-tests/src/test/java/com/google/gerrit/acceptance/rest/change/AbstractSubmit.java +++ b/gerrit-acceptance-tests/src/test/java/com/google/gerrit/acceptance/rest/change/AbstractSubmit.java @@ -265,7 +265,7 @@ public abstract class AbstractSubmit extends AbstractDaemonTest { repo.getRef("refs/heads/master").getObjectId())); return Lists.newArrayList(rw); } finally { - rw.release(); + rw.close(); } } finally { repo.close(); @@ -278,7 +278,7 @@ public abstract class AbstractSubmit extends AbstractDaemonTest { try { return rw.parseCommit(repo.getRef(name).getObjectId()); } finally { - rw.release(); + rw.close(); } } finally { repo.close(); @@ -300,7 +300,7 @@ public abstract class AbstractSubmit extends AbstractDaemonTest { ObjectId newTreeId = repo.resolve("refs/heads/master^{tree}"); return getLatestDiff(repo, oldTreeId, newTreeId); } finally { - rw.release(); + rw.close(); } } finally { repo.close(); diff --git a/gerrit-acceptance-tests/src/test/java/com/google/gerrit/acceptance/rest/project/CreateProjectIT.java b/gerrit-acceptance-tests/src/test/java/com/google/gerrit/acceptance/rest/project/CreateProjectIT.java index cdf671d02a..d441f96873 100644 --- a/gerrit-acceptance-tests/src/test/java/com/google/gerrit/acceptance/rest/project/CreateProjectIT.java +++ b/gerrit-acceptance-tests/src/test/java/com/google/gerrit/acceptance/rest/project/CreateProjectIT.java @@ -252,8 +252,8 @@ public class CreateProjectIT extends AbstractDaemonTest { tw.reset(); } } finally { - tw.release(); - rw.release(); + tw.close(); + rw.close(); repo.close(); } } diff --git a/gerrit-httpd/src/main/java/com/google/gerrit/httpd/raw/CatServlet.java b/gerrit-httpd/src/main/java/com/google/gerrit/httpd/raw/CatServlet.java index 9aec609bdd..756c42762e 100644 --- a/gerrit-httpd/src/main/java/com/google/gerrit/httpd/raw/CatServlet.java +++ b/gerrit-httpd/src/main/java/com/google/gerrit/httpd/raw/CatServlet.java @@ -209,7 +209,7 @@ public class CatServlet extends HttpServlet { return; } } finally { - reader.release(); + reader.close(); } } catch (IOException e) { getServletContext().log("Cannot read repository", e); diff --git a/gerrit-pgm/src/main/java/com/google/gerrit/pgm/init/AllProjectsConfig.java b/gerrit-pgm/src/main/java/com/google/gerrit/pgm/init/AllProjectsConfig.java index cd4a0b8840..03f6d1c672 100644 --- a/gerrit-pgm/src/main/java/com/google/gerrit/pgm/init/AllProjectsConfig.java +++ b/gerrit-pgm/src/main/java/com/google/gerrit/pgm/init/AllProjectsConfig.java @@ -136,15 +136,15 @@ public class AllProjectsConfig extends VersionedMetaData { updateRef(repo, ident, newRevision, "commit: " + msg); revision = newRevision; } finally { - rw.release(); + rw.close(); } } finally { if (inserter != null) { - inserter.release(); + inserter.close(); inserter = null; } if (reader != null) { - reader.release(); + reader.close(); reader = null; } } diff --git a/gerrit-server/src/main/java/com/google/gerrit/server/ChangeUtil.java b/gerrit-server/src/main/java/com/google/gerrit/server/ChangeUtil.java index 80213f6bcd..249bd3867b 100644 --- a/gerrit-server/src/main/java/com/google/gerrit/server/ChangeUtil.java +++ b/gerrit-server/src/main/java/com/google/gerrit/server/ChangeUtil.java @@ -300,7 +300,7 @@ public class ChangeUtil { oi.flush(); revertCommit = revWalk.parseCommit(id); } finally { - oi.release(); + oi.close(); } RefControl refControl = ctl.getRefControl(); @@ -364,7 +364,7 @@ public class ChangeUtil { return change.getId(); } finally { - revWalk.release(); + revWalk.close(); } } finally { git.close(); @@ -423,7 +423,7 @@ public class ChangeUtil { oi.flush(); newCommit = revWalk.parseCommit(id); } finally { - oi.release(); + oi.close(); } PatchSet.Id id = nextPatchSetId(git, change.currentPatchSetId()); @@ -446,7 +446,7 @@ public class ChangeUtil { return change.getId(); } finally { - revWalk.release(); + revWalk.close(); } } finally { git.close(); diff --git a/gerrit-server/src/main/java/com/google/gerrit/server/change/ChangeKindCacheImpl.java b/gerrit-server/src/main/java/com/google/gerrit/server/change/ChangeKindCacheImpl.java index 8d98a4cac0..82d783ce14 100644 --- a/gerrit-server/src/main/java/com/google/gerrit/server/change/ChangeKindCacheImpl.java +++ b/gerrit-server/src/main/java/com/google/gerrit/server/change/ChangeKindCacheImpl.java @@ -228,7 +228,7 @@ public class ChangeKindCacheImpl implements ChangeKindCache { } } finally { key.repo = null; - walk.release(); + walk.close(); } } diff --git a/gerrit-server/src/main/java/com/google/gerrit/server/change/CherryPickChange.java b/gerrit-server/src/main/java/com/google/gerrit/server/change/CherryPickChange.java index b1f6d8ccdc..fd23f339f7 100644 --- a/gerrit-server/src/main/java/com/google/gerrit/server/change/CherryPickChange.java +++ b/gerrit-server/src/main/java/com/google/gerrit/server/change/CherryPickChange.java @@ -154,7 +154,7 @@ public class CherryPickChange { mergeUtilFactory.create(projectState).createCherryPickFromCommit(git, oi, mergeTip, commitToCherryPick, committerIdent, commitMessage, revWalk); } finally { - oi.release(); + oi.close(); } if (cherryPickCommit == null) { @@ -192,7 +192,7 @@ public class CherryPickChange { cherryPickCommit, refControl, identifiedUser); } } finally { - revWalk.release(); + revWalk.close(); } } finally { git.close(); diff --git a/gerrit-server/src/main/java/com/google/gerrit/server/change/CreateChange.java b/gerrit-server/src/main/java/com/google/gerrit/server/change/CreateChange.java index 263f7f170f..04c12c3401 100644 --- a/gerrit-server/src/main/java/com/google/gerrit/server/change/CreateChange.java +++ b/gerrit-server/src/main/java/com/google/gerrit/server/change/CreateChange.java @@ -184,7 +184,7 @@ public class CreateChange implements return Response.created(json.format(change.getId())); } finally { - rw.release(); + rw.close(); } } finally { git.close(); @@ -250,7 +250,7 @@ public class CreateChange implements commit.setMessage(commitMessage); emptyCommit = rw.parseCommit(insert(oi, commit)); } finally { - oi.release(); + oi.close(); } return emptyCommit; } diff --git a/gerrit-server/src/main/java/com/google/gerrit/server/change/Files.java b/gerrit-server/src/main/java/com/google/gerrit/server/change/Files.java index 74659b8b88..0689aecda4 100644 --- a/gerrit-server/src/main/java/com/google/gerrit/server/change/Files.java +++ b/gerrit-server/src/main/java/com/google/gerrit/server/change/Files.java @@ -274,7 +274,7 @@ public class Files implements ChildCollection { db.get().accountPatchReviews().insert(inserts); return pathList; } finally { - reader.release(); + reader.close(); } } finally { git.close(); diff --git a/gerrit-server/src/main/java/com/google/gerrit/server/change/GetArchive.java b/gerrit-server/src/main/java/com/google/gerrit/server/change/GetArchive.java index d602c47d6d..913f69e26e 100644 --- a/gerrit-server/src/main/java/com/google/gerrit/server/change/GetArchive.java +++ b/gerrit-server/src/main/java/com/google/gerrit/server/change/GetArchive.java @@ -126,7 +126,7 @@ public class GetArchive implements RestReadView { @Override public void close() throws IOException { - rw.release(); + rw.close(); repo.close(); } }; @@ -139,7 +139,7 @@ public class GetArchive implements RestReadView { return bin; } finally { if (close) { - rw.release(); + rw.close(); } } } finally { diff --git a/gerrit-server/src/main/java/com/google/gerrit/server/change/GetContent.java b/gerrit-server/src/main/java/com/google/gerrit/server/change/GetContent.java index bfc1df9319..62458cd8e3 100644 --- a/gerrit-server/src/main/java/com/google/gerrit/server/change/GetContent.java +++ b/gerrit-server/src/main/java/com/google/gerrit/server/change/GetContent.java @@ -73,10 +73,10 @@ public class GetContent implements RestReadView { }; return result.setContentLength(object.getSize()).base64(); } finally { - tw.release(); + tw.close(); } } finally { - rw.release(); + rw.close(); } } finally { repo.close(); diff --git a/gerrit-server/src/main/java/com/google/gerrit/server/change/GetPatch.java b/gerrit-server/src/main/java/com/google/gerrit/server/change/GetPatch.java index 4a8be84379..4e40d629b0 100644 --- a/gerrit-server/src/main/java/com/google/gerrit/server/change/GetPatch.java +++ b/gerrit-server/src/main/java/com/google/gerrit/server/change/GetPatch.java @@ -102,7 +102,7 @@ public class GetPatch implements RestReadView { @Override public void close() throws IOException { - rw.release(); + rw.close(); repo.close(); } }; @@ -123,7 +123,7 @@ public class GetPatch implements RestReadView { return bin; } finally { if (close) { - rw.release(); + rw.close(); } } } finally { diff --git a/gerrit-server/src/main/java/com/google/gerrit/server/change/GetRelated.java b/gerrit-server/src/main/java/com/google/gerrit/server/change/GetRelated.java index 0ccb15c01c..b58572cdb6 100644 --- a/gerrit-server/src/main/java/com/google/gerrit/server/change/GetRelated.java +++ b/gerrit-server/src/main/java/com/google/gerrit/server/change/GetRelated.java @@ -83,7 +83,7 @@ public class GetRelated implements RestReadView { info.changes = walk(rsrc, rw, ref); return info; } finally { - rw.release(); + rw.close(); } } finally { git.close(); diff --git a/gerrit-server/src/main/java/com/google/gerrit/server/change/IncludedIn.java b/gerrit-server/src/main/java/com/google/gerrit/server/change/IncludedIn.java index e0cdebb89a..410bcab940 100644 --- a/gerrit-server/src/main/java/com/google/gerrit/server/change/IncludedIn.java +++ b/gerrit-server/src/main/java/com/google/gerrit/server/change/IncludedIn.java @@ -71,7 +71,7 @@ class IncludedIn implements RestReadView { } return new IncludedInInfo(IncludedInResolver.resolve(r, rw, rev)); } finally { - rw.release(); + rw.close(); } } finally { r.close(); @@ -87,4 +87,4 @@ class IncludedIn implements RestReadView { tags = in.getTags(); } } -} \ No newline at end of file +} diff --git a/gerrit-server/src/main/java/com/google/gerrit/server/change/Mergeable.java b/gerrit-server/src/main/java/com/google/gerrit/server/change/Mergeable.java index c17afb8e4e..b9daaf47ee 100644 --- a/gerrit-server/src/main/java/com/google/gerrit/server/change/Mergeable.java +++ b/gerrit-server/src/main/java/com/google/gerrit/server/change/Mergeable.java @@ -245,7 +245,7 @@ public class Mergeable implements RestReadView { "Cannot merge test change %d", change.getId().get()), e); return false; } finally { - rw.release(); + rw.close(); } } diff --git a/gerrit-server/src/main/java/com/google/gerrit/server/changedetail/RebaseChange.java b/gerrit-server/src/main/java/com/google/gerrit/server/changedetail/RebaseChange.java index 070203d44e..77fb178a52 100644 --- a/gerrit-server/src/main/java/com/google/gerrit/server/changedetail/RebaseChange.java +++ b/gerrit-server/src/main/java/com/google/gerrit/server/changedetail/RebaseChange.java @@ -142,10 +142,10 @@ public class RebaseChange { throw new IOException(e.getMessage()); } finally { if (inserter != null) { - inserter.release(); + inserter.close(); } if (rw != null) { - rw.release(); + rw.close(); } if (git != null) { git.close(); diff --git a/gerrit-server/src/main/java/com/google/gerrit/server/git/BanCommit.java b/gerrit-server/src/main/java/com/google/gerrit/server/git/BanCommit.java index 7ff91eff3c..05ee1db4bf 100644 --- a/gerrit-server/src/main/java/com/google/gerrit/server/git/BanCommit.java +++ b/gerrit-server/src/main/java/com/google/gerrit/server/git/BanCommit.java @@ -69,7 +69,7 @@ public class BanCommit { RevCommit map = rw.parseCommit(ref.getObjectId()); return NoteMap.read(rw.getObjectReader(), map); } finally { - rw.release(); + rw.close(); } } catch (IOException badMap) { throw new IOException("Cannot load " + RefNames.REFS_REJECT_COMMITS, @@ -138,8 +138,8 @@ public class BanCommit { } return result; } finally { - revWalk.release(); - inserter.release(); + revWalk.close(); + inserter.close(); } } finally { repo.close(); diff --git a/gerrit-server/src/main/java/com/google/gerrit/server/git/MergeOp.java b/gerrit-server/src/main/java/com/google/gerrit/server/git/MergeOp.java index 3f0a70d257..7855b63a74 100644 --- a/gerrit-server/src/main/java/com/google/gerrit/server/git/MergeOp.java +++ b/gerrit-server/src/main/java/com/google/gerrit/server/git/MergeOp.java @@ -304,10 +304,10 @@ public class MergeOp { throw new MergeException("Cannot query the database", e); } finally { if (inserter != null) { - inserter.release(); + inserter.close(); } if (rw != null) { - rw.release(); + rw.close(); } if (repo != null) { repo.close(); diff --git a/gerrit-server/src/main/java/com/google/gerrit/server/git/MergeUtil.java b/gerrit-server/src/main/java/com/google/gerrit/server/git/MergeUtil.java index 709a8ac9dd..cf348ad9c8 100644 --- a/gerrit-server/src/main/java/com/google/gerrit/server/git/MergeUtil.java +++ b/gerrit-server/src/main/java/com/google/gerrit/server/git/MergeUtil.java @@ -671,7 +671,7 @@ public class MergeUtil { } @Override - public void release() { + public void close() { } }); return (ThreeWayMerger) m; diff --git a/gerrit-server/src/main/java/com/google/gerrit/server/git/NotesBranchUtil.java b/gerrit-server/src/main/java/com/google/gerrit/server/git/NotesBranchUtil.java index f1b0a78de7..fb96a6b5de 100644 --- a/gerrit-server/src/main/java/com/google/gerrit/server/git/NotesBranchUtil.java +++ b/gerrit-server/src/main/java/com/google/gerrit/server/git/NotesBranchUtil.java @@ -153,8 +153,8 @@ public class NotesBranchUtil { } updateRef(notesBranch); } finally { - revWalk.release(); - reader.release(); + revWalk.close(); + reader.close(); } } diff --git a/gerrit-server/src/main/java/com/google/gerrit/server/git/SubmoduleOp.java b/gerrit-server/src/main/java/com/google/gerrit/server/git/SubmoduleOp.java index 52e2268132..89d32029a2 100644 --- a/gerrit-server/src/main/java/com/google/gerrit/server/git/SubmoduleOp.java +++ b/gerrit-server/src/main/java/com/google/gerrit/server/git/SubmoduleOp.java @@ -383,7 +383,7 @@ public class SubmoduleOp { + subscriber.get(), e); } finally { if (recRw != null) { - recRw.release(); + recRw.close(); } if (pdb != null) { pdb.close(); @@ -403,7 +403,7 @@ public class SubmoduleOp { b.finish(); return dc; } finally { - rw.release(); + rw.close(); } } diff --git a/gerrit-server/src/main/java/com/google/gerrit/server/git/TagSet.java b/gerrit-server/src/main/java/com/google/gerrit/server/git/TagSet.java index 761d5d6d67..6519bd992c 100644 --- a/gerrit-server/src/main/java/com/google/gerrit/server/git/TagSet.java +++ b/gerrit-server/src/main/java/com/google/gerrit/server/git/TagSet.java @@ -147,7 +147,7 @@ class TagSet { } } finally { if (rw != null) { - rw.release(); + rw.close(); } } } @@ -189,7 +189,7 @@ class TagSet { } catch (IOException e) { log.warn("Error building tags for repository " + projectName, e); } finally { - rw.release(); + rw.close(); } } diff --git a/gerrit-server/src/main/java/com/google/gerrit/server/git/VersionedMetaData.java b/gerrit-server/src/main/java/com/google/gerrit/server/git/VersionedMetaData.java index 7828973311..de3721588c 100644 --- a/gerrit-server/src/main/java/com/google/gerrit/server/git/VersionedMetaData.java +++ b/gerrit-server/src/main/java/com/google/gerrit/server/git/VersionedMetaData.java @@ -117,7 +117,7 @@ public abstract class VersionedMetaData { revision = id != null ? new RevWalk(reader).parseCommit(id) : null; onLoad(); } finally { - reader.release(); + reader.close(); reader = null; } } @@ -306,12 +306,12 @@ public abstract class VersionedMetaData { newTree = null; if (inserter != null) { - inserter.release(); + inserter.close(); inserter = null; } if (reader != null) { - reader.release(); + reader.close(); reader = null; } } diff --git a/gerrit-server/src/main/java/com/google/gerrit/server/index/ChangeBatchIndexer.java b/gerrit-server/src/main/java/com/google/gerrit/server/index/ChangeBatchIndexer.java index fac1c55dfa..4779674ec0 100644 --- a/gerrit-server/src/main/java/com/google/gerrit/server/index/ChangeBatchIndexer.java +++ b/gerrit-server/src/main/java/com/google/gerrit/server/index/ChangeBatchIndexer.java @@ -319,7 +319,7 @@ public class ChangeBatchIndexer { getPathsAndIndex(id); } } finally { - walk.release(); + walk.close(); } return null; } @@ -353,7 +353,7 @@ public class ChangeBatchIndexer { } } } finally { - df.release(); + df.close(); } } catch (Exception e) { fail("Failed to index commit " + b.name(), false, e); @@ -398,7 +398,7 @@ public class ChangeBatchIndexer { oi.flush(); return id; } finally { - oi.release(); + oi.close(); } } diff --git a/gerrit-server/src/main/java/com/google/gerrit/server/mail/ChangeEmail.java b/gerrit-server/src/main/java/com/google/gerrit/server/mail/ChangeEmail.java index d38c5a3b4e..b3c0d6112f 100644 --- a/gerrit-server/src/main/java/com/google/gerrit/server/mail/ChangeEmail.java +++ b/gerrit-server/src/main/java/com/google/gerrit/server/mail/ChangeEmail.java @@ -407,7 +407,7 @@ public abstract class ChangeEmail extends NotificationEmail { log.error("Cannot format patch", e); return ""; } finally { - fmt.release(); + fmt.close(); git.close(); } } diff --git a/gerrit-server/src/main/java/com/google/gerrit/server/mail/PatchSetNotificationSender.java b/gerrit-server/src/main/java/com/google/gerrit/server/mail/PatchSetNotificationSender.java index 76b896aabc..b847a9151e 100644 --- a/gerrit-server/src/main/java/com/google/gerrit/server/mail/PatchSetNotificationSender.java +++ b/gerrit-server/src/main/java/com/google/gerrit/server/mail/PatchSetNotificationSender.java @@ -95,7 +95,7 @@ public class PatchSetNotificationSender { commit = revWalk.parseCommit(ObjectId.fromString( updatedPatchSet.getRevision().get())); } finally { - revWalk.release(); + revWalk.close(); } final PatchSetInfo info = patchSetInfoFactory.get(commit, updatedPatchSet.getId()); final List footerLines = commit.getFooterLines(); diff --git a/gerrit-server/src/main/java/com/google/gerrit/server/notedb/ChangeNotes.java b/gerrit-server/src/main/java/com/google/gerrit/server/notedb/ChangeNotes.java index b242d7c8be..a33209cf5d 100644 --- a/gerrit-server/src/main/java/com/google/gerrit/server/notedb/ChangeNotes.java +++ b/gerrit-server/src/main/java/com/google/gerrit/server/notedb/ChangeNotes.java @@ -575,7 +575,7 @@ public class ChangeNotes extends AbstractChangeNotes { // TODO(yyonas): figure out how to handle this exception throw new IOException(e1); } finally { - walk.release(); + walk.close(); } } diff --git a/gerrit-server/src/main/java/com/google/gerrit/server/patch/PatchFile.java b/gerrit-server/src/main/java/com/google/gerrit/server/patch/PatchFile.java index 81f435201c..c65262f6f3 100644 --- a/gerrit-server/src/main/java/com/google/gerrit/server/patch/PatchFile.java +++ b/gerrit-server/src/main/java/com/google/gerrit/server/patch/PatchFile.java @@ -75,7 +75,7 @@ public class PatchFile { bTree = bCommit.getTree(); } } finally { - reader.release(); + reader.close(); } } diff --git a/gerrit-server/src/main/java/com/google/gerrit/server/patch/PatchListLoader.java b/gerrit-server/src/main/java/com/google/gerrit/server/patch/PatchListLoader.java index 94050d7317..5444e4a318 100644 --- a/gerrit-server/src/main/java/com/google/gerrit/server/patch/PatchListLoader.java +++ b/gerrit-server/src/main/java/com/google/gerrit/server/patch/PatchListLoader.java @@ -189,7 +189,7 @@ public class PatchListLoader extends CacheLoader { return new PatchList(a, b, againstParent, entries.toArray(new PatchListEntry[entries.size()])); } finally { - reader.release(); + reader.close(); } } @@ -342,7 +342,7 @@ public class PatchListLoader extends CacheLoader { } @Override - public void release() { + public void close() { } }); @@ -454,7 +454,7 @@ public class PatchListLoader extends CacheLoader { return rw.lookupTree(treeId); } finally { - ins.release(); + ins.close(); } } @@ -465,7 +465,7 @@ public class PatchListLoader extends CacheLoader { oi.flush(); return id; } finally { - oi.release(); + oi.close(); } } } diff --git a/gerrit-server/src/main/java/com/google/gerrit/server/patch/PatchScriptBuilder.java b/gerrit-server/src/main/java/com/google/gerrit/server/patch/PatchScriptBuilder.java index 0c98ccf02e..3f87aefb92 100644 --- a/gerrit-server/src/main/java/com/google/gerrit/server/patch/PatchScriptBuilder.java +++ b/gerrit-server/src/main/java/com/google/gerrit/server/patch/PatchScriptBuilder.java @@ -119,7 +119,7 @@ class PatchScriptBuilder { try { return build(content, comments, history); } finally { - reader.release(); + reader.close(); } } diff --git a/gerrit-server/src/main/java/com/google/gerrit/server/patch/PatchSetInfoFactory.java b/gerrit-server/src/main/java/com/google/gerrit/server/patch/PatchSetInfoFactory.java index 340300af19..0571b58b81 100644 --- a/gerrit-server/src/main/java/com/google/gerrit/server/patch/PatchSetInfoFactory.java +++ b/gerrit-server/src/main/java/com/google/gerrit/server/patch/PatchSetInfoFactory.java @@ -94,7 +94,7 @@ public class PatchSetInfoFactory { info.setParents(toParentInfos(src.getParents(), rw)); return info; } finally { - rw.release(); + rw.close(); } } catch (IOException e) { throw new PatchSetInfoNotAvailableException(e); diff --git a/gerrit-server/src/main/java/com/google/gerrit/server/project/CommitsCollection.java b/gerrit-server/src/main/java/com/google/gerrit/server/project/CommitsCollection.java index f27dc6e537..f82142af7b 100644 --- a/gerrit-server/src/main/java/com/google/gerrit/server/project/CommitsCollection.java +++ b/gerrit-server/src/main/java/com/google/gerrit/server/project/CommitsCollection.java @@ -75,7 +75,7 @@ public class CommitsCollection implements } catch (MissingObjectException | IncorrectObjectTypeException e) { throw new ResourceNotFoundException(id); } finally { - rw.release(); + rw.close(); } } finally { repo.close(); diff --git a/gerrit-server/src/main/java/com/google/gerrit/server/project/GetHead.java b/gerrit-server/src/main/java/com/google/gerrit/server/project/GetHead.java index f05ece4de4..29c44b5262 100644 --- a/gerrit-server/src/main/java/com/google/gerrit/server/project/GetHead.java +++ b/gerrit-server/src/main/java/com/google/gerrit/server/project/GetHead.java @@ -71,7 +71,7 @@ public class GetHead implements RestReadView { } throw new AuthException("not allowed to see HEAD"); } finally { - rw.release(); + rw.close(); } } throw new ResourceNotFoundException(Constants.HEAD); diff --git a/gerrit-server/src/main/java/com/google/gerrit/server/project/ListDashboards.java b/gerrit-server/src/main/java/com/google/gerrit/server/project/ListDashboards.java index fbfcc8f604..658cf13f1a 100644 --- a/gerrit-server/src/main/java/com/google/gerrit/server/project/ListDashboards.java +++ b/gerrit-server/src/main/java/com/google/gerrit/server/project/ListDashboards.java @@ -100,7 +100,7 @@ class ListDashboards implements RestReadView { } return all; } finally { - rw.release(); + rw.close(); } } finally { git.close(); @@ -134,7 +134,7 @@ class ListDashboards implements RestReadView { } } } finally { - tw.release(); + tw.close(); } return list; } diff --git a/gerrit-server/src/main/java/com/google/gerrit/server/project/PerformCreateProject.java b/gerrit-server/src/main/java/com/google/gerrit/server/project/PerformCreateProject.java index f8cd9c16c2..43bdd22526 100644 --- a/gerrit-server/src/main/java/com/google/gerrit/server/project/PerformCreateProject.java +++ b/gerrit-server/src/main/java/com/google/gerrit/server/project/PerformCreateProject.java @@ -300,7 +300,7 @@ public class PerformCreateProject { + createProjectArgs.getProjectName(), e); throw e; } finally { - oi.release(); + oi.close(); } } } diff --git a/gerrit-server/src/main/java/com/google/gerrit/server/query/change/ChangeData.java b/gerrit-server/src/main/java/com/google/gerrit/server/query/change/ChangeData.java index e9266cdd82..f726fe32e7 100644 --- a/gerrit-server/src/main/java/com/google/gerrit/server/query/change/ChangeData.java +++ b/gerrit-server/src/main/java/com/google/gerrit/server/query/change/ChangeData.java @@ -466,7 +466,7 @@ public class ChangeData { commitMessage = c.getFullMessage(); commitFooters = c.getFooterLines(); } finally { - walk.release(); + walk.close(); } } finally { repo.close(); diff --git a/gerrit-server/src/main/java/com/google/gerrit/server/query/change/ConflictsPredicate.java b/gerrit-server/src/main/java/com/google/gerrit/server/query/change/ConflictsPredicate.java index 61454a87d1..ca958cf9b4 100644 --- a/gerrit-server/src/main/java/com/google/gerrit/server/query/change/ConflictsPredicate.java +++ b/gerrit-server/src/main/java/com/google/gerrit/server/query/change/ConflictsPredicate.java @@ -138,7 +138,7 @@ class ConflictsPredicate extends OrPredicate { } catch (NoSuchProjectException e) { throw new IllegalStateException(e); } finally { - rw.release(); + rw.close(); } } finally { repo.close(); diff --git a/gerrit-server/src/main/java/com/google/gerrit/server/query/change/RevWalkPredicate.java b/gerrit-server/src/main/java/com/google/gerrit/server/query/change/RevWalkPredicate.java index fd57a44f40..23bbb12e34 100644 --- a/gerrit-server/src/main/java/com/google/gerrit/server/query/change/RevWalkPredicate.java +++ b/gerrit-server/src/main/java/com/google/gerrit/server/query/change/RevWalkPredicate.java @@ -109,7 +109,7 @@ public abstract class RevWalkPredicate extends OperatorPredicate { try { return match(repo, rw, args); } finally { - rw.release(); + rw.close(); } } finally { repo.close(); diff --git a/gerrit-server/src/main/java/gerrit/PRED_commit_edits_2.java b/gerrit-server/src/main/java/gerrit/PRED_commit_edits_2.java index 2c7949c191..cddbf1f368 100644 --- a/gerrit-server/src/main/java/gerrit/PRED_commit_edits_2.java +++ b/gerrit-server/src/main/java/gerrit/PRED_commit_edits_2.java @@ -130,7 +130,7 @@ public class PRED_commit_edits_2 extends Predicate.P2 { } catch (IOException err) { throw new JavaException(this, 1, err); } finally { - reader.release(); + reader.close(); } return engine.fail(); @@ -161,4 +161,4 @@ public class PRED_commit_edits_2 extends Predicate.P2 { } return new Text(reader.open(tw.getObjectId(0), Constants.OBJ_BLOB)); } -} \ No newline at end of file +} diff --git a/gerrit-server/src/test/java/com/google/gerrit/server/change/IncludedInResolverTest.java b/gerrit-server/src/test/java/com/google/gerrit/server/change/IncludedInResolverTest.java index 65eede6e75..1d0626cefc 100644 --- a/gerrit-server/src/test/java/com/google/gerrit/server/change/IncludedInResolverTest.java +++ b/gerrit-server/src/test/java/com/google/gerrit/server/change/IncludedInResolverTest.java @@ -127,7 +127,7 @@ public class IncludedInResolverTest extends RepositoryTestCase { @After public void tearDown() throws Exception { - revWalk.release(); + revWalk.close(); super.tearDown(); } diff --git a/gerrit-server/src/test/java/com/google/gerrit/server/notedb/ChangeNotesTest.java b/gerrit-server/src/test/java/com/google/gerrit/server/notedb/ChangeNotesTest.java index 29d244942e..4b3b206b47 100644 --- a/gerrit-server/src/test/java/com/google/gerrit/server/notedb/ChangeNotesTest.java +++ b/gerrit-server/src/test/java/com/google/gerrit/server/notedb/ChangeNotesTest.java @@ -218,7 +218,7 @@ public class ChangeNotesTest { assertEquals(author.getWhen(), committer.getWhen()); assertEquals(author.getTimeZone(), committer.getTimeZone()); } finally { - walk.release(); + walk.close(); } } @@ -243,7 +243,7 @@ public class ChangeNotesTest { + "Patch-set: 1\n", commit.getFullMessage()); } finally { - walk.release(); + walk.close(); } } @@ -264,7 +264,7 @@ public class ChangeNotesTest { + "Label: -Code-Review\n", commit.getFullMessage()); } finally { - walk.release(); + walk.close(); } } @@ -312,7 +312,7 @@ public class ChangeNotesTest { assertEquals(author.getWhen(), committer.getWhen()); assertEquals(author.getTimeZone(), committer.getTimeZone()); } finally { - walk.release(); + walk.close(); } } @@ -337,7 +337,7 @@ public class ChangeNotesTest { + "Submitted-with: RULE_ERROR Problem with patch set: 1\n", commit.getFullMessage()); } finally { - walk.release(); + walk.close(); } } @@ -717,7 +717,7 @@ public class ChangeNotesTest { + "Reviewer: Change Owner <1@gerrit>\n", commit.getFullMessage()); } finally { - walk.release(); + walk.close(); } ChangeNotes notes = newNotes(c); @@ -748,7 +748,7 @@ public class ChangeNotesTest { + "Patch-set: 1\n", commit.getFullMessage()); } finally { - walk.release(); + walk.close(); } ChangeNotes notes = newNotes(c); @@ -789,7 +789,7 @@ public class ChangeNotesTest { + "Patch-set: 1\n", commit.getFullMessage()); } finally { - walk.release(); + walk.close(); } ChangeNotes notes = newNotes(c); diff --git a/gerrit-server/src/test/java/com/google/gerrit/server/tools/hooks/CommitMsgHookTest.java b/gerrit-server/src/test/java/com/google/gerrit/server/tools/hooks/CommitMsgHookTest.java index 17fe068581..8d41e0ab2a 100644 --- a/gerrit-server/src/test/java/com/google/gerrit/server/tools/hooks/CommitMsgHookTest.java +++ b/gerrit-server/src/test/java/com/google/gerrit/server/tools/hooks/CommitMsgHookTest.java @@ -431,7 +431,7 @@ public class CommitMsgHookTest extends HookTestCase { oi.flush(); return e; } finally { - oi.release(); + oi.close(); } } @@ -457,7 +457,7 @@ public class CommitMsgHookTest extends HookTestCase { fail(Constants.HEAD + " did not change: " + ref.getResult()); } } finally { - oi.release(); + oi.close(); } } } diff --git a/lib/jgit/BUCK b/lib/jgit/BUCK index dcefb64f03..050e1c887b 100644 --- a/lib/jgit/BUCK +++ b/lib/jgit/BUCK @@ -1,13 +1,13 @@ include_defs('//lib/maven.defs') REPO = MAVEN_CENTRAL # Leave here even if set to MAVEN_CENTRAL. -VERS = '4.0.0.201505050340-m2' +VERS = '4.0.0.201506090130-r' maven_jar( name = 'jgit', id = 'org.eclipse.jgit:org.eclipse.jgit:' + VERS, - bin_sha1 = '1cc3120d39ed2b55584e631634e65c5d2e6c1cf7', - src_sha1 = '425f578cc9d5ccb8f3b050a5ab1e2d7a0becb25d', + bin_sha1 = '859b5dbae0372bc0744503b9593119410c0474f2', + src_sha1 = '5a7b7e179852c20f6af8581b96cf6441b23025a5', license = 'jgit', repository = REPO, unsign = True, @@ -22,7 +22,7 @@ maven_jar( maven_jar( name = 'jgit-servlet', id = 'org.eclipse.jgit:org.eclipse.jgit.http.server:' + VERS, - sha1 = '2a9f55d1d92afef795542b995db6ab261007857f', + sha1 = 'd86da25c9e1042612ebe3be1e027cce4d9a8e4c9', license = 'jgit', repository = REPO, deps = [':jgit'], @@ -36,7 +36,7 @@ maven_jar( maven_jar( name = 'jgit-archive', id = 'org.eclipse.jgit:org.eclipse.jgit.archive:' + VERS, - sha1 = 'ee3954753067818f8f734981a01c13ac33425f2c', + sha1 = '3b1f5cefdd65bbe81851f638ee1f461c9cb5df20', license = 'jgit', repository = REPO, deps = [':jgit', @@ -53,7 +53,7 @@ maven_jar( maven_jar( name = 'junit', id = 'org.eclipse.jgit:org.eclipse.jgit.junit:' + VERS, - sha1 = '6cc19f8f0a1791e26d4225625ecba6a31d9b830e', + sha1 = 'e86c5b8ec06624d3cd2b8c11fd0c528281751329', license = 'DO_NOT_DISTRIBUTE', repository = REPO, unsign = True, diff --git a/plugins/reviewnotes b/plugins/reviewnotes index 61702414c0..0b5aab6820 160000 --- a/plugins/reviewnotes +++ b/plugins/reviewnotes @@ -1 +1 @@ -Subproject commit 61702414c046dd6b811c9137b765f9db422f83db +Subproject commit 0b5aab68206744f6a41abba63aaa3714f354fa83 From 14422afb6d40c71299c2ea8b7cdb496b2af5d02a Mon Sep 17 00:00:00 2001 From: David Pursehouse Date: Wed, 10 Jun 2015 21:20:19 +0900 Subject: [PATCH 5/8] Update reviewnotes plugin to latest revision Change-Id: I469308025ccd84971eb2b9b877db9833be36c913 --- plugins/reviewnotes | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/reviewnotes b/plugins/reviewnotes index 603b7b3885..f6403a1ed3 160000 --- a/plugins/reviewnotes +++ b/plugins/reviewnotes @@ -1 +1 @@ -Subproject commit 603b7b3885a1d2953ca891f58d2a6095e72e5313 +Subproject commit f6403a1ed35e908a4828fdc9168ed752fa178c69 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 6/8] 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 7/8] 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 From c8a4fc05032eeadbd33a1caabfac54ee087bd690 Mon Sep 17 00:00:00 2001 From: David Pursehouse Date: Fri, 12 Jun 2015 12:10:58 +0900 Subject: [PATCH 8/8] Update 2.11.1 release notes Change-Id: I83bbe6729c2d2b5ab2e95e00b7292c7098041278 --- ReleaseNotes/ReleaseNotes-2.11.1.txt | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/ReleaseNotes/ReleaseNotes-2.11.1.txt b/ReleaseNotes/ReleaseNotes-2.11.1.txt index ee359514c3..a070b86ca2 100644 --- a/ReleaseNotes/ReleaseNotes-2.11.1.txt +++ b/ReleaseNotes/ReleaseNotes-2.11.1.txt @@ -7,7 +7,8 @@ link:https://gerrit-releases.storage.googleapis.com/gerrit-2.11.1.war[ https://gerrit-releases.storage.googleapis.com/gerrit-2.11.1.war] Gerrit 2.11.1 includes the bug fixes done with -link:ReleaseNotes-2.10.4.html[Gerrit 2.10.4]. These bug fixes are *not* listed +link:ReleaseNotes-2.10.4.html[Gerrit 2.10.4] and +link:ReleaseNotes-2.10.5.html[Gerrit 2.10.5]. These bug fixes are *not* listed in these release notes. There are no schema changes from link:ReleaseNotes-2.11.html[2.11]. @@ -46,7 +47,7 @@ the target branch. Now, instead of indexing interactively, it falls back to a batch thread pool with the number of available logical CPUs. -* Reduce unnecessary database access when queryng changes. +* Reduce unnecessary database access when querying changes. + Searching for changes was retrieving more information than necessary from the database. This has been optimized to reduce database access and make better use @@ -70,6 +71,9 @@ Permissions ~~~~~~~~~~~ * Require 'View Plugins' capability to list plugins through SSH. ++ +The 'View Plugins' capability was required to list plugins through the REST API, +but not through SSH. * Fix project creation with plugin config if user is not project owner. + @@ -136,6 +140,16 @@ events after the initial sync. Miscellaneous ~~~~~~~~~~~~~ +* link:http://code.google.com/p/gerrit/issues/detail?id=3328[Issue 3328]: +Allow to push a tag that points to a non-commit object. ++ +When pushing a tag that points to a non-commit object, like +link:https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/tag/?id=v2.6.11[ +`v2.6.11` on linux-stable] which points to a tree, or +link:https://git.eclipse.org/c/jgit/jgit.git/tag/?id=spearce-gpg-pub[ +`spearce-gpg-pub` on jgit] which points to a blob, Gerrit rejected the push with +the error message 'missing object(s)'. + * link:http://code.google.com/p/gerrit/issues/detail?id=3323[Issue 3323]: Fix internal server error when cloning from a slave while hiding some refs. @@ -152,6 +166,8 @@ A temporary directory was being created but not removed. * link:http://code.google.com/p/gerrit/issues/detail?id=2791[Issue 2791]: Fix email validation for new TLDs such as `.systems`. +* Assume change kind is 'rework' if `LargeObjectException` occurs. + Documentation ~~~~~~~~~~~~~