List<VirtualFile> (Pair<String, String>... pathAndVcs) { List<VirtualFile> roots = new ArrayList<>(); List<VcsDirectoryMapping> mappings = new ArrayList<>(); for (Pair<String, String> pathAndVc : pathAndVcs) { String path = pathAndVc.first; String vcs = pathAndVc.second; VirtualFile vf; if (path.equals(myBaseDir.getPath())) { vf = myBaseDir; } else { vf = VfsTestUtil.createDir(myBaseDir, path); } mappings.add(new VcsDirectoryMapping(vf.getPath(), vcs)); roots.add(vf); } ProjectLevelVcsManager.getInstance(myProject).setDirectoryMappings(mappings); return roots; }