@Override
  public AbstractVcs getByName(@Nullable String name) {
    if (StringUtil.isEmpty(name)) {
      return null;
    }

    VcsEP ep;
    synchronized (myLock) {
      AbstractVcs vcs = myVcses.get(name);
      if (vcs != null) {
        return vcs;
      }

      ep = myExtensions.get(name);
    }

    if (ep == null) {
      ObsoleteVcs obsoleteVcs = ObsoleteVcs.findByName(name);
      if (obsoleteVcs != null && unbundledVcsNotificationShown.compareAndSet(false, true)) {
        proposeToInstallPlugin(obsoleteVcs);
      }
      return null;
    }

    AbstractVcs vcs = ep.createVcs(myProject);
    LOG.assertTrue(name.equals(vcs.getName()), vcs);

    vcs.setupEnvironments();

    synchronized (myLock) {
      if (myExtensions.get(name) != ep) return null;

      AbstractVcs oldVcs = myVcses.get(name);
      if (oldVcs != null) {
        return oldVcs;
      }

      myVcses.put(name, vcs);
    }
    registerVcs(vcs);
    return vcs;
  }
@Override
  public AbstractVcs getByName(@Nullable String name)