Merge branch 'stable-2.15' into stable-2.16

* stable-2.15:
  Consume JGit artifacts from Maven Central
  Consume JGit artifacts from Maven Central
  gr-related-changes: Don't show "Same topic" for only one change
  RelatedChanges: Don't show "Same Topic" for only one change
  ChangeEditApi: Allow to set options on change edit detail request
  Add Javadoc to clarify behavior of {Accounts|Changes|Groups}#withOptions
  OnlineNoteDbMigrationIT: improve readability of some tests
  Update git submodules
  Add release notes for Gerrit v2.10.8
  Add release notes for Gerrit v2.9.5
  Set version to 2.13.12
  Set version to 2.12.9
  Set version to 2.11.12
  Set version to 2.10.8
  Set version to 2.9.5

Change-Id: Id02a8afc6e4e8d42b759ed2ea28a0926411ff2e8
This commit is contained in:
David Pursehouse
2019-01-18 21:47:17 +09:00
15 changed files with 285 additions and 75 deletions

View File

@@ -0,0 +1,39 @@
Release notes for Gerrit 2.10.8
===============================
There are no schema changes from link:ReleaseNotes-2.10.7.html[2.10.7].
Download:
link:https://gerrit-releases.storage.googleapis.com/gerrit-2.10.8.war[
https://gerrit-releases.storage.googleapis.com/gerrit-2.10.8.war]
Bug Fixes
---------
* link:https://bugs.chromium.org/p/gerrit/issues/detail?id=10262[Issue 10262]: Fix validation of wants in git-upload-pack for protocol v0 stateless transports.
+
See the following section for details.
* Upgrade JGit to 4.5.5.201812240535-r.
+
This upgrade includes several major versions since 4.0.0 used in Gerrit version 2.10.7.
Important fixes are summarized below. Please refer to the corresponding JGit release notes for full details.
** link:https://projects.eclipse.org/projects/technology.jgit/releases/4.5.5[JGit 4.5.5]: link:https://bugs.chromium.org/p/gerrit/issues/detail?id=10262[Issue 10262]: Fix validation of wants in git-upload-pack for protocol v0 stateless transports.
+
AdvertiseRefsHook was not called for git-upload-pack in protocol v0 stateless transports, meaning that wants were not validated and a user could fetch anything that is pointed to by any ref (using fetch-by-sha1), as long as they could guess the object name.
** link:https://projects.eclipse.org/projects/technology.jgit/releases/4.5.4[JGit 4.5.4]: Fix LockFile semantics when running on NFS.
+
Honor trustFolderStats also when reading packed-refs.
** link:https://projects.eclipse.org/projects/technology.jgit/releases/4.5.3[JGit 4.5.3]: Fix exception handling for opening bitmap index files.
** link:https://projects.eclipse.org/projects/technology.jgit/releases/4.5.2[JGit 4.5.2]: Fix pack marked as corrupted even if it isnt.
** link:https://projects.eclipse.org/projects/technology.jgit/releases/4.5.1[JGit 4.5.1]: Dont remove Pack when FileNotFoundException is transient.
** link:https://projects.eclipse.org/projects/technology.jgit/releases/4.1.0[JGit 4.1.0]: Handle stale NFS file handles on packed-refs file.
+
Use java.io.File instead of NIO to check existence of loose objects in ObjectDirectory to speed up inserting of loose objects.
Reduce memory consumption when creating bitmaps during writing pack files.

View File

