void (VirtualFile mapRoot) { if (myProject != null && (!myProject.isDefault()) && myProject.getBaseDir() != null && VfsUtilCore.isAncestor(myProject.getBaseDir(), mapRoot, false)) { mapRoot.refresh(false, false); final String path = mapRoot.equals(myProject.getBaseDir()) ? "" : mapRoot.getPath(); ProjectLevelVcsManager manager = ProjectLevelVcsManager.getInstance(myProject); manager.setDirectoryMappings(VcsUtil.addMapping(manager.getDirectoryMappings(), path, HgVcs.VCS_NAME)); } }