mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[hg] partially support regular expressions and matching case options in hg log
Case-insensitive regular expressions do not work.
This commit is contained in:
@@ -275,7 +275,17 @@ public class HgLogProvider implements VcsLogProvider {
|
||||
|
||||
if (filterCollection.getTextFilter() != null) {
|
||||
String textFilter = filterCollection.getTextFilter().getText();
|
||||
filterParameters.add(HgHistoryUtil.prepareParameter("keyword", textFilter));
|
||||
if (filterCollection.getTextFilter().isRegex()) {
|
||||
filterParameters.add("-r");
|
||||
filterParameters.add("grep(r'" + textFilter + "')");
|
||||
}
|
||||
else if (filterCollection.getTextFilter().matchesCase()) {
|
||||
filterParameters.add("-r");
|
||||
filterParameters.add("grep(r'" + StringUtil.escapeChars(textFilter, UserNameRegex.EXTENDED_REGEX_CHARS) + "')");
|
||||
}
|
||||
else {
|
||||
filterParameters.add(HgHistoryUtil.prepareParameter("keyword", textFilter));
|
||||
}
|
||||
}
|
||||
|
||||
if (filterCollection.getStructureFilter() != null) {
|
||||
|
||||
Reference in New Issue
Block a user