void (@NotNull Project project, @NotNull @NonNls String newRepositoryPath, @NotNull @NonNls String vcsName) { if (!project.isDisposed() && project.getBasePath() != null && FileUtil.isAncestor(project.getBasePath(), newRepositoryPath, true)) { ProjectLevelVcsManager manager = ProjectLevelVcsManager.getInstance(project); manager.setDirectoryMappings(VcsUtil.addMapping(manager.getDirectoryMappings(), newRepositoryPath, vcsName)); } }