Set<VirtualFile> (@NotNull Project project, @NotNull Collection<? extends FilePath> filePaths) { HashSet<VirtualFile> roots = new HashSet<>(); for (FilePath path : filePaths) { ContainerUtil.addIfNotNull(roots, getHgRootOrNull(project, path)); } return roots; }