Merge branch 'stable-2.12' into stable-2.13
* stable-2.12: Fix intopic predicate with regex Change-Id: I19ab53d6d920083c50691631bd936d34cd134036
This commit is contained in:
commit
99f68632af
@ -14,7 +14,7 @@
|
||||
|
||||
package com.google.gerrit.server.query.change;
|
||||
|
||||
import static com.google.gerrit.server.index.change.ChangeField.FUZZY_TOPIC;
|
||||
import static com.google.gerrit.server.index.change.ChangeField.EXACT_TOPIC;
|
||||
|
||||
import com.google.gerrit.reviewdb.client.Change;
|
||||
import com.google.gwtorm.server.OrmException;
|
||||
@ -26,7 +26,7 @@ class RegexTopicPredicate extends ChangeRegexPredicate {
|
||||
private final RunAutomaton pattern;
|
||||
|
||||
RegexTopicPredicate(String re) {
|
||||
super(FUZZY_TOPIC, re);
|
||||
super(EXACT_TOPIC, re);
|
||||
|
||||
if (re.startsWith("^")) {
|
||||
re = re.substring(1);
|
||||
|
@ -507,6 +507,8 @@ public abstract class AbstractQueryChangesTest extends GerritServerTests {
|
||||
assertQuery("intopic:fixup", change4);
|
||||
assertQuery("topic:\"\"", change5);
|
||||
assertQuery("intopic:\"\"", change5);
|
||||
assertQuery("intopic:^feature2.*", change4, change2);
|
||||
assertQuery("intopic:{^.*feature2$}", change3, change2);
|
||||
}
|
||||
|
||||
@Test
|
||||
|
Loading…
Reference in New Issue
Block a user