Merge branch 'stable-2.14' into stable-2.15
* stable-2.14: Set version to 2.14.11 Upgrade elasticsearch-rest-client to 6.3.2 StalenessChecker: URLDecode project name before checking staleness AbstractQueryChangesTest: Add a test with project name that requires URL encoding Upgrade Dropwizard Metrics to 4.0.3 Upgrade JGit to 4.7.2.201807261330-r Fix typos in documentation of 'List Files' REST API element Change-Id: Ie19c82d34971264780d636843ccd76438f23a76e
This commit is contained in:
commit
cfdb2aed40
@ -4761,8 +4761,8 @@ Lists the files that were modified, added or deleted in a revision.
|
|||||||
GET /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/revisions/674ac754f91e64a0efb8087e59a176484bd534d1/files/ HTTP/1.0
|
GET /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/revisions/674ac754f91e64a0efb8087e59a176484bd534d1/files/ HTTP/1.0
|
||||||
----
|
----
|
||||||
|
|
||||||
As result a map is returned that maps the link:#file-id[file path] to a list of
|
As result a map is returned that maps the link:#file-id[file path] to a
|
||||||
link:#file-info[FileInfo] entries. The entries in the map are
|
link:#file-info[FileInfo] entry. The entries in the map are
|
||||||
sorted by file path.
|
sorted by file path.
|
||||||
|
|
||||||
.Response
|
.Response
|
||||||
|
@ -568,8 +568,8 @@ maven_jar(
|
|||||||
|
|
||||||
maven_jar(
|
maven_jar(
|
||||||
name = "dropwizard-core",
|
name = "dropwizard-core",
|
||||||
artifact = "io.dropwizard.metrics:metrics-core:4.0.2",
|
artifact = "io.dropwizard.metrics:metrics-core:4.0.3",
|
||||||
sha1 = "ec9878842d510cabd6bd6a9da1bebae1ae0cd199",
|
sha1 = "bb562ee73f740bb6b2bf7955f97be6b870d9e9f0",
|
||||||
)
|
)
|
||||||
|
|
||||||
# When updading Bouncy Castle, also update it in bazlets.
|
# When updading Bouncy Castle, also update it in bazlets.
|
||||||
@ -880,8 +880,8 @@ maven_jar(
|
|||||||
|
|
||||||
maven_jar(
|
maven_jar(
|
||||||
name = "elasticsearch-rest-client",
|
name = "elasticsearch-rest-client",
|
||||||
artifact = "org.elasticsearch.client:elasticsearch-rest-client:6.3.1",
|
artifact = "org.elasticsearch.client:elasticsearch-rest-client:6.3.2",
|
||||||
sha1 = "99de036a2cd99dbecec1cc84f5d0e19032e74fa7",
|
sha1 = "2077ea5f00fdd2d6af85223b730ba8047303297f",
|
||||||
)
|
)
|
||||||
|
|
||||||
JACKSON_VERSION = "2.6.6"
|
JACKSON_VERSION = "2.6.6"
|
||||||
|
@ -49,7 +49,7 @@ public class ElasticContainer<SELF extends ElasticContainer<SELF>> extends Gener
|
|||||||
case V6_2:
|
case V6_2:
|
||||||
return "docker.elastic.co/elasticsearch/elasticsearch-oss:6.2.4";
|
return "docker.elastic.co/elasticsearch/elasticsearch-oss:6.2.4";
|
||||||
case V6_3:
|
case V6_3:
|
||||||
return "docker.elastic.co/elasticsearch/elasticsearch-oss:6.3.1";
|
return "docker.elastic.co/elasticsearch/elasticsearch-oss:6.3.2";
|
||||||
}
|
}
|
||||||
throw new IllegalStateException("No tests for version: " + version.name());
|
throw new IllegalStateException("No tests for version: " + version.name());
|
||||||
}
|
}
|
||||||
|
@ -19,6 +19,7 @@ import com.google.common.cache.Cache;
|
|||||||
import com.google.common.collect.ImmutableList;
|
import com.google.common.collect.ImmutableList;
|
||||||
import com.google.common.collect.Sets;
|
import com.google.common.collect.Sets;
|
||||||
import com.google.common.primitives.Ints;
|
import com.google.common.primitives.Ints;
|
||||||
|
import com.google.gerrit.extensions.restapi.Url;
|
||||||
import com.google.gerrit.index.IndexConfig;
|
import com.google.gerrit.index.IndexConfig;
|
||||||
import com.google.gerrit.reviewdb.client.Change;
|
import com.google.gerrit.reviewdb.client.Change;
|
||||||
import com.google.gerrit.reviewdb.client.Project;
|
import com.google.gerrit.reviewdb.client.Project;
|
||||||
@ -173,7 +174,7 @@ public class ChangeFinder {
|
|||||||
InternalChangeQuery query = queryProvider.get().noFields();
|
InternalChangeQuery query = queryProvider.get().noFields();
|
||||||
List<ChangeData> r = query.byLegacyChangeId(id);
|
List<ChangeData> r = query.byLegacyChangeId(id);
|
||||||
if (r.size() == 1) {
|
if (r.size() == 1) {
|
||||||
changeIdProjectCache.put(id, r.get(0).project().get());
|
changeIdProjectCache.put(id, Url.encode(r.get(0).project().get()));
|
||||||
}
|
}
|
||||||
return asChangeNotes(r);
|
return asChangeNotes(r);
|
||||||
}
|
}
|
||||||
|
@ -29,6 +29,7 @@ import com.google.common.collect.SetMultimap;
|
|||||||
import com.google.common.collect.Sets;
|
import com.google.common.collect.Sets;
|
||||||
import com.google.common.collect.Streams;
|
import com.google.common.collect.Streams;
|
||||||
import com.google.gerrit.common.Nullable;
|
import com.google.gerrit.common.Nullable;
|
||||||
|
import com.google.gerrit.extensions.restapi.Url;
|
||||||
import com.google.gerrit.index.IndexConfig;
|
import com.google.gerrit.index.IndexConfig;
|
||||||
import com.google.gerrit.reviewdb.client.Change;
|
import com.google.gerrit.reviewdb.client.Change;
|
||||||
import com.google.gerrit.reviewdb.client.Project;
|
import com.google.gerrit.reviewdb.client.Project;
|
||||||
@ -189,7 +190,8 @@ public class StalenessChecker {
|
|||||||
String s = new String(b, UTF_8);
|
String s = new String(b, UTF_8);
|
||||||
List<String> parts = Splitter.on(':').splitToList(s);
|
List<String> parts = Splitter.on(':').splitToList(s);
|
||||||
RefStatePattern.check(parts.size() == 2, s);
|
RefStatePattern.check(parts.size() == 2, s);
|
||||||
result.put(new Project.NameKey(parts.get(0)), RefStatePattern.create(parts.get(1)));
|
result.put(
|
||||||
|
new Project.NameKey(Url.decode(parts.get(0))), RefStatePattern.create(parts.get(1)));
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
@ -2640,6 +2640,13 @@ public abstract class AbstractQueryChangesTest extends GerritServerTests {
|
|||||||
assertQuery(query);
|
assertQuery(query);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void byUrlEncodedProject() throws Exception {
|
||||||
|
TestRepository<Repo> repo = createProject("repo+foo");
|
||||||
|
Change change = insert(repo, newChange(repo));
|
||||||
|
assertQuery("project:repo+foo", change);
|
||||||
|
}
|
||||||
|
|
||||||
protected ChangeInserter newChange(TestRepository<Repo> repo) throws Exception {
|
protected ChangeInserter newChange(TestRepository<Repo> repo) throws Exception {
|
||||||
return newChange(repo, null, null, null, null, false);
|
return newChange(repo, null, null, null, null, false);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user