mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[hg] limit the number of commits during filtering in order to show first results faster
In 20aeb1ad47 due to a mistake parameter maxCount stopped being used.
GitOrigin-RevId: d16c643b55627893c21ba51e9228ca74c1e8dbeb
This commit is contained in:
committed by
intellij-monorepo-bot
parent
42b1f5ae3e
commit
ebab794941
@@ -392,8 +392,14 @@ public class HgHistoryUtil {
|
||||
|
||||
@NotNull
|
||||
public static List<TimedVcsCommit> readAllHashes(@NotNull Project project, @NotNull VirtualFile root,
|
||||
@NotNull final Consumer<? super VcsUser> userRegistry, @NotNull List<String> params) {
|
||||
@NotNull Consumer<? super VcsUser> userRegistry, @NotNull List<String> params) {
|
||||
return readHashes(project, root, userRegistry, -1, params);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public static List<TimedVcsCommit> readHashes(@NotNull Project project, @NotNull VirtualFile root,
|
||||
@NotNull Consumer<? super VcsUser> userRegistry, int limit,
|
||||
@NotNull List<String> params) {
|
||||
final VcsLogObjectsFactory factory = getObjectsFactoryWithDisposeCheck(project);
|
||||
if (factory == null) {
|
||||
return Collections.emptyList();
|
||||
@@ -402,7 +408,7 @@ public class HgHistoryUtil {
|
||||
assert hgvcs != null;
|
||||
HgVersion version = hgvcs.getVersion();
|
||||
String[] templates = ArrayUtil.toStringArray(HgBaseLogParser.constructDefaultTemplate(version));
|
||||
HgCommandResult result = getLogResult(project, root, version, -1, params, HgChangesetUtil.makeTemplate(templates));
|
||||
HgCommandResult result = getLogResult(project, root, version, limit, params, HgChangesetUtil.makeTemplate(templates));
|
||||
return getCommitRecords(project, result, new HgBaseLogParser<TimedVcsCommit>() {
|
||||
|
||||
@Override
|
||||
|
||||
@@ -282,7 +282,7 @@ public final class HgLogProvider implements VcsLogProvider {
|
||||
}
|
||||
}
|
||||
|
||||
return HgHistoryUtil.readAllHashes(myProject, root, Consumer.EMPTY_CONSUMER, filterParameters);
|
||||
return HgHistoryUtil.readHashes(myProject, root, Consumer.EMPTY_CONSUMER, maxCount, filterParameters);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
|
||||
Reference in New Issue
Block a user