@@ -0,0 +1,67 @@
Release notes for Gerrit 2.9.5
==============================
Download:
link:https://gerrit-releases.storage.googleapis.com/gerrit-2.9.5.war[
https://gerrit-releases.storage.googleapis.com/gerrit-2.9.5.war]
Important Notes
---------------
*WARNING:* There are no schema changes from
link:ReleaseNotes-2.9.4.html[2.9.4], but when upgrading from an existing site
that was initialized with Gerrit version 2.6 to version 2.9.1 the primary key
column order will be updated for some tables. It is therefore important to
upgrade the site with the `init` program, rather than only copying the .war file
over the existing one.
It is recommended to run the `init` program in interactive mode. Warnings will
be suppressed in batch mode.
----
java -jar gerrit.war init -d site_path
----
Bug Fixes
---------
* link:https://bugs.chromium.org/p/gerrit/issues/detail?id=10262[Issue 10262]: Fix validation of wants in git-upload-pack for protocol v0 stateless transports.
+
See the following section for details.
* Upgrade JGit to 4.5.5.201812240535-r.
+
This upgrade includes several major versions since 3.4.2 used in Gerrit version 2.9.4. Important fixes are summarized below. Please refer to the corresponding JGit release notes for full details.
** link:https://projects.eclipse.org/projects/technology.jgit/releases/4.5.5[JGit 4.5.5]: link:https://bugs.chromium.org/p/gerrit/issues/detail?id=10262[Issue 10262]: Fix validation of wants in git-upload-pack for protocol v0 stateless transports.
+
AdvertiseRefsHook was not called for git-upload-pack in protocol v0 stateless transports, meaning that wants were not validated and a user could fetch anything that is pointed to by any ref (using fetch-by-sha1), as long as they could guess the object name.
** link:https://projects.eclipse.org/projects/technology.jgit/releases/4.5.4[JGit 4.5.4]: Fix LockFile semantics when running on NFS.
+
Honor trustFolderStats also when reading packed-refs.
** link:https://projects.eclipse.org/projects/technology.jgit/releases/4.5.3[JGit 4.5.3]: Fix exception handling for opening bitmap index files.
** link:https://projects.eclipse.org/projects/technology.jgit/releases/4.5.2[JGit 4.5.2]: Fix pack marked as corrupted even if it isnt.
** link:https://projects.eclipse.org/projects/technology.jgit/releases/4.5.1[JGit 4.5.1]: Dont remove Pack when FileNotFoundException is transient.
** link:https://projects.eclipse.org/projects/technology.jgit/releases/4.1.0[JGit 4.1.0]: Handle stale NFS file handles on packed-refs file.
+
Use java.io.File instead of NIO to check existence of loose objects in ObjectDirectory to speed up inserting of loose objects.
Reduce memory consumption when creating bitmaps during writing pack files.
** link:https://projects.eclipse.org/projects/technology.jgit/releases/3.7.1[JGit 3.7.1]: Fix massive performance problem in Gerrit caused by ObjectWalk.markUninteresting marking the root tree as uninteresting.
** link:https://projects.eclipse.org/projects/technology.jgit/releases/3.7.0[JGit 3.7.0]: Provide more details in exceptions thrown when packfile is invalid.
** link:https://projects.eclipse.org/projects/technology.jgit/releases/3.6.2[JGit 3.6.2]: link:[Issue 3094]: Dont remove pack from pack list for problems which could be transient.
+
Log reason for ignoring pack when IOException occurred.
** link:https://projects.eclipse.org/projects/technology.jgit/releases/3.5.3[JGit 3.5.3]: Fix for vulnerability CVE-2014-9390.
* Fix resource exhaustion due to unclosed LDAP connection.
+
When auth.type is set to LDAP (not LDAP_BIND), two LDAP connections are made, but one was not being closed. This eventually caused resource exhaustion and LDAP authentications failed.

View File

