From b36aabbb5d5d1ca9dbea65cfc87c1f0afb60ee0d Mon Sep 17 00:00:00 2001 From: Kirill Likhodedov Date: Sat, 22 Jun 2019 15:09:48 +0100 Subject: [PATCH] vcs-log: support hash-range in multi-repository projects: IDEA-216785 To filter by a range, we need to resolve the supplied ref to a CommitId. To speedup resolve for a full-size hash, no checks were performed: the string was simply converted to a Hash and a CommitId. Therefore in a multi-root project a full-size hash was resolved in all roots, although it existed only in one of them. To fix this, check if the generated CommitId exists in the storage. If it doesn't, then we generated it incorrectly, and there is no such hash in the root. GitOrigin-RevId: 3b34a6212e539355a0e0f40ed5ade9160ad855d9 --- .../vcs/log/visible/VcsLogFiltererImpl.kt | 3 +- .../vcs/log/visible/VisiblePackBuilderTest.kt | 29 +++++++++++++++++++ 2 files changed, 31 insertions(+), 1 deletion(-) diff --git a/platform/vcs-log/impl/src/com/intellij/vcs/log/visible/VcsLogFiltererImpl.kt b/platform/vcs-log/impl/src/com/intellij/vcs/log/visible/VcsLogFiltererImpl.kt index d522e1bfb191..39ba63e85f50 100644 --- a/platform/vcs-log/impl/src/com/intellij/vcs/log/visible/VcsLogFiltererImpl.kt +++ b/platform/vcs-log/impl/src/com/intellij/vcs/log/visible/VcsLogFiltererImpl.kt @@ -241,7 +241,8 @@ class VcsLogFiltererImpl(private val logProviders: Map) = ids.map { getCommitId(it)!!.hash }