@@ -233,9 +233,13 @@ public class RelatedChanges extends TabPanel {
if (!Gerrit.info().change().isSubmitWholeTopicEnabled()
&& info.topic() != null
&& !"".equals(info.topic())) {
StringBuilder topicQuery = new StringBuilder();
topicQuery.append("status:open");
topicQuery.append(" ").append(op("topic", info.topic()));
StringBuilder topicQuery =
new StringBuilder()
.append("status:open")
.append(" ")
.append(op("-change", info.legacyId().get()))
.append(" ")
.append(op("topic", info.topic()));
ChangeList.query(
topicQuery.toString(),
EnumSet.of(

View File

@@ -172,16 +172,19 @@ public interface Accounts {
return this;
}
/** Set an option on the request, appending to existing options. */
public QueryRequest withOption(ListAccountsOption options) {
this.options.add(options);
return this;
}
/** Set options on the request, appending to existing options. */
public QueryRequest withOptions(ListAccountsOption... options) {
this.options.addAll(Arrays.asList(options));
return this;
}
/** Set options on the request, replacing existing options. */
public QueryRequest withOptions(EnumSet<ListAccountsOption> options) {
this.options = options;
return this;

View File

@@ -14,11 +14,13 @@
package com.google.gerrit.extensions.api.changes;
import com.google.gerrit.extensions.client.ChangeEditDetailOption;
import com.google.gerrit.extensions.common.EditInfo;
import com.google.gerrit.extensions.restapi.BinaryResult;
import com.google.gerrit.extensions.restapi.NotImplementedException;
import com.google.gerrit.extensions.restapi.RawInput;
import com.google.gerrit.extensions.restapi.RestApiException;
import java.util.EnumSet;
import java.util.Optional;
/**
@@ -29,6 +31,33 @@ import java.util.Optional;
*/
public interface ChangeEditApi {
abstract class ChangeEditDetailRequest {
private String base;
private EnumSet<ChangeEditDetailOption> options = EnumSet.noneOf(ChangeEditDetailOption.class);
public abstract Optional<EditInfo> get() throws RestApiException;
public ChangeEditDetailRequest withBase(String base) {
this.base = base;
return this;
}
public ChangeEditDetailRequest withOption(ChangeEditDetailOption option) {
this.options.add(option);
return this;
}
public String getBase() {
return base;
}
public EnumSet<ChangeEditDetailOption> options() {
return options;
}
}
ChangeEditDetailRequest detail() throws RestApiException;
/**
* Retrieves details regarding the change edit.
*
@@ -155,6 +184,11 @@ public interface ChangeEditApi {
* interface.
*/
class NotImplemented implements ChangeEditApi {
@Override
public ChangeEditDetailRequest detail() throws RestApiException {
throw new NotImplementedException();
}
@Override
public Optional<EditInfo> get() throws RestApiException {
throw new NotImplementedException();

View File

@@ -94,16 +94,19 @@ public interface Changes {
return this;
}
/** Set an option on the request, appending to existing options. */
public QueryRequest withOption(ListChangesOption options) {
this.options.add(options);
return this;
}
/** Set options on the request, appending to existing options. */
public QueryRequest withOptions(ListChangesOption... options) {
this.options.addAll(Arrays.asList(options));
return this;
}
/** Set options on the request, replacing existing options. */
public QueryRequest withOptions(EnumSet<ListChangesOption> options) {
this.options = options;
return this;

View File

@@ -253,16 +253,19 @@ public interface Groups {
return this;
}
/** Set an option on the request, appending to existing options. */
public QueryRequest withOption(ListGroupsOption options) {
this.options.add(options);
return this;
}
/** Set options on the request, appending to existing options. */
public QueryRequest withOptions(ListGroupsOption... options) {
this.options.addAll(Arrays.asList(options));
return this;
}
/** Set options on the request, replacing existing options. */
public QueryRequest withOptions(EnumSet<ListGroupsOption> options) {
this.options = options;
return this;

View File

@@ -0,0 +1,20 @@
// Copyright (C) 2019 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package com.google.gerrit.extensions.client;
public enum ChangeEditDetailOption {
LIST_FILES,
DOWNLOAD_COMMANDS
}

View File

@@ -18,6 +18,7 @@ import static com.google.gerrit.server.api.ApiUtil.asRestApiException;
import com.google.gerrit.extensions.api.changes.ChangeEditApi;
import com.google.gerrit.extensions.api.changes.PublishChangeEditInput;
import com.google.gerrit.extensions.client.ChangeEditDetailOption;
import com.google.gerrit.extensions.common.EditInfo;
import com.google.gerrit.extensions.common.Input;
import com.google.gerrit.extensions.restapi.AuthException;
@@ -86,6 +87,34 @@ public class ChangeEditApiImpl implements ChangeEditApi {
this.changeResource = changeResource;
}
@Override
public ChangeEditDetailRequest detail() throws RestApiException {
try {
return new ChangeEditDetailRequest() {
@Override
public Optional<EditInfo> get() throws RestApiException {
return ChangeEditApiImpl.this.get(this);
}
};
} catch (Exception e) {
throw asRestApiException("Cannot retrieve change edit", e);
}
}
private Optional<EditInfo> get(ChangeEditDetailRequest r) throws RestApiException {
try {
ChangeEdits.Detail editDetail = editDetailProvider.get();
editDetail.setBase(r.getBase());
editDetail.setList(r.options().contains(ChangeEditDetailOption.LIST_FILES));
editDetail.setDownloadCommands(
r.options().contains(ChangeEditDetailOption.DOWNLOAD_COMMANDS));
Response<EditInfo> edit = editDetail.apply(changeResource);
return edit.isNone() ? Optional.empty() : Optional.of(edit.value());
} catch (Exception e) {
throw asRestApiException("Cannot retrieve change edit", e);
}
}
@Override
public Optional<EditInfo> get() throws RestApiException {
try {

View File

@@ -151,14 +151,24 @@ public class ChangeEdits implements ChildCollection<ChangeResource, ChangeEditRe
private final FileInfoJson fileInfoJson;
private final Revisions revisions;
private String base;
private boolean list;
private boolean downloadCommands;
@Option(name = "--base", metaVar = "revision-id")
String base;
public void setBase(String base) {
this.base = base;
}
@Option(name = "--list")
boolean list;
public void setList(boolean list) {
this.list = list;
}
@Option(name = "--download-commands")
boolean downloadCommands;
public void setDownloadCommands(boolean downloadCommands) {
this.downloadCommands = downloadCommands;
}
@Inject
Detail(

View File

@@ -22,6 +22,7 @@ import static com.google.gerrit.extensions.client.ListChangesOption.DETAILED_LAB
import static com.google.gerrit.extensions.client.ListChangesOption.MESSAGES;
import static com.google.gerrit.extensions.common.testing.EditInfoSubject.assertThat;
import static com.google.gerrit.extensions.restapi.testing.BinaryResultSubject.assertThat;
import static com.google.gerrit.reviewdb.client.Patch.COMMIT_MSG;
import static com.google.gerrit.server.group.SystemGroupBackend.REGISTERED_USERS;
import static java.nio.charset.StandardCharsets.UTF_8;
import static java.util.concurrent.TimeUnit.SECONDS;
@@ -41,6 +42,7 @@ import com.google.gerrit.extensions.api.changes.AddReviewerInput;
import com.google.gerrit.extensions.api.changes.NotifyHandling;
import com.google.gerrit.extensions.api.changes.PublishChangeEditInput;
import com.google.gerrit.extensions.api.changes.ReviewInput;
import com.google.gerrit.extensions.client.ChangeEditDetailOption;
import com.google.gerrit.extensions.client.InheritableBoolean;
import com.google.gerrit.extensions.client.ListChangesOption;
import com.google.gerrit.extensions.common.ApprovalInfo;
@@ -51,7 +53,6 @@ import com.google.gerrit.extensions.common.FileInfo;
import com.google.gerrit.extensions.restapi.AuthException;
import com.google.gerrit.extensions.restapi.BinaryResult;
import com.google.gerrit.extensions.restapi.ResourceConflictException;
import com.google.gerrit.reviewdb.client.Patch;
import com.google.gerrit.reviewdb.client.PatchSet;
import com.google.gerrit.reviewdb.client.Project;
import com.google.gerrit.reviewdb.server.ReviewDb;
@@ -417,7 +418,9 @@ public class ChangeEditIT extends AbstractDaemonTest {
public void retrieveEdit() throws Exception {
adminRestSession.get(urlEdit(changeId)).assertNoContent();
createArbitraryEditFor(changeId);
EditInfo editInfo = getEditInfo(changeId, false);
Optional<EditInfo> maybeEditInfo = gApi.changes().id(changeId).edit().get();
assertThat(maybeEditInfo).isPresent();
EditInfo editInfo = maybeEditInfo.get();
ChangeInfo changeInfo = get(changeId, CURRENT_REVISION, CURRENT_COMMIT);
assertThat(editInfo.commit.commit).isNotEqualTo(changeInfo.currentRevision);
assertThat(editInfo).commit().parents().hasSize(1);
@@ -431,11 +434,7 @@ public class ChangeEditIT extends AbstractDaemonTest {
@Test
public void retrieveFilesInEdit() throws Exception {
createEmptyEditFor(changeId);
gApi.changes().id(changeId).edit().modifyFile(FILE_NAME, RawInputUtil.create(CONTENT_NEW));
EditInfo info = getEditInfo(changeId, true);
assertThat(info.files).isNotNull();
assertThat(info.files.keySet()).containsExactly(Patch.COMMIT_MSG, FILE_NAME, FILE_NAME2);
assertFiles(changeId, ImmutableList.of(COMMIT_MSG, FILE_NAME, FILE_NAME2));
}
@Test
@@ -576,8 +575,10 @@ public class ChangeEditIT extends AbstractDaemonTest {
@Test
public void addNewFile() throws Exception {
createEmptyEditFor(changeId);
assertFiles(changeId, ImmutableList.of(COMMIT_MSG, FILE_NAME, FILE_NAME2));
gApi.changes().id(changeId).edit().modifyFile(FILE_NAME3, RawInputUtil.create(CONTENT_NEW));
ensureSameBytes(getFileContentOfEdit(changeId, FILE_NAME3), CONTENT_NEW);
assertFiles(changeId, ImmutableList.of(COMMIT_MSG, FILE_NAME, FILE_NAME2, FILE_NAME3));
}
@Test
@@ -785,6 +786,19 @@ public class ChangeEditIT extends AbstractDaemonTest {
assertThat(fileContent).value().bytes().isEqualTo(expectedFileBytes);
}
private void assertFiles(String changeId, List<String> expected) throws Exception {
Optional<EditInfo> info =
gApi.changes()
.id(changeId)
.edit()
.detail()
.withOption(ChangeEditDetailOption.LIST_FILES)
.get();
assertThat(info).isPresent();
assertThat(info.get().files).isNotNull();
assertThat(info.get().files.keySet()).containsExactlyElementsIn(expected);
}
private String urlEdit(String changeId) {
return "/changes/" + changeId + "/edit";
}
@@ -801,10 +815,6 @@ public class ChangeEditIT extends AbstractDaemonTest {
return urlEdit(changeId) + "/" + fileName + (base ? "?base" : "");
}
private String urlGetFiles(String changeId) {
return urlEdit(changeId) + "?list";
}
private String urlRevisionFiles(String changeId, String revisionId) {
return "/changes/" + changeId + "/revisions/" + revisionId + "/files";
}
@@ -839,11 +849,6 @@ public class ChangeEditIT extends AbstractDaemonTest {
+ "/diff?context=ALL&intraline";
}
private EditInfo getEditInfo(String changeId, boolean files) throws Exception {
RestResponse r = adminRestSession.get(files ? urlGetFiles(changeId) : urlEdit(changeId));
return readContentFromJson(r, EditInfo.class);
}
private <T> T readContentFromJson(RestResponse r, Class<T> clazz) throws Exception {
r.assertOK();
try (JsonReader jsonReader = new JsonReader(r.getReader())) {

View File

@@ -63,6 +63,7 @@ import com.google.gerrit.server.notedb.rebuild.NotesMigrationStateListener;
import com.google.gerrit.server.schema.ReviewDbFactory;
import com.google.gerrit.testing.ConfigSuite;
import com.google.gerrit.testing.NoteDbMode;
import com.google.gwtorm.server.OrmException;
import com.google.gwtorm.server.SchemaFactory;
import com.google.inject.Inject;
import com.google.inject.Provider;
@@ -294,23 +295,10 @@ public class OnlineNoteDbMigrationIT extends AbstractDaemonTest {
Change.Id id1 = r1.getChange().getId();
Change.Id id2 = r2.getChange().getId();
try (ReviewDb db = schemaFactory.open()) {
Change c1 = db.changes().get(id1);
c1.setNoteDbState(INVALID_STATE);
Change c2 = db.changes().get(id2);
c2.setNoteDbState(INVALID_STATE);
db.changes().update(ImmutableList.of(c1, c2));
}
invalidateNoteDbState(id1, id2);
migrate(b -> b.setChanges(ImmutableList.of(id2)), NoteDbMigrator::rebuild);
try (ReviewDb db = schemaFactory.open()) {
NoteDbChangeState s1 = NoteDbChangeState.parse(db.changes().get(id1));
assertThat(s1.getChangeMetaId().name()).isEqualTo(INVALID_STATE);
NoteDbChangeState s2 = NoteDbChangeState.parse(db.changes().get(id2));
assertThat(s2.getChangeMetaId().name()).isNotEqualTo(INVALID_STATE);
}
assertNotRebuilt(id1);
assertRebuilt(id2);
}
@Test
@@ -325,23 +313,10 @@ public class OnlineNoteDbMigrationIT extends AbstractDaemonTest {
Change.Id id1 = r1.getChange().getId();
Change.Id id2 = r2.getChange().getId();
try (ReviewDb db = schemaFactory.open()) {
Change c1 = db.changes().get(id1);
c1.setNoteDbState(INVALID_STATE);
Change c2 = db.changes().get(id2);
c2.setNoteDbState(INVALID_STATE);
db.changes().update(ImmutableList.of(c1, c2));
}
invalidateNoteDbState(id1, id2);
migrate(b -> b.setProjects(ImmutableList.of(p2)), NoteDbMigrator::rebuild);
try (ReviewDb db = schemaFactory.open()) {
NoteDbChangeState s1 = NoteDbChangeState.parse(db.changes().get(id1));
assertThat(s1.getChangeMetaId().name()).isEqualTo(INVALID_STATE);
NoteDbChangeState s2 = NoteDbChangeState.parse(db.changes().get(id2));
assertThat(s2.getChangeMetaId().name()).isNotEqualTo(INVALID_STATE);
}
assertNotRebuilt(id1);
assertRebuilt(id2);
}
@Test
@@ -360,27 +335,39 @@ public class OnlineNoteDbMigrationIT extends AbstractDaemonTest {
Change.Id id2 = r2.getChange().getId();
Change.Id id3 = r3.getChange().getId();
try (ReviewDb db = schemaFactory.open()) {
Change c1 = db.changes().get(id1);
c1.setNoteDbState(INVALID_STATE);
Change c2 = db.changes().get(id2);
c2.setNoteDbState(INVALID_STATE);
Change c3 = db.changes().get(id3);
c3.setNoteDbState(INVALID_STATE);
db.changes().update(ImmutableList.of(c1, c2, c3));
}
invalidateNoteDbState(id1, id2, id3);
migrate(b -> b.setSkipProjects(ImmutableList.of(p3)), NoteDbMigrator::rebuild);
assertRebuilt(id1, id2);
assertNotRebuilt(id3);
}
private void invalidateNoteDbState(Change.Id... ids) throws OrmException {
List<Change> list = new ArrayList<>(ids.length);
try (ReviewDb db = schemaFactory.open()) {
NoteDbChangeState s1 = NoteDbChangeState.parse(db.changes().get(id1));
assertThat(s1.getChangeMetaId().name()).isNotEqualTo(INVALID_STATE);
for (Change.Id id : ids) {
Change c = db.changes().get(id);
c.setNoteDbState(INVALID_STATE);
list.add(c);
}
db.changes().update(list);
}
}
NoteDbChangeState s2 = NoteDbChangeState.parse(db.changes().get(id2));
assertThat(s2.getChangeMetaId().name()).isNotEqualTo(INVALID_STATE);
private void assertRebuilt(Change.Id... ids) throws OrmException {
try (ReviewDb db = schemaFactory.open()) {
for (Change.Id id : ids) {
NoteDbChangeState s = NoteDbChangeState.parse(db.changes().get(id));
assertThat(s.getChangeMetaId().name()).isNotEqualTo(INVALID_STATE);
}
}
}
NoteDbChangeState s3 = NoteDbChangeState.parse(db.changes().get(id3));
assertThat(s3.getChangeMetaId().name()).isEqualTo(INVALID_STATE);
private void assertNotRebuilt(Change.Id... ids) throws OrmException {
try (ReviewDb db = schemaFactory.open()) {
for (Change.Id id : ids) {
NoteDbChangeState s = NoteDbChangeState.parse(db.changes().get(id));
assertThat(s.getChangeMetaId().name()).isEqualTo(INVALID_STATE);
}
}
}

View File

@@ -1,4 +1,4 @@
load("//tools/bzl:maven_jar.bzl", "ECLIPSE", "maven_jar")
load("//tools/bzl:maven_jar.bzl", "MAVEN_CENTRAL", "maven_jar")
_JGIT_VERS = "5.1.5.201812261915-r"
@@ -6,7 +6,7 @@ _DOC_VERS = _JGIT_VERS # Set to _JGIT_VERS unless using a snapshot
JGIT_DOC_URL = "http://download.eclipse.org/jgit/site/" + _DOC_VERS + "/apidocs"
_JGIT_REPO = ECLIPSE # Leave here even if set to MAVEN_CENTRAL.
_JGIT_REPO = MAVEN_CENTRAL # Leave here even if set to MAVEN_CENTRAL.
# set this to use a local version.
# "/home/<user>/projects/jgit"

View File

@@ -190,7 +190,8 @@
},
_getChangesWithSameTopic() {
return this.$.restAPI.getChangesWithSameTopic(this.change.topic);
return this.$.restAPI.getChangesWithSameTopic(this.change.topic,
this.change._number);
},
/**

View File

@@ -1886,16 +1886,21 @@
});
},
getChangesWithSameTopic(topic) {
getChangesWithSameTopic(topic, changeNum) {
const options = this.listChangesOptionsToHex(
this.ListChangesOption.LABELS,
this.ListChangesOption.CURRENT_REVISION,
this.ListChangesOption.CURRENT_COMMIT,
this.ListChangesOption.DETAILED_LABELS
);
const query = [
'status:open',
'-change:' + changeNum,
'topic:' + topic,
].join(' ');
const params = {
O: options,
q: 'status:open topic:' + topic,
q: query,
};
return this._fetchJSON({
url: '/changes